Skip to content

Repository files navigation

chubbyphp-socket-server-mock

Build StatusCoverage StatusLatest Stable VersionTotal DownloadsMonthly DownloadsDaily Downloads

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

<?phpnamespaceMyProject\Tests\Integration;
useChubbyphp\SocketServerMock\CreateSocketServerMockTrait;
usePHPUnit\Framework\TestCase;
useSymfony\Component\Process\Process;
finalclass SampleTest extends TestCase
{
use CreateSocketServerMockTrait;
publicfunctiontestSample()
{
/** @var Process $process */$process = $this->createSocketServerMock('0.0.0.0', 3000, [[[
'input' => 'input',
'output' => 'output'
]]]);
// run my integration test
}
}

Copyright

Dominik Zogg 2020

About

A simple socket server mock.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages