mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
29 lines
590 B
PHP
29 lines
590 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]);
|
|
}
|
|
}
|