1 | <?php |
||
12 | abstract class TestCase extends \PHPUnit_Framework_TestCase |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $expectedException; |
||
|
|||
18 | |||
19 | /** |
||
20 | * @inheritDoc |
||
21 | */ |
||
22 | protected function tearDown() |
||
27 | |||
28 | /** |
||
29 | * Returns whether the class' parent method exists. |
||
30 | * |
||
31 | * @param string $name |
||
32 | * @return bool |
||
33 | * |
||
34 | * @internal |
||
35 | */ |
||
36 | protected function isParentMethod($name) |
||
40 | |||
41 | /** |
||
42 | * Returns a test double for the specified class. |
||
43 | * |
||
44 | * @param string $originalClassName |
||
45 | * @return \PHPUnit_Framework_MockObject_MockObject |
||
46 | */ |
||
47 | protected function createMock($originalClassName) |
||
60 | |||
61 | /** |
||
62 | * Sets an exception expected. |
||
63 | * |
||
64 | * @param string $exception |
||
65 | * @throws \PHPUnit_Framework_Exception |
||
66 | */ |
||
67 | public function expectException($exception) |
||
81 | |||
82 | /** |
||
83 | * Sets an exception code expected. |
||
84 | * |
||
85 | * @param int|string $code |
||
86 | * @throws \PHPUnit_Framework_Exception |
||
87 | */ |
||
88 | public function expectExceptionCode($code) |
||
101 | |||
102 | /** |
||
103 | * Returns the reflected property. |
||
104 | * |
||
105 | * @param object|string $object |
||
106 | * @param string $name |
||
107 | * @return \ReflectionProperty |
||
108 | */ |
||
109 | protected function getProperty($object, $name) |
||
117 | |||
118 | /** |
||
119 | * Returns the private/protected property by its name. |
||
120 | * |
||
121 | * @param object|string $object |
||
122 | * @param string $name |
||
123 | * @return mixed |
||
124 | */ |
||
125 | protected function getInaccessibleProperty($object, $name) |
||
131 | |||
132 | /** |
||
133 | * Sets the private/protected property value by its name. |
||
134 | * |
||
135 | * @param object|string $object |
||
136 | * @param string $name |
||
137 | * @param mixed $value |
||
138 | */ |
||
139 | protected function setInaccessibleProperty($object, $name, $value) |
||
145 | |||
146 | /** |
||
147 | * Invokes the private/protected method by its name and returns its result. |
||
148 | * |
||
149 | * @param object|string $object |
||
150 | * @param string $name |
||
151 | * @param array $args |
||
152 | * @return mixed |
||
153 | */ |
||
154 | protected function invokeInaccessibleMethod($object, $name, array $args = []) |
||
160 | } |
||
161 |