Here we have a simple application written with a Phalcon framework.
And simple test suite written with Kahlan BDD testing framework.
To run this playgound you should have:
- Phalcon
- Composer (installed globally prefered)
mkdir /tmp/phalcon-kahlan
cd /tmp/phalcon-kahlan
git clone [email protected]:m1ome/kalhan_phalcon.git .
composer install
./vendor/bin/kahlan
This is a basic REST API application.
- GET /api/users - for all users list
- GET /api/users/{id} - load specific user by id
- GET /api/users/search/{name} - load users by %name% pattern
- PUT /api/users/{id} - update specific user information by id
- DELETE /api/users/{id} - delete specific user by id
/application
- Main application folder/application/model/
- Models folder/application/controller
- Controller folder/application/database
- Database lays here
/spec
- Spec folders for Kahlan/spec/database
- Testing database/spec/fixtures
- Fixture generator/spec/helper
- Helper files for suite/spec/suite
- Whole suite by itself
./vendor/bin/kahlan