Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected function assertPhpCode($class, $method, $originalPhpCodeFile) |
||
32 | { |
||
33 | $reflectionMethod = new \ReflectionMethod($class, $method); |
||
34 | $lines = file($reflectionMethod->getFileName()); |
||
35 | $phpCode = implode( |
||
36 | null, |
||
37 | array_slice( |
||
38 | $lines, |
||
39 | $reflectionMethod->getStartLine(), |
||
40 | $reflectionMethod->getEndLine() - $reflectionMethod->getStartLine() |
||
41 | ) |
||
42 | ); |
||
43 | |||
44 | $this->assertEquals( |
||
45 | $phpCode, |
||
46 | file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . $originalPhpCodeFile), |
||
47 | 'Php code has changed for ' . $class . '::' . $method . '().' |
||
48 | ); |
||
49 | } |
||
50 | } |
||
51 |