Skip to content

AlokOlety/circleci-demo-php-laravel

 
 

Repository files navigation

Sample Laravel Application with Codeception tests.

CircleCI

Setup

You can setup this sample use Laradock to automatically set up a development environment for you.

Laradock

  • Install docker and docker-compose
  • Clone repo
  • Create your .env file from the example file: cp .env.testing .env
  • Go to the laradock directory
  • Run docker-compose up -d nginx mysql workspace
  • Browse to http://localhost/

To SSH into the machine to run your tests, run docker exec -it laradock_workspace_1 /bin/bash.

To test

Run Codeception, installed via Composer

./vendor/bin/codecept build
./vendor/bin/codecept run

Tests

Please check out some good test examples provided.

Functional Tests

Demonstrates testing of CRUD application with

  • PageObjects
  • authentication (by user, credentials, http auth)
  • usage of session variables
  • routes
  • creating and checking records in database
  • testing of form errors

API Tests

Demonstrates functional testing of API using REST and Laravel5 modules connected, with

  • partial json inclusion in response
  • GET/POST/PUT/DELETE requests
  • check changes inside database

Releases

No releases published

Packages

No packages published

Languages

  • CSS 27.4%
  • Dockerfile 24.0%
  • PHP 21.5%
  • Shell 12.7%
  • HTML 8.2%
  • VCL 5.0%
  • Other 1.2%