1 | <?php |
||
15 | abstract class TestCase extends \PHPUnit\Framework\TestCase |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $expectedException; |
||
|
|||
21 | |||
22 | /** |
||
23 | * @inheritDoc |
||
24 | */ |
||
25 | 2 | protected function tearDown() |
|
30 | |||
31 | /** |
||
32 | * Returns whether the class' parent method exists. |
||
33 | * |
||
34 | * @param string $name |
||
35 | * @return bool |
||
36 | * |
||
37 | * @internal |
||
38 | */ |
||
39 | 1 | protected function isParentMethod($name) |
|
43 | |||
44 | /** |
||
45 | * Returns a test double for the specified class. |
||
46 | * |
||
47 | * @param string $originalClassName |
||
48 | * @return \PHPUnit_Framework_MockObject_MockObject |
||
49 | */ |
||
50 | protected function createMock($originalClassName) |
||
63 | |||
64 | /** |
||
65 | * Sets an exception expected. |
||
66 | * |
||
67 | * @param string $exception |
||
68 | * @throws Exception|\PHPUnit_Framework_Exception |
||
69 | */ |
||
70 | 2 | public function expectException($exception) |
|
88 | |||
89 | /** |
||
90 | * Sets an exception code expected. |
||
91 | * |
||
92 | * @param int|string $code |
||
93 | * @throws Exception|\PHPUnit_Framework_Exception |
||
94 | */ |
||
95 | 2 | public function expectExceptionCode($code) |
|
112 | |||
113 | /** |
||
114 | * Returns the reflected property. |
||
115 | * |
||
116 | * @param object|string $object |
||
117 | * @param string $name |
||
118 | * @return \ReflectionProperty |
||
119 | */ |
||
120 | 2 | protected function getProperty($object, $name) |
|
128 | |||
129 | /** |
||
130 | * Returns the private/protected property by its name. |
||
131 | * |
||
132 | * @param object|string $object |
||
133 | * @param string $name |
||
134 | * @return mixed |
||
135 | */ |
||
136 | 2 | protected function getInaccessibleProperty($object, $name) |
|
142 | |||
143 | /** |
||
144 | * Sets the private/protected property value by its name. |
||
145 | * |
||
146 | * @param object|string $object |
||
147 | * @param string $name |
||
148 | * @param mixed $value |
||
149 | */ |
||
150 | 2 | protected function setInaccessibleProperty($object, $name, $value) |
|
156 | |||
157 | /** |
||
158 | * Invokes the private/protected method by its name and returns its result. |
||
159 | * |
||
160 | * @param object|string $object |
||
161 | * @param string $name |
||
162 | * @param array $args |
||
163 | * @return mixed |
||
164 | */ |
||
165 | 2 | protected function invokeInaccessibleMethod($object, $name, array $args = []) |
|
171 | } |
||
172 |