parent
f9324032cb
commit
e1793c9ea1
|
@ -22,6 +22,7 @@ test/php/bin/extcmd_test
|
|||
|
||||
# misc test output
|
||||
test/frontend/static/public
|
||||
test/php/library/Icinga/Protocol/Statusdat/.cache
|
||||
|
||||
# Generated API documentation
|
||||
doc/api
|
||||
|
|
|
@ -69,18 +69,19 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
|
|||
)
|
||||
)
|
||||
);
|
||||
$cacheDir = realpath(dirname(__FILE__) . '/.cache');
|
||||
$object_file = tempnam("./dir", "object");
|
||||
$status_file = tempnam("./dir", "status");
|
||||
$reader = new Reader(new ConfigMock(array(
|
||||
"cache_path" => "/tmp",
|
||||
"object_file" => $object_file,
|
||||
"status_file" => $status_file
|
||||
"cache_path" => $cacheDir,
|
||||
"object_file" => $object_file,
|
||||
"status_file" => $status_file
|
||||
)), $parser);
|
||||
unlink($object_file);
|
||||
unlink($status_file);
|
||||
$this->assertTrue(file_exists("/tmp/zend_cache---object" . md5($object_file)));
|
||||
$this->assertTrue(file_exists("/tmp/zend_cache---state" . md5($object_file)));
|
||||
system("rm /tmp/zend_cache*");
|
||||
$this->assertTrue(file_exists($cacheDir . '/zend_cache---object' . md5($object_file)));
|
||||
$this->assertTrue(file_exists($cacheDir . '/zend_cache---state' . md5($object_file)));
|
||||
system('rm ' . $cacheDir . '/zend_cache*');
|
||||
}
|
||||
|
||||
public function testEmptyFileException()
|
||||
|
|
Loading…
Reference in New Issue