News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso:
Building a Silex application from one Behat/Gherkin feature file
October 22, 2012 @ 08:55:18

Gonzalo Ayuso has an interesting post showing how you can use a Gherkin file (used in tools like Behat) to generate a Silex-based application.

Last days I've playing with Behat. Behat is a behavior driven development (BDD) framework based on Ruby's Cucumber. Basically with Behat we defenie features within one feature file. I'm not going to crate a Behat tutorial (you can read more about Behat here). Behat use Gherkin to write the features files. When I was playing with Behat I had one idea. The idea is simple: Can we use Gherking to build a Silex application?. It was a good excuse to study Gherking, indeed.

He includes the example feature file - one that builds an API that lets you list users, get the information for a specific user and update the user's information. Also included are two simple requests to be made to the API and the actual script that makes the Gherkinn-to-Silex translation possible. You can find the full code on github.

0 comments voice your opinion now!
silex gherkin api generate tutorial feature file


blog comments powered by Disqus

Similar Posts

Ryan Malesevich's Blog: MD5 to SHA-1 in PHP and MySQL (Part 1)

PHPKitchen.com: Many new features in latest 0.6.2 release of Seagull Framework

Demian Turner's Blog: Seagull 0.6.4 Release (fixes Security Isse from 0.6.3)

Hasin Hayder's Blog: RSA Encrypting and Decrypting data with Zend_Crypt_Rsa Library

DevShed: Validating User Input with the Strategy Pattern


Community Events





Don't see your event here?
Let us know!


release testing refactor unittest opinion install api framework interview introduction community developer language series list symfony2 threedevsandamaybe podcast laravel code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework