Plugin do testów BDD w Symfony – sfBehatPlugin
Behat to chyba najlepszy odpowiednik Cucumbera w PHP. Jak wygląda przykładowy test napisany w Behacie?
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Scenario: Add two numbers
Given I have entered 50 into the calculator
And I have entered 70 into the calculator
When I press add
Then The result should be 120 on the screen
powyższy tekst jest plikiem, który definiuje scenariusz
Co ciekawe Behat jest napisany przy użyciu narzędzi Symfony – Dependency Injector, Event Dispatcher itd. Jego instalacja nie jest zbyt skomplikowana, więc polecam każdemu wypróbować.
tutaj link do strony domowej behat

Na razie brak komentarzy.