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 FileWritableCheckTest extends SapphireTest { |
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
7 | public function testCheckReportsWritablePaths() { |
||
8 | $check = new FileWriteableCheck(TEMP_FOLDER); |
||
9 | |||
10 | $expected = array( |
||
11 | EnvironmentCheck::OK, |
||
12 | '', |
||
13 | ); |
||
14 | |||
15 | $this->assertEquals($expected, $check->check()); |
||
16 | } |
||
17 | |||
18 | public function testCheckReportsNonWritablePaths() { |
||
19 | $check = new FileWriteableCheck('/var'); |
||
20 | |||
21 | $result = $check->check(); |
||
22 | |||
23 | $this->assertEquals(EnvironmentCheck::ERROR, $result[0]); |
||
24 | } |
||
25 | } |
||
26 |