Fix amend TinyMCE combined generator's unit test to be more lenient with encoding

This commit is contained in:
Christopher Joe 2017-09-28 10:47:02 +13:00 committed by Damian Mooyman
parent 90d0361a6c
commit 53b2fcd1ea

View File

@ -54,11 +54,7 @@ class TinyMCECombinedGeneratorTest extends SapphireTest
// Get config for this
/** @var TinyMCECombinedGenerator $generator */
$generator = Injector::inst()->create(TinyMCECombinedGenerator::class);
$this->assertEquals(
'_tinymce/tinymce-testconfig-6422b3814d.js',
$generator->generateFilename($c),
"Filename for config: " . json_encode($c->getAttributes()) . " should match expected value"
);
$this->assertRegExp('#_tinymce/tinymce-testconfig-[0-9a-z]{10,10}#', $generator->generateFilename($c));
$content = $generator->generateContent($c);
$this->assertContains(
"var baseURL = baseTag.length ? baseTag[0].baseURI : 'http://www.mysite.com/basedir/';\n",