1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

Deprecated some old themeHandler methods in favor of e_theme class. Should see a speed increase in theme manager.

This commit is contained in:
Cameron
2020-12-22 09:29:12 -08:00
parent 812b7cbcb3
commit 1433646305
2 changed files with 119 additions and 138 deletions

View File

@@ -20,7 +20,7 @@
try
{
$this->tm = $this->make('e_theme');
$this->tm->__construct();
}
catch (Exception $e)
{
@@ -176,8 +176,47 @@
}
/*
public function testGetThemesMigrations()
{
$thm = e107::getSingleton('themeHandler');
$tests = array(null, 'id', 'xml');
foreach($tests as $mode)
{
$old = $thm->getThemes($mode);
$this->tm->__construct(['force'=>true]);
$new = $this->tm->getThemes($mode);
$this->assertSame($old,$new);
}
}
*/
/*
public function testThemeInfoMigration()
{
$thm = e107::getSingleton('themeHandler');
$name = 'bootstrap3';
$this->tm->__construct(['themedir'=>$name, 'force'=>true]);
$old = $thm->getThemeInfo($name);
$new = $this->tm->get();
$this->assertNotEmpty($new, "New parsing of ".$name." returned null");
$this->assertNotEmpty($old, "Old parsing of ".$name." returned null");
// unset($new['id']); // introduced.
$this->assertSame($old, $new);
}
*/
}