mirror of
https://github.com/e107inc/e107.git
synced 2025-08-15 19:14:09 +02:00
Replaced global $menu_pref usage. Updated tests.
This commit is contained in:
@@ -186,6 +186,11 @@
|
||||
$actual = $this->dateObj->computeLapse($newer, $time, false, true, 'long');
|
||||
$this->assertEquals("Just now", $actual);
|
||||
|
||||
// Test "Just now" on identical timestamps
|
||||
$actual = $this->dateObj->computeLapse($older, $older, false, true, 'long');
|
||||
$this->assertEquals("Just now", $actual);
|
||||
|
||||
|
||||
// XXX Improve output
|
||||
/* $newer = strtotime("18 months ago");
|
||||
$actual = $this->dateObj->computeLapse($newer, time(), false, true, 'short');
|
||||
|
@@ -145,10 +145,16 @@ while($row = $sql->fetch())
|
||||
|
||||
public function testParseTemplateWithCoreAddonShortcodes()
|
||||
{
|
||||
$shortcodeObject = e107::getScBatch('online', true);
|
||||
|
||||
$expected = "<a href=''>lost</a>";
|
||||
$result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', false, $shortcodeObject);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
e107::getPlugin()->uninstall('online');
|
||||
$sc = e107::getScParser();
|
||||
$sc->__construct();
|
||||
$sc->clearRegistered();
|
||||
// $sc->resetscClass('online', null);
|
||||
|
||||
$result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', false);
|
||||
$this->assertEmpty($result);
|
||||
@@ -162,11 +168,11 @@ while($row = $sql->fetch())
|
||||
$result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', false, $shortcodeObject);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', false);
|
||||
$result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', true);
|
||||
$this->assertEmpty($result);
|
||||
|
||||
$result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', true);
|
||||
$this->assertEquals($expected, $result);
|
||||
// $result = $this->tp->parseTemplate('{ONLINE_MEMBER_PAGE}', true);
|
||||
// $this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
public function testParseTemplateWithNonCoreShortcodes()
|
||||
|
Reference in New Issue
Block a user