mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
parent
f9324032cb
commit
e1793c9ea1
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,6 +22,7 @@ test/php/bin/extcmd_test
|
|||||||
|
|
||||||
# misc test output
|
# misc test output
|
||||||
test/frontend/static/public
|
test/frontend/static/public
|
||||||
|
test/php/library/Icinga/Protocol/Statusdat/.cache
|
||||||
|
|
||||||
# Generated API documentation
|
# Generated API documentation
|
||||||
doc/api
|
doc/api
|
||||||
|
@ -69,18 +69,19 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$cacheDir = realpath(dirname(__FILE__) . '/.cache');
|
||||||
$object_file = tempnam("./dir", "object");
|
$object_file = tempnam("./dir", "object");
|
||||||
$status_file = tempnam("./dir", "status");
|
$status_file = tempnam("./dir", "status");
|
||||||
$reader = new Reader(new ConfigMock(array(
|
$reader = new Reader(new ConfigMock(array(
|
||||||
"cache_path" => "/tmp",
|
"cache_path" => $cacheDir,
|
||||||
"object_file" => $object_file,
|
"object_file" => $object_file,
|
||||||
"status_file" => $status_file
|
"status_file" => $status_file
|
||||||
)), $parser);
|
)), $parser);
|
||||||
unlink($object_file);
|
unlink($object_file);
|
||||||
unlink($status_file);
|
unlink($status_file);
|
||||||
$this->assertTrue(file_exists("/tmp/zend_cache---object" . md5($object_file)));
|
$this->assertTrue(file_exists($cacheDir . '/zend_cache---object' . md5($object_file)));
|
||||||
$this->assertTrue(file_exists("/tmp/zend_cache---state" . md5($object_file)));
|
$this->assertTrue(file_exists($cacheDir . '/zend_cache---state' . md5($object_file)));
|
||||||
system("rm /tmp/zend_cache*");
|
system('rm ' . $cacheDir . '/zend_cache*');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEmptyFileException()
|
public function testEmptyFileException()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user