Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine

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

2:54:11

What you'll be learning

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

Buy Access

Join the Conversation?

2
Login or Register to join the conversation
Default user avatar

Hi, I have one little question. Do you have any plans to make course about microservices? It's really popular skill nowadays.

Reply

Hey Knayz

We do not have plans for a Microservices tutorial at the moment but we love to know what kind of tutorials you'd like to watch. In the meanwhile, there is a talk about microservices from SymfonyCon 2018 that we will upload soon. You can check it at: https://symfonycasts.com/sc...

Cheers!

Reply
Cat in space

"Houston: no signs of life"
Start the conversation!

userVoice