|
1 | | -## Laravel PHP Framework |
| 1 | +#Sample Laravel Application with Codeception tests. |
2 | 2 |
|
3 | | -[](https://travis-ci.org/laravel/framework) |
4 | | -[](https://packagist.org/packages/laravel/framework) |
5 | | -[](https://packagist.org/packages/laravel/framework) |
6 | | -[](https://packagist.org/packages/laravel/framework) |
7 | | -[](https://packagist.org/packages/laravel/framework) |
| 3 | +[](https://travis-ci.org/janhenkgerritsen/codeception-laravel5-sample) |
8 | 4 |
|
9 | | -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching. |
| 5 | +### Setup |
10 | 6 |
|
11 | | -Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. |
| 7 | +- Clone repo |
| 8 | +- Install composer dependencies: `composer install` |
| 9 | +- Create databases by creating the following files: |
| 10 | + - `storage/database.sqlite` |
| 11 | + - `storage/testing.sqlite` |
| 12 | +- Run the following commands: |
| 13 | + - `php artisan migrate` |
| 14 | + - `php artisan migrate --database=sqlite_testing` |
| 15 | +- Server: run `php -S localhost:8000 -t public` |
| 16 | +- Browse to localhost:8000/posts |
12 | 17 |
|
13 | | -##Official Documentation |
| 18 | +### To test |
14 | 19 |
|
15 | | -Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs). |
| 20 | +Run Codeception, installed via Composer |
16 | 21 |
|
17 | | -## Contributing |
| 22 | +``` |
| 23 | +./vendor/bin/codecept run |
| 24 | +``` |
18 | 25 |
|
19 | | -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). |
| 26 | +## Tests |
20 | 27 |
|
21 | | -### License |
| 28 | +Please check out some [good test examples](https://github.com/janhenkgerritsen/codeception-laravel5-sample/tree/master/tests) provided. |
22 | 29 |
|
23 | | -The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) |
| 30 | +### Functional Tests |
| 31 | + |
| 32 | +Demonstrates testing of [CRUD application](https://github.com/janhenkgerritsen/codeception-laravel5-sample/blob/master/tests/functional/PostCrudCest.php) with |
| 33 | + |
| 34 | +* [PageObjects](https://github.com/janhenkgerritsen/codeception-laravel5-sample/blob/master/tests%2Ffunctional%2F_pages%2FPostsPage.php) |
| 35 | +* [authentication](https://github.com/janhenkgerritsen/codeception-laravel5-sample/blob/master/tests%2Ffunctional%2FAuthCest.php) (by user, credentials, http auth) |
| 36 | +* usage of session variables |
| 37 | +* [routes](https://github.com/janhenkgerritsen/codeception-laravel5-sample/blob/master/tests%2Ffunctional%2FRoutesCest.php) |
| 38 | +* creating and checking records in database |
| 39 | +* testing of form errors |
| 40 | + |
| 41 | +### API Tests |
| 42 | + |
| 43 | +Demonstrates functional [testing of API](https://github.com/janhenkgerritsen/codeception-laravel5-sample/blob/master/tests%2Fapi%2FPostsResourceCest.php) using REST and Laravel5 modules connected, with |
| 44 | + |
| 45 | +* partial json inclusion in response |
| 46 | +* GET/POST/PUT/DELETE requests |
| 47 | +* check changes inside database |
0 commit comments