These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * @mixin PHPUnit_Framework_TestCase |
||
5 | */ |
||
6 | View Code Duplication | class HasFunctionCheckTest extends SapphireTest |
|
7 | { |
||
8 | public function testCheckReportsMissingFunctions() |
||
9 | { |
||
10 | $check = new HasFunctionCheck('foo'); |
||
11 | |||
12 | $expected = array( |
||
13 | EnvironmentCheck::ERROR, |
||
14 | 'foo() doesn\'t exist', |
||
15 | ); |
||
16 | |||
17 | $this->assertEquals($expected, $check->check()); |
||
0 ignored issues
–
show
|
|||
18 | } |
||
19 | |||
20 | public function testCheckReportsFoundFunctions() |
||
21 | { |
||
22 | $check = new HasFunctionCheck('class_exists'); |
||
23 | |||
24 | $expected = array( |
||
25 | EnvironmentCheck::OK, |
||
26 | 'class_exists() exists', |
||
27 | ); |
||
28 | |||
29 | $this->assertEquals($expected, $check->check()); |
||
0 ignored issues
–
show
The method
assertEquals() does not seem to exist on object<HasFunctionCheckTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.
Loading history...
|
|||
30 | } |
||
31 | } |
||
32 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.