1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-28 08:12:42 +01: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:
Nick Liu 2018-11-01 19:31:04 -05:00
parent 556aea02ea
commit f27636ff14
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -105,10 +105,15 @@ TMP;
$db = $this->tp->toDB($orig);
e107::wysiwyg('default');
e107::getConfig()->updatePref('wysiwyg', true);
$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';';
$this->assertEquals($expected, $actual);
}