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

+43
View File
@@ -0,0 +1,43 @@
<?php
namespace React\Promise;
class TestCase extends \PHPUnit_Framework_TestCase
{
public function expectCallableExactly($amount)
{
$mock = $this->createCallableMock();
$mock
->expects($this->exactly($amount))
->method('__invoke');
return $mock;
}
public function expectCallableOnce()
{
$mock = $this->createCallableMock();
$mock
->expects($this->once())
->method('__invoke');
return $mock;
}
public function expectCallableNever()
{
$mock = $this->createCallableMock();
$mock
->expects($this->never())
->method('__invoke');
return $mock;
}
public function createCallableMock()
{
return $this
->getMockBuilder('React\\Promise\Stub\CallableStub')
->getMock();
}
}