An open API service indexing awesome lists of open source software.

https://github.com/exu/php-bdd-bootstrap

Basic skeleton to start writing StoryBDD and SpecBDD based software
https://github.com/exu/php-bdd-bootstrap

Last synced: over 1 year ago
JSON representation

Basic skeleton to start writing StoryBDD and SpecBDD based software

Awesome Lists containing this project

README

          

* BDD Bootstrap

If you need to Bootstrap your new PHP BDD based project this repo is for You.
It's really simple set of composer based config files and example commands
to start specify your application with [[http://behat.org/][Behat]] and [[http://www.phpspec.net/docs/introduction.html][PHPSpec]].

** Usage

*** Installation

This project is based on composer so you will need it. To
install composer. I prefer installing composer globally so
everything what you should do is

#+begin_src sh
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
#+end_src

Next you should clone repository and run =composer install= command
to download and resolve all dependencies (composer will do it automatically).

#+begin_src sh
git clone git@github.com:exu/php-bdd-bootstrap.git
cd php-bdd-bootstrap
composer install
#+end_src

*** Project structure

This skeleton have integrated [[http://wysocki.in/programming/2013/12/04/symfony2-console-as-standalone-component/][Symfony2 Command Component]], Behat and PHPSpec.
There is no framework neither microframework to manage routing and other
things - you can chose whatever you like.

*** Preconfigured Behat

Default behat session is set to =goutte= so it should be easy to test
most of sites which not require javascript integration.

You can pass =@javascript= tag to run selenium2 based tests.
(on top of feature file or on top of scenario header)

First run your selenium server:
#+begin_src sh
java -jar ~/path.to.selenium.jar.file.jar
#+end_src

Next run your behat suite:

#+begin_src sh
bin/behat
#+end_src

*** What next?

Do whatever you want with it, it's only skeleton - write stories,
write specifications, create software!