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 HasClassCheckTest extends SapphireTest { |
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
7 | public function testCheckReportsMissingClasses() { |
||
8 | $check = new HasClassCheck('foo'); |
||
9 | |||
10 | $expected = array( |
||
11 | EnvironmentCheck::ERROR, |
||
12 | 'Class foo doesn\'t exist', |
||
13 | ); |
||
14 | |||
15 | $this->assertEquals($expected, $check->check()); |
||
16 | } |
||
17 | |||
18 | public function testCheckReportsFoundClasses() { |
||
19 | $check = new HasClassCheck('stdClass'); |
||
20 | |||
21 | $expected = array( |
||
22 | EnvironmentCheck::OK, |
||
23 | 'Class stdClass exists', |
||
24 | ); |
||
25 | |||
26 | $this->assertEquals($expected, $check->check()); |
||
27 | } |
||
28 | } |
||
29 |