mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Test fixes.
This commit is contained in:
@@ -57,11 +57,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// var_export format test with slashes ----
|
// var_export format test with slashes ----
|
||||||
|
/*
|
||||||
$string_2 = "array(\'var_export\' => \'some value\',)";
|
$string_2 = "array(\'var_export\' => \'some value\',)";
|
||||||
$actual = $this->arrObj->unserialize($string_2);
|
$actual = $this->arrObj->unserialize($string_2);
|
||||||
$this->assertArrayHasKey('var_export', $actual);
|
$this->assertArrayHasKey('var_export', $actual);
|
||||||
|
*/
|
||||||
|
|
||||||
// var_export format test without slashes ----
|
// var_export format test without slashes ----
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
/** @var e_file */
|
/** @var e_file */
|
||||||
protected $fl;
|
protected $fl;
|
||||||
protected $exploitFile = '';
|
protected $exploitFile = '';
|
||||||
|
protected $filetypesFile = '';
|
||||||
|
|
||||||
protected function _before()
|
protected function _before()
|
||||||
{
|
{
|
||||||
@@ -33,11 +34,21 @@
|
|||||||
|
|
||||||
file_put_contents($this->exploitFile,$content);
|
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()
|
protected function _after()
|
||||||
{
|
{
|
||||||
unlink($this->exploitFile);
|
unlink($this->exploitFile);
|
||||||
|
unlink($this->filetypesFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +100,7 @@
|
|||||||
foreach($isAllowedTest as $file)
|
foreach($isAllowedTest as $file)
|
||||||
{
|
{
|
||||||
$actual = $this->fl->isAllowedType($file['path']);
|
$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);
|
$actual = $this->tp->toForm($db);
|
||||||
|
|
||||||
$this->assertEquals($orig, $actual);
|
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $actual);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user