Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php namespace DocLister\Tests; |
||
3 | class TestAbstract extends \PHPUnit_Framework_TestCase |
||
4 | { |
||
5 | public function getMethod($class, $method) |
||
6 | { |
||
7 | $reflection = new \ReflectionClass($class); |
||
8 | $method = $reflection->getMethod($method); |
||
9 | $method->setAccessible(true); |
||
10 | |||
11 | return $method; |
||
12 | } |
||
13 | |||
14 | public function getProperty($class, $property) |
||
15 | { |
||
16 | $reflection = new \ReflectionClass($class); |
||
17 | |||
18 | /** @var \ReflectionProperty $property */ |
||
19 | $property = $reflection->getProperty($property); |
||
20 | $property->setAccessible(true); |
||
21 | |||
22 | return $property->getValue($class); |
||
23 | } |
||
24 | |||
25 | public function setProperty($class, $property, $value) |
||
34 | } |
||
35 | } |