BDD by example - php version
Kata of applying behaviour driven development and domain driven design in php. The feature to implement was "save_recipe"
Feature: Save recipes into cookbooks Scenario: Add recipe to cookbook Given exists a user named "John" who owns a cookbook named "Desserts" And exists a recipe of title "Crema catalana" When the recipe "Crema catalana" is added to the "John"'s cookbook named "Desserts" Then the "John"'s cookbook named "Desserts" should contain the recipe of title "Crema catalana"
Download composer from https://getcomposer.org
$ curl -sS https://getcomposer.org/installer | php
Then, install composer dependencies:
$ php composer.phar install
To run the tests simply execute the following commands:
$ php bin/behat -c behat.yml.dist
$ php bin/phpunit -c phpunit.xml.dist