diff --git a/admin/thirdparty/tinymce/tiny_mce_gzip.php b/admin/thirdparty/tinymce/tiny_mce_gzip.php
index 9e22e21ab..2b6e600ad 100755
--- a/admin/thirdparty/tinymce/tiny_mce_gzip.php
+++ b/admin/thirdparty/tinymce/tiny_mce_gzip.php
@@ -9,8 +9,8 @@
* Contributing: http://tinymce.moxiecode.com/contributing
*/
-$frameworkPath = rtrim(dirname(dirname(dirname(dirname(__FILE__)))), DIRECTORY_SEPARATOR);
-$basePath = rtrim(dirname($frameworkPath), DIRECTORY_SEPARATOR);
+$frameworkPath = defined('FRAMEWORK_PATH') ? FRAMEWORK_PATH : rtrim(dirname(dirname(dirname(dirname(__FILE__)))), DIRECTORY_SEPARATOR);
+$basePath = defined('BASE_PATH') ? BASE_PATH : rtrim(dirname($frameworkPath), DIRECTORY_SEPARATOR);
// require composers autoloader
if(file_exists($basePath . '/vendor/autoload.php')) {
diff --git a/templates/SilverStripe/Control/Controller.ss b/templates/SilverStripe/Control/Controller.ss
index 1b0a27ad9..40e172029 100644
--- a/templates/SilverStripe/Control/Controller.ss
+++ b/templates/SilverStripe/Control/Controller.ss
@@ -6,7 +6,7 @@
$MetaTags
- <% require css('framework/client/dist/styles/debug.css') %>
+ <% require themedCSS('client/dist/styles/debug') %>
diff --git a/tests/control/ControllerTest.php b/tests/control/ControllerTest.php
index 6751f5f62..dc9279a22 100644
--- a/tests/control/ControllerTest.php
+++ b/tests/control/ControllerTest.php
@@ -29,6 +29,7 @@ class ControllerTest extends FunctionalTest {
public function setUp() {
parent::setUp();
+ Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', '/');
$this->depSettings = Deprecation::dump_settings();
}
diff --git a/tests/control/DirectorTest.php b/tests/control/DirectorTest.php
index 833d4f1f8..dc99e6847 100644
--- a/tests/control/DirectorTest.php
+++ b/tests/control/DirectorTest.php
@@ -63,6 +63,8 @@ class DirectorTest extends SapphireTest {
$this->originalProtocolHeaders[$header] = $_SERVER[$header];
}
}
+
+ Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', '/');
}
public function tearDown() {
@@ -197,16 +199,6 @@ class DirectorTest extends SapphireTest {
'http://www.example.org/subfolder/test',
Director::absoluteURL('subfolder/test', Director::BASE)
);
-
- // Setting it to false restores functionality
- Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', false);
- $_SERVER['REQUEST_URI'] = $rootURL;
- $this->assertEquals(BASE_URL.'/', Director::baseURL());
- $this->assertEquals($rootURL.BASE_URL.'/', Director::absoluteBaseURL(BASE_URL));
- $this->assertEquals(
- $rootURL.BASE_URL . '/subfolder/test',
- Director::absoluteURL('subfolder/test')
- );
}
/**
@@ -393,7 +385,7 @@ class DirectorTest extends SapphireTest {
}
public function testForceSSLProtectsEntireSite() {
- $_SERVER['REQUEST_URI'] = Director::baseURL() . 'admin';
+ $_SERVER['REQUEST_URI'] = '/admin';
$output = Director::forceSSL();
$this->assertEquals($output, 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
diff --git a/tests/css/forms/RequirementsTest_a.css b/tests/css/forms/RequirementsTest_a.css
new file mode 100644
index 000000000..d54285f0c
--- /dev/null
+++ b/tests/css/forms/RequirementsTest_a.css
@@ -0,0 +1 @@
+.a {color: #f00;}
diff --git a/tests/css/forms/RequirementsTest_b.css b/tests/css/forms/RequirementsTest_b.css
new file mode 100644
index 000000000..3747a0e8f
--- /dev/null
+++ b/tests/css/forms/RequirementsTest_b.css
@@ -0,0 +1 @@
+.b {color: #0ff;}
diff --git a/tests/css/forms/RequirementsTest_c.css b/tests/css/forms/RequirementsTest_c.css
new file mode 100644
index 000000000..098858dbc
--- /dev/null
+++ b/tests/css/forms/RequirementsTest_c.css
@@ -0,0 +1 @@
+.c {color: #0ff;}
diff --git a/tests/dev/DeprecationTest.php b/tests/dev/DeprecationTest.php
index 541b45f8f..8ae59cdee 100644
--- a/tests/dev/DeprecationTest.php
+++ b/tests/dev/DeprecationTest.php
@@ -105,7 +105,7 @@ class DeprecationTest extends SapphireTest {
}
protected function callThatOriginatesFromFramework() {
- $this->assertEquals(DeprecationTest_Deprecation::get_module(), FRAMEWORK_DIR);
+ $this->assertEquals(DeprecationTest_Deprecation::get_module(), basename(FRAMEWORK_PATH));
$this->assertNull(Deprecation::notice('2.0', 'Deprecation test passed'));
}
diff --git a/tests/filesystem/AssetAdapterTest.php b/tests/filesystem/AssetAdapterTest.php
index 43d282a56..b15586efe 100644
--- a/tests/filesystem/AssetAdapterTest.php
+++ b/tests/filesystem/AssetAdapterTest.php
@@ -5,6 +5,7 @@ use SilverStripe\Assets\Flysystem\PublicAssetAdapter;
use SilverStripe\Assets\Filesystem;
use SilverStripe\Assets\File;
use SilverStripe\Dev\SapphireTest;
+use SilverStripe\Core\Config\Config;
class AssetAdapterTest extends SapphireTest {
@@ -18,6 +19,7 @@ class AssetAdapterTest extends SapphireTest {
$this->rootDir = ASSETS_PATH . '/AssetAdapterTest';
Filesystem::makeFolder($this->rootDir);
+ Config::inst()->update('SilverStripe\\Control\\Director', 'alternate_base_url', '/');
$this->originalServer = $_SERVER;
}
diff --git a/tests/forms/HTMLEditorConfigTest.php b/tests/forms/HTMLEditorConfigTest.php
index 99532187e..3cffa50be 100644
--- a/tests/forms/HTMLEditorConfigTest.php
+++ b/tests/forms/HTMLEditorConfigTest.php
@@ -86,14 +86,14 @@ class HTMLEditorConfigTest extends SapphireTest {
// Test plugins included via gzip compresser
HTMLEditorField::config()->update('use_gzip', true);
$this->assertEquals(
- 'framework/admin/thirdparty/tinymce/tiny_mce_gzip.php?js=1&plugins=plugin4,plugin5&themes=modern&languages=es&diskcache=true&src=true',
+ ADMIN_THIRDPARTY_DIR . '/tinymce/tiny_mce_gzip.php?js=1&plugins=plugin4,plugin5&themes=modern&languages=es&diskcache=true&src=true',
$c->getScriptURL()
);
// If gzip is disabled only the core plugin is loaded
HTMLEditorField::config()->remove('use_gzip');
$this->assertEquals(
- 'framework/admin/thirdparty/tinymce/tinymce.min.js',
+ ADMIN_THIRDPARTY_DIR . '/tinymce/tinymce.min.js',
$c->getScriptURL()
);
}
diff --git a/tests/forms/HTMLEditorFieldTest.php b/tests/forms/HTMLEditorFieldTest.php
index ae16043ce..3b8d4b172 100644
--- a/tests/forms/HTMLEditorFieldTest.php
+++ b/tests/forms/HTMLEditorFieldTest.php
@@ -53,7 +53,7 @@ class HTMLEditorFieldTest extends FunctionalTest {
// Create a test files for each of the fixture references
$files = File::get()->exclude('ClassName', 'SilverStripe\\Assets\\Folder');
foreach($files as $file) {
- $fromPath = BASE_PATH . '/framework/tests/forms/images/' . $file->Name;
+ $fromPath = FRAMEWORK_PATH . '/tests/forms/images/' . $file->Name;
$destPath = AssetStoreTest_SpyStore::getLocalPath($file); // Only correct for test asset store
Filesystem::makeFolder(dirname($destPath));
copy($fromPath, $destPath);
diff --git a/tests/forms/RequirementsTest.php b/tests/forms/RequirementsTest.php
index b011f046f..70b882f39 100644
--- a/tests/forms/RequirementsTest.php
+++ b/tests/forms/RequirementsTest.php
@@ -162,12 +162,12 @@ class RequirementsTest extends SapphireTest {
]);
$backend->javascript($basePath . '/RequirementsTest_b.js');
$result = $backend->includeInHTML(self::$html_template);
- $this->assertContains(
- '