<?php namespace React\Tests\Stream; use PHPUnit\Framework\TestCase as BaseTestCase; class TestCase extends BaseTestCase { protected function expectCallableExactly($amount) { $mock = $this->createCallableMock(); $mock ->expects($this->exactly($amount)) ->method('__invoke'); return $mock; } protected function expectCallableOnce() { $mock = $this->createCallableMock(); $mock ->expects($this->once()) ->method('__invoke'); return $mock; } protected function expectCallableOnceWith($value) { $callback = $this->createCallableMock(); $callback ->expects($this->once()) ->method('__invoke') ->with($value); return $callback; } protected function expectCallableNever() { $mock = $this->createCallableMock(); $mock ->expects($this->never()) ->method('__invoke'); return $mock; } protected function createCallableMock() { return $this->getMockBuilder('React\Tests\Stream\CallableStub')->getMock(); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Stub | Folder | 0755 |
|
|
CallableStub.php | File | 104 B | 0644 |
|
CompositeStreamTest.php | File | 8.21 KB | 0644 |
|
DuplexResourceStreamIntegrationTest.php | File | 11.2 KB | 0644 |
|
DuplexResourceStreamTest.php | File | 14.42 KB | 0644 |
|
EnforceBlockingWrapper.php | File | 656 B | 0644 |
|
FunctionalInternetTest.php | File | 3.4 KB | 0644 |
|
ReadableResourceStreamTest.php | File | 11.37 KB | 0644 |
|
TestCase.php | File | 1.15 KB | 0644 |
|
ThroughStreamTest.php | File | 7.09 KB | 0644 |
|
UtilTest.php | File | 7.89 KB | 0644 |
|
WritableStreamResourceTest.php | File | 16.06 KB | 0644 |
|