<?php namespace React\Tests\Dns; use PHPUnit\Framework\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { protected function expectCallableOnce() { $mock = $this->createCallableMock(); $mock ->expects($this->once()) ->method('__invoke'); return $mock; } protected function expectCallableOnceWith($value) { $mock = $this->createCallableMock(); $mock ->expects($this->once()) ->method('__invoke') ->with($value); return $mock; } protected function expectCallableNever() { $mock = $this->createCallableMock(); $mock ->expects($this->never()) ->method('__invoke'); return $mock; } protected function createCallableMock() { return $this->getMockBuilder('React\Tests\Dns\CallableStub')->getMock(); } public function setExpectedException($exception, $exceptionMessage = '', $exceptionCode = null) { if (method_exists($this, 'expectException')) { // PHPUnit 5 $this->expectException($exception); if ($exceptionMessage !== '') { $this->expectExceptionMessage($exceptionMessage); } if ($exceptionCode !== null) { $this->expectExceptionCode($exceptionCode); } } else { // legacy PHPUnit 4 parent::setExpectedException($exception, $exceptionMessage, $exceptionCode); } } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Config | Folder | 0755 |
|
|
Fixtures | Folder | 0755 |
|
|
Model | Folder | 0755 |
|
|
Protocol | Folder | 0755 |
|
|
Query | Folder | 0755 |
|
|
Resolver | Folder | 0755 |
|
|
CallableStub.php | File | 101 B | 0644 |
|
FunctionalResolverTest.php | File | 2.96 KB | 0644 |
|
TestCase.php | File | 1.55 KB | 0644 |
|