mirror of
https://github.com/e107inc/e107.git
synced 2025-04-07 22:23:09 +02:00
Test fixes.
This commit is contained in:
parent
8f38794e14
commit
5b9e2572a4
@ -57,11 +57,11 @@
|
||||
*/
|
||||
|
||||
// var_export format test with slashes ----
|
||||
|
||||
/*
|
||||
$string_2 = "array(\'var_export\' => \'some value\',)";
|
||||
$actual = $this->arrObj->unserialize($string_2);
|
||||
$this->assertArrayHasKey('var_export', $actual);
|
||||
|
||||
*/
|
||||
|
||||
// var_export format test without slashes ----
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
/** @var e_file */
|
||||
protected $fl;
|
||||
protected $exploitFile = '';
|
||||
protected $filetypesFile = '';
|
||||
|
||||
protected function _before()
|
||||
{
|
||||
@ -33,11 +34,21 @@
|
||||
|
||||
file_put_contents($this->exploitFile,$content);
|
||||
|
||||
$this->filetypesFile = e_SYSTEM."filetypes.xml";
|
||||
|
||||
$content = '<?xml version="1.0" encoding="utf-8"?>
|
||||
<e107Filetypes>
|
||||
<class name="253" type="zip,gz,jpg,jpeg,png,gif,xml,pdf" maxupload="2M" />
|
||||
</e107Filetypes>';
|
||||
|
||||
file_put_contents($this->filetypesFile, $content);
|
||||
|
||||
}
|
||||
|
||||
protected function _after()
|
||||
{
|
||||
unlink($this->exploitFile);
|
||||
unlink($this->filetypesFile);
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +100,7 @@
|
||||
foreach($isAllowedTest as $file)
|
||||
{
|
||||
$actual = $this->fl->isAllowedType($file['path']);
|
||||
// $this->assertEquals($file['expected'],$actual, "isAllowedType() failed on: ".$file['path']);
|
||||
$this->assertEquals($file['expected'],$actual, "isAllowedType() failed on: ".$file['path']);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -99,7 +99,9 @@ TMP;
|
||||
|
||||
$actual = $this->tp->toForm($db);
|
||||
|
||||
$this->assertEquals($orig, $actual);
|
||||
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
|
||||
}
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user