> Testing >

Course Overview

Login to bookmark this course

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

Design your project with phpspec! Generate tests, code, and understand matchers for custom 'assertions'. Let's build a dinosaur park!

  • 1478 students
  • EN Captions
  • EN Script
  • Certificate of Completion

Your Guides

About this course

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!

Next courses in the Testing: Behavioral Testing section of the Testing Track!

2 Comments

Sort By
Login or Register to join the conversation
Default user avatar Knayz 5 years ago

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 |

Delete comment?

Share this comment

astronaut with balloons in space

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