phpspec: Testing... *Designing* with a Bite
2h 54m 25s
English
Paid
Course description
phpspec: a tool for unit testing? Sure... but, oof, it's so much cooler than that! Yes, just like with our phpunit tutorial, when we finally launch our dinosaur park... during a hurricane... on a Friday night, we do not want all the dinosaurs to escape. But, phpspec goes one step beyond "just writing tests": it helps you think about the design of your classes first through "specifications" and "examples".
Read more about the course
And as a side-effect, yes! You get tests, code generation and, with a little bit of work, a nyan cat to tell us if our tests pass:
- Getting phpspec set up
- What's a specification?
- Writing examples
- Generating code from our specifications! Nice!
- Understanding matchers and writing out own for custom "assertions"
- How does phpspec fit into TDD, BDD, PHPUnit & Behat?
- Demystifying the
ObjectBehavior
class - The red, green, refactor cycle
- Testing exceptions
- Prophecy & test doubles! Dummies, stubs, spies & mocks
- The let() method for set up
Watch Online
Watch Online phpspec: Testing... *Designing* with a Bite
0:00
/ #1: Installing phpspec
All Course Lessons (28)
# | Lesson Title | Duration | Access |
---|---|---|---|
1 | Installing phpspec Demo | 06:14 | |
2 | Buzzwords! Specification & Examples | 07:48 | |
3 | Matchers, Examples & Generation | 09:44 | |
4 | Custom Inline Matcher | 05:36 | |
5 | Registering & Autoloading a Custom Matcher | 05:27 | |
6 | Coding up the Custom Matcher | 05:45 | |
7 | phpspec? PHPUnit? BDD? TDD? Buzzwords? | 06:47 | |
8 | Red, Green, Refactor Cycle + More Dinosaurs | 05:42 | |
9 | The ObjectBehavior Magic | 05:31 | |
10 | The Magic of the Subject | 03:45 | |
11 | Describing Object Construction | 06:14 | |
12 | Coding & Debugging | 04:23 | |
13 | Instantiation with a static Factory Method | 05:39 | |
14 | Describing the Factory Service | 07:39 | |
15 | Object Dependencies: To Mock, or Not? | 08:16 | |
16 | Expecting Exceptions | 06:15 | |
17 | The ObjectStateMatcher | 07:12 | |
18 | Describing for Exception Messages | 08:15 | |
19 | When Existing Tests Break & Exceptions in __construct() | 07:20 | |
20 | Test Doubles | 06:09 | |
21 | The EnclosureBuilderService | 04:47 | |
22 | Dummies | 06:25 | |
23 | Stubs | 07:03 | |
24 | Promises (control return values) & Arguments | 06:04 | |
25 | Advanced Argument Matching | 04:00 | |
26 | Mocks & Spies - shouldBeCalledTimes() | 05:04 | |
27 | Test Doubles, Dummies, Mocks & Spies | 04:12 | |
28 | Let: The Setup Function | 07:09 |
Unlock unlimited learning
Get instant access to all 27 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionComments
0 commentsSimilar courses

Complete Modern PHP Developer Course in 2023
Sources: udemy
Updated to use PHP 8. PHP is one of the most popular programming languages in the world. It powers the entire modern web. It provides millions of high-paying jobs all over the w...
23 hours 40 minutes 59 seconds

Become a WordPress Developer: Unlocking Power With Code
Sources: udemy
Learn PHP, JavaScript, WordPress theming & the WP REST API to Create Custom & Interactive WordPress Websites. Unlock the full power of WordPress and go beyond "just a blog platf...
41 hours 45 minutes 55 seconds

Make a Google search engine clone: JavaScript PHP and MySQL
Sources: udemy
Do you want to become an expert in JavaScript, PHP and MySQL? Do you want to build a real search engine just like Google? If so, you’re in the right place! This
5 hours 47 minutes 11 seconds

PHP From Scratch 2024 | Beginner To Advanced
Sources: udemy, Brad Traversy
Learn PHP fundamentals then build a job listing website from the ground up, using a Laravel-like infrastructure. This course is broken up into two parts. First, we have seven le...
18 hours 17 minutes 27 seconds

Refactoring to Collections
Sources: adamwathan
Learn how to use collection pipelines to break down ugly, complex functions into a series of simple transformations, free of loops, complex conditionals, and temporary variables...
4 hours 44 minutes 21 seconds
Want to join the conversation?
Sign in to comment