Having code that is not coupled with any framework has a lot of profits. There is a small probability that you will be changing framework during your project lifecycle, but that kind of approach gives you easy way to reuse some of your functionalities across different styles of user interaction. GUI? API? Console command? Easy peasy with small effort. Everything with high understanding of domain you are working for.
Slides for workshop.
22. Gherkin language - live example
● we have customer
● we have products catalogue
● customer can add some amount of products to cart
● products in given amount should be placed in
customer cart
23. Gherkin language - exercise - 15 minutes
git checkout feature-exercise
● we have products in catalogue
● customer have some of them in his cart
● customer checkouts his cart for given address
● order for given products and address should be
created
● order should have total price
33. git checkout your-big-exercise
Try to implement automation of steps from second
scenario - cart checkout (CheckoutContext)
Implement needed production code with Specs where
needed.
Exercise after workshop
solution:gitcheckoutdomain-end
34. git checkout cart_checkout
There is Notifier interafce used in CheckoutHandler.
There is Fake implementation used in behat automation.
You can try to create i.e. Mail adapter for this port for
usage on app integrated with Symfony.
Exercise after workshop