chubbyphp / chubbyphp-socket-server-mock
Chubbyphp Socket Server Mock
Installs: 1 883
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: ^7.2
- symfony/process: ^3.4.43|^4.4.11|^5.0
Requires (Dev)
- chubbyphp/chubbyphp-dev-helper: dev-master
- chubbyphp/chubbyphp-mock: ^1.4.5
- infection/infection: ^0.15.3|^0.16.4
- laminas/laminas-container-config-test: ^0.2 || ^1.0
- mavimo/phpstan-junit: ^0.3
- php-coveralls/php-coveralls: ^2.2
- php-mock/php-mock-phpunit: ^2.6
- phploc/phploc: ^5.0|^6.0.2
- phpstan/extension-installer: ^1.0.4
- phpstan/phpstan: ^0.12.33
- phpunit/phpunit: ^8.5.8|^9.2.6
README
Description
A simple socket server mock.
Requirements
- php: ^7.2
- symfony/process: ^3.4.43|^4.4.11|^5.0
Installation
Through Composer as chubbyphp/chubbyphp-socket-server-mock.
composer require chubbyphp/chubbyphp-socket-server-mock "^1.2"
Usage
<?php namespace MyProject\Tests\Integration; use Chubbyphp\SocketServerMock\CreateSocketServerMockTrait; use PHPUnit\Framework\TestCase; use Symfony\Component\Process\Process; final class SampleTest extends TestCase { use CreateSocketServerMockTrait; public function testSample() { /** @var Process $process */ $process = $this->createSocketServerMock('0.0.0.0', 3000, [[[ 'input' => 'input', 'output' => 'output' ]]]); // run my integration test } }
Copyright
Dominik Zogg 2020