Behavior Driven Development
Recursos:
$ joe composer.json
I poseu al fitxer:
{ "require": { "behat/behat": "2.4.*@stable" }, "config": { "bin-dir": "bin/" } }
I ara executeu:
$ curl http://getcomposer.org/installer | php % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13395 0 13395 0 0 47233 0 --:--:-- --:--:-- --:--:-- 91122 #!/usr/bin/env php All settings correct for using Composer Downloading... Composer successfully installed to: /linux4/Baixades/behat/composer.phar Use it: php composer.phar $ php composer.phar install --prefer-source Loading composer repositories with package information Installing dependencies - Installing symfony/finder (v2.2.1) Cloning v2.2.1 - Installing symfony/yaml (v2.2.1) Cloning v2.2.1 - Installing symfony/translation (v2.2.1) Cloning v2.2.1 - Installing symfony/event-dispatcher (v2.2.1) Cloning v2.2.1 - Installing symfony/dependency-injection (v2.2.1) Cloning v2.2.1 - Installing symfony/config (v2.2.1) Cloning v2.2.1 - Installing symfony/console (v2.2.1) Cloning v2.2.1 - Installing behat/gherkin (v2.2.9) Cloning v2.2.9 - Installing behat/behat (v2.4.5) Cloning v2.4.5 symfony/event-dispatcher suggests installing symfony/http-kernel (2.2.*) behat/behat suggests installing behat/symfony2-extension (for integration with Symfony2 web framework) behat/behat suggests installing behat/yii-extension (for integration with Yii web framework) behat/behat suggests installing behat/mink-extension (for integration with Mink testing framework) Writing lock file Generating autoload files
Ara:
$ bin/behat --init +d features - place your *.feature files here +d features/bootstrap - place bootstrap scripts and static files here +f features/bootstrap/FeatureContext.php - place your feature related code here
http://docs.behat.org/quick_intro.html