mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Fixed race condition in e_parseTest::testToForm()
Other tests have been meddling with the e107::wysiwyg() global state e_parseTest::testToForm() now considers two outcomes of the e107::wysiwyg() state.
This commit is contained in:
@@ -105,10 +105,15 @@ TMP;
|
|||||||
|
|
||||||
$db = $this->tp->toDB($orig);
|
$db = $this->tp->toDB($orig);
|
||||||
|
|
||||||
|
e107::wysiwyg('default');
|
||||||
|
e107::getConfig()->updatePref('wysiwyg', true);
|
||||||
$actual = $this->tp->toForm($db);
|
$actual = $this->tp->toForm($db);
|
||||||
|
$expected = 'lr.src = window._lr.url %2B '/Scripts/api.js';';
|
||||||
|
$this->assertEquals($expected, $actual);
|
||||||
|
|
||||||
|
e107::getConfig()->updatePref('wysiwyg', false);
|
||||||
|
$actual = $this->tp->toForm($db);
|
||||||
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
||||||
|
|
||||||
$this->assertEquals($expected, $actual);
|
$this->assertEquals($expected, $actual);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user