chubbyphp / chubbyphp-socket-server-mock
此包已被废弃,不再维护。未建议替代包。
Chubbyphp Socket Server Mock
1.2.0
2020-08-18 19:44 UTC
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
描述
简单的套接字服务器模拟。
要求
- php: ^7.2
- symfony/process: ^3.4.43|^4.4.11|^5.0
安装
通过 Composer 以 chubbyphp/chubbyphp-socket-server-mock 的形式。
composer require chubbyphp/chubbyphp-socket-server-mock "^1.2"
用法
<?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 } }
版权
多米尼克·佐格 2020