mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 15:05:40 +00:00
26 lines
510 B
PHP
26 lines
510 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @mixin PHPUnit_Framework_TestCase
|
||
|
*/
|
||
|
class FileWritableCheckTest extends SapphireTest {
|
||
|
public function testCheckReportsWritablePaths() {
|
||
|
$check = new FileWriteableCheck(TEMP_FOLDER);
|
||
|
|
||
|
$expected = array(
|
||
|
EnvironmentCheck::OK,
|
||
|
'',
|
||
|
);
|
||
|
|
||
|
$this->assertEquals($expected, $check->check());
|
||
|
}
|
||
|
|
||
|
public function testCheckReportsNonWritablePaths() {
|
||
|
$check = new FileWriteableCheck('/var');
|
||
|
|
||
|
$result = $check->check();
|
||
|
|
||
|
$this->assertEquals(EnvironmentCheck::ERROR, $result[0]);
|
||
|
}
|
||
|
}
|