1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-17 12:01:05 +02:00

Fixes #4200 - check theme version is compatible and disable installation if necessary.

This commit is contained in:
Cameron
2020-07-01 13:00:34 -07:00
parent 5f58f8f59d
commit 582bd3f72c
5 changed files with 52 additions and 6 deletions

View File

@@ -1089,12 +1089,28 @@ while($row = $sql->fetch())
{
}
*/
public function testFilter()
{
$tests = array(
0 => array('input' => 'test123 xxx', 'mode' => 'w', 'expected' => 'test123xxx'),
1 => array('input' => 'test123 xxx', 'mode' => 'd', 'expected' => '123'),
2 => array('input' => 'test123 xxx', 'mode' => 'wd', 'expected' => 'test123xxx'),
3 => array('input' => 'test123 xxx', 'mode' => 'wds', 'expected' => 'test123 xxx'),
4 => array('input' => 'test123 xxx.jpg', 'mode' => 'file', 'expected' => 'test123-xxx.jpg'),
5 => array('input' => '2.1.4 (test)', 'mode' => 'version', 'expected' => '2.1.4'),
);
foreach($tests as $var)
{
$result = $this->tp->filter($var['input'],$var['mode']);
$this->assertEquals($var['expected'],$result);
}
}
*/
public function testCleanHtml()
{
global $_E107;