This commit is contained in:
zino committed 2022-10-23 01:39:27 +02:00
1 parent 8c17aab483
commit 1929b84685
4130 files changed
+479334

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
<?php
namespace React\Tests\EventLoop;
class TestCase extends \PHPUnit_Framework_TestCase
{
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 expectCallableNever()
{
$mock = $this->createCallableMock();
$mock
->expects($this->never())
->method('__invoke');
return $mock;
}
protected function createCallableMock()
{
return $this->getMockBuilder('React\Tests\EventLoop\CallableStub')->getMock();
}
}