mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-09-30 05:09:15 +02:00
MINOR get the files & error page tests on subsites passing
This commit is contained in:
parent
d36a6a3bde
commit
92976e8eff
@ -22,7 +22,7 @@ class ErrorPageSubsite extends DataObjectDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($subsite) {
|
if($subsite) {
|
||||||
$subdomain = $subsite->Subdomain;
|
$subdomain = $subsite->Domains()->First()->Domain;
|
||||||
$subdomainPart = "-{$subdomain}";
|
$subdomainPart = "-{$subdomain}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ class FileSubsitesTest extends SapphireTest {
|
|||||||
function testTrivialFeatures() {
|
function testTrivialFeatures() {
|
||||||
$this->assertTrue(is_array(singleton('FileSubsites')->extraStatics()));
|
$this->assertTrue(is_array(singleton('FileSubsites')->extraStatics()));
|
||||||
$file = new File();
|
$file = new File();
|
||||||
|
$file->Name = 'FileTitle';
|
||||||
$file->Title = 'FileTitle';
|
$file->Title = 'FileTitle';
|
||||||
$this->assertEquals(' * FileTitle', $file->alternateTreeTitle());
|
$this->assertEquals(' * FileTitle', $file->alternateTreeTitle());
|
||||||
$file->SubsiteID = $this->objFromFixture('Subsite', 'domaintest1')->ID;
|
$file->SubsiteID = $this->objFromFixture('Subsite', 'domaintest1')->ID;
|
||||||
|
@ -51,7 +51,7 @@ class SiteTreeSubsitesTest extends SapphireTest {
|
|||||||
$path = ErrorPage::get_filepath_for_errorcode(500);
|
$path = ErrorPage::get_filepath_for_errorcode(500);
|
||||||
|
|
||||||
$static_path = Object::get_static('ErrorPage', 'static_filepath');
|
$static_path = Object::get_static('ErrorPage', 'static_filepath');
|
||||||
$expected_path = $static_path . '/error-500-'.$subsite1->Subdomain.'.html';
|
$expected_path = $static_path . '/error-500-'.$subsite1->Domains()->First()->Domain.'.html';
|
||||||
$this->assertEquals($expected_path, $path);
|
$this->assertEquals($expected_path, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user