Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

kununu/pact-php-demo

 
 

Repository files navigation

First try of using pact (setup from: https://github.com/andykelk/pact-php)

  1. Clone the repo
  2. Install pact mock service:
  • Install Ruby and Ruby Gems
  • Run bundler to get the gems: gem install bundler && bundle install
  1. Install composer: curl -sS https://getcomposer.org/installer | php

  2. Install dependencies: php composer.phar install

  3. Start the mock server: bundle exec pact-mock-service -p 1234 --pact-specification-version 2.0.0 -l log/pact.logs --pact-dir tmp/pacts

  4. Setup Pact Broker instance with docker-compose (see).

    run

         docker-compose pull
         docker-compose up -d db
         docker-compose up
    
  5. Run phpunit: ./vendor/bin/phpunit --bootstrap=vendor/autoload.php tests/

  6. Inspect the pact file in tmp/pacts

  7. Open 'http://127.0.0.1:5000' in your browser and you will be in awe!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 66.3%
  • Ruby 33.7%