jbzoo/mock-server

Flexible HTTP mocking application for testing and fast prototyping

0.4.4 2021-04-14 11:47 UTC

This package is auto-updated.

Last update: 2024-10-28 14:41:18 UTC


README

Build Status Docker Cloud Build Status Coverage Status Psalm Coverage Scrutinizer Code Quality CodeFactor PHP Strict Types
Stable Version Dependents GitHub Issues Total Downloads Docker Pulls GitHub License

Installing

# Build it into you project
composer require jbzoo/mock-server

# OR use phar file. Replace <VERSION> to the last version. See releases page
wget https://github.com/JBZoo/Mock-Server/releases/download/<VERSION>/mock-server.phar 

# OR just pul docker image
docker pull jbzoo/mock-server:latest

Usage

# Mock-Server is built-in into your project
php `pwd`/jbzoo-mock-server     \
    --host=0.0.0.0              \
    --port=8089                 \
    --host-tls=localhost        \
    --port-tls=8090             \
    --mocks=./mocks             \
    --ansi                      \
    -vvv

# Or Docker image
docker run                      \
    --rm                        \
    --name="mock-server"        \
    -v `pwd`/tests/mocks:/mocks \
    -p 8089:8089                \
    -p 8090:8090                \
    jbzoo/mock-server:latest    \
    --ansi                      \
    -vvv

Unit tests and check code style

make update
make test-all

License

MIT