MINOR get the files & error page tests on subsites passing

This commit is contained in:
Tom Rix 2010-03-30 20:43:34 +00:00
parent d36a6a3bde
commit 92976e8eff
3 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class ErrorPageSubsite extends DataObjectDecorator {
}
if($subsite) {
$subdomain = $subsite->Subdomain;
$subdomain = $subsite->Domains()->First()->Domain;
$subdomainPart = "-{$subdomain}";
}

View File

@ -6,6 +6,7 @@ class FileSubsitesTest extends SapphireTest {
function testTrivialFeatures() {
$this->assertTrue(is_array(singleton('FileSubsites')->extraStatics()));
$file = new File();
$file->Name = 'FileTitle';
$file->Title = 'FileTitle';
$this->assertEquals(' * FileTitle', $file->alternateTreeTitle());
$file->SubsiteID = $this->objFromFixture('Subsite', 'domaintest1')->ID;

View File

@ -51,7 +51,7 @@ class SiteTreeSubsitesTest extends SapphireTest {
$path = ErrorPage::get_filepath_for_errorcode(500);
$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);
}