From 6da36a9ed102080a3b6957b86f7554492b5a6129 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Wed, 2 Nov 2016 09:11:35 +1300 Subject: [PATCH] Fix some issues with tests --- tests/bootstrap/init.php | 4 ++++ tests/forms/HTMLEditorConfigTest.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap/init.php b/tests/bootstrap/init.php index be75f5a90..59f0ed636 100644 --- a/tests/bootstrap/init.php +++ b/tests/bootstrap/init.php @@ -19,3 +19,7 @@ ini_set('display_errors', 1); if(!file_exists(BASE_PATH . '/assets')) { mkdir(BASE_PATH . '/assets', 02775); } + +if (empty($_SERVER['HTTP_HOST'])) { + $_SERVER['HTTP_HOST'] = 'localhost'; +} diff --git a/tests/forms/HTMLEditorConfigTest.php b/tests/forms/HTMLEditorConfigTest.php index 3cffa50be..156534c5f 100644 --- a/tests/forms/HTMLEditorConfigTest.php +++ b/tests/forms/HTMLEditorConfigTest.php @@ -76,7 +76,7 @@ class HTMLEditorConfigTest extends SapphireTest { // Plugin specified with standard location $this->assertContains('plugin4', array_keys($plugins)); $this->assertEquals( - 'http://mysite.com/subdir/framework/admin/thirdparty/tinymce/plugins/plugin4/plugin.min.js', + 'http://mysite.com/subdir/'.ADMIN_THIRDPARTY_DIR.'/tinymce/plugins/plugin4/plugin.min.js', $plugins['plugin4'] );