phpspec: Testing... *Designing* with a Bite

58:27
Buy Access

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". 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

Let's finally design a dinosaur park that will scale with every sequel!


Your Guides

Andrew Marcinkevičius Ryan Weaver

Questions? Conversation?

  • 2019-01-19 Rochelle N. Gonsalves

    Opportunity never knocks the door twice, It is always important to make maximum use of the opportunity. A work that gives you full freedom to work from home. Job opportunity which is web based and you just have to give a small amount of time into the work. It is not similar to false promises you can see on online that claims to make you wealthy and later turned out to be some fraud selling schemes. It is really valid and trustworthy. It is simple to begin and it also enables you to get wonderful earnings. Be your own boss and allot a lot more precious time with your family and can make almost $35000 per month. It is time for you to have a look at this opportunity and change your life forever >>>>>>>>>>>>> AWESOME WORK OPPORTUNITY FOR YOU!!!