mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-03 01:39:15 +02:00
handle undefined global, fixes #1544
This commit is contained in:
parent
6347b6193e
commit
c08a792f01
3 changed files with 13 additions and 5 deletions
|
@ -185,7 +185,9 @@ class FilesystemTest extends TestCase
|
|||
foreach (array('purge_limiter', 'salt', 'traffic_limiter') as $namespace) {
|
||||
file_put_contents($this->_invalidPath . DIRECTORY_SEPARATOR . $namespace . '.php', 'invalid content');
|
||||
$model = new Filesystem(array('dir' => $this->_invalidPath));
|
||||
ob_start(); // hide "invalid content", when file gets included
|
||||
$this->assertEquals($model->getValue($namespace), '', 'empty default value returned, invalid content ignored');
|
||||
ob_end_clean();
|
||||
$this->assertTrue($model->setValue(VALID, $namespace), 'setting valid value');
|
||||
$this->assertEquals($model->getValue($namespace), VALID, 'valid value returned');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue