PluginProbe
WP-Stateless – Google Cloud Storage / 2.1.4
WP-Stateless – Google Cloud Storage v2.1.4
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / lib / Google / vendor / react / promise / tests / TestCase.php

TestCase.php in WP-Stateless – Google Cloud Storage 2.1.4, at lib/Google/vendor/react/promise/tests/TestCase.php

44 lines 895 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace React\Promise;
4
5 class TestCase extends \PHPUnit_Framework_TestCase
6 {
7 public function expectCallableExactly($amount)
8 {
9 $mock = $this->createCallableMock();
10 $mock
11 ->expects($this->exactly($amount))
12 ->method('__invoke');
13
14 return $mock;
15 }
16
17 public function expectCallableOnce()
18 {
19 $mock = $this->createCallableMock();
20 $mock
21 ->expects($this->once())
22 ->method('__invoke');
23
24 return $mock;
25 }
26
27 public function expectCallableNever()
28 {
29 $mock = $this->createCallableMock();
30 $mock
31 ->expects($this->never())
32 ->method('__invoke');
33
34 return $mock;
35 }
36
37 public function createCallableMock()
38 {
39 return $this
40 ->getMockBuilder('React\\Promise\Stub\CallableStub')
41 ->getMock();
42 }
43 }
44