Skip to content

Instantly share code, notes, and snippets.

@mikolajprzybysz
Created September 23, 2018 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikolajprzybysz/d9573ca26008a6d759e49b29b9e59d77 to your computer and use it in GitHub Desktop.
Save mikolajprzybysz/d9573ca26008a6d759e49b29b9e59d77 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# For mac
docker run -it -v $PWD:/app -w /app composer:1.7 require "codeception/codeception" --dev
docker run -it -v $PWD:/app -w /app php:7.2-alpine ./vendor/bin/codecept init api
# Use the following answers. Important! There is no trailing slash!
> ? Where tests will be stored? (tests) tests/api
> ? Start url for tests (http://localhost/api) http://wiremock:8080
# At point we will create some bootstrap files, since we have one particular endpoint we would like to test simply edit
# the existing test in the file tests/api/ApiCest.php:6 from
# $I->sendGET('/');
# to
# $I->sendGET('/book/123');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment