PHPSpec

Method order assertion in PHPSpec: Deferred Expectations

Disclaimer This post title can be misleading. Method order is just an implementation detail that should not be tested as PHPSpec philosophy is to test your public API, not the implementation as it would lead to fragile tests. Fundamentalists might say that following example should not be performed in PHPSpec but with…

The subtle difference of Prophecy doubles

Did you know that “under the hood” PHPSpec use Prophecy as library to create doubles? If you did not, now you do! If you read Prophecy documentation you may end up with some questions, so this guide is meant to be a quick tutorial to let you start working with the library:…