mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Removing bits of test that broke because of removal of related pages
This commit is contained in:
parent
0247765563
commit
ffaaed072f
@ -92,13 +92,13 @@ class SiteTreeSubsites extends DataExtension {
|
||||
$subsite = $this->owner->Subsite();
|
||||
if($subsite && $subsite->ID) {
|
||||
$baseUrl = 'http://' . $subsite->domain() . '/';
|
||||
|
||||
$baseLink = Controller::join_links (
|
||||
$baseUrl,
|
||||
(SiteTree::nested_urls() && $this->owner->ParentID ? $this->owner->Parent()->RelativeLink(true) : null)
|
||||
);
|
||||
|
||||
$url = (strlen($baseLink) > 36 ? "..." .substr($baseLink, -32) : $baseLink);
|
||||
|
||||
$urlsegment = $fields->dataFieldByName('URLSegment');
|
||||
$urlsegment->setURLPrefix($url);
|
||||
}
|
||||
|
@ -53,14 +53,8 @@ class SubsiteTest extends BaseSubsiteTest {
|
||||
$this->assertEquals($subsite->ID, $siteHome->SubsiteID,
|
||||
'createInstance() copies existing pages retaining the same URLSegment'
|
||||
);
|
||||
$this->assertEquals($siteHome->MasterPageID, $tmplHome->ID, 'Check master page value');
|
||||
|
||||
// Check linking of child pages
|
||||
$siteStaff = DataObject::get_one('Page', "\"URLSegment\" = '" . Convert::raw2sql($tmplStaff->URLSegment) . "'");
|
||||
$this->assertEquals($siteStaff->MasterPageID, $tmplStaff->ID);
|
||||
|
||||
Subsite::changeSubsite(0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -240,13 +234,10 @@ class SubsiteTest extends BaseSubsiteTest {
|
||||
$this->assertEquals('three.mysite.example.org',
|
||||
$this->objFromFixture('Subsite','domaintest3')->domain());
|
||||
|
||||
|
||||
$this->assertEquals($_SERVER['HTTP_HOST'], singleton('Subsite')->PrimaryDomain);
|
||||
$this->assertEquals('http://'.$_SERVER['HTTP_HOST'].Director::baseURL(), singleton('Subsite')->absoluteBaseURL());
|
||||
|
||||
|
||||
$_SERVER['HTTP_HOST'] = $originalHTTPHost;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user