mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
2ef72b374c
Replaced deprecated DataObjectDecorator with DataExtension Fixed hard crashes in the cms Updated to support new LeftAndMain template structure Made the subsites model admin functional Moved the LeftAndMain_Menu template up a directory so it overrides the core Fixed some errors caused by changes to the framework Re-organized the code folder Fixed permission issue causing to default to first subsite regardless if it is the default or not Fixed crashes on the subsite virtual page when creating/editing Removed toDropdownMap() calls replacing with map() Fixed the URLSegment field on subsites Fixed error when detecting subsite for a domain Improved styles on the subsite dropdown Updated LeftAndMain_Subsites.js to work with jQuery entwine Started porting the SubsitesTreeDropdownField.js to use jQuery entwine and work with the new TreeDropdownField.js Fixed issue causing crash when viewing a page who is linked to by a subsite virtual page Removed unused methods on SubsitesTreeDropdownField.js Re-added classes that were moved Fixed hard crash after saving caused by the many_many definition on SiteTreeSubsites Replaced deprecated DataObjectSet creation with ArrayList Compatibility fixes with SS 3.0 beta 2 Fixed crash in cms caused by no parameter being passed to the SubsiteReportWrapper constructor Proper fix for report wrapper Removed table list field in favor of a basic grid field Fixed updateCMSFields() for file subsites Migrated translations to yml Fixed issue causing the current page to not get cleared when changing subsites in the cms Fixed virtual page icon Fixed language files issue
25 lines
956 B
PHP
25 lines
956 B
PHP
<?php
|
|
|
|
class GroupSubsitesTest extends SapphireTest {
|
|
static $fixture_file = 'subsites/tests/SubsiteTest.yml';
|
|
|
|
protected $requireDefaultRecordsFrom = array('GroupSubsites');
|
|
|
|
function testTrivialFeatures() {
|
|
$this->assertTrue(is_array(singleton('GroupSubsites')->extraStatics()));
|
|
$this->assertTrue(is_array(singleton('GroupSubsites')->providePermissions()));
|
|
$this->assertTrue(singleton('Group')->getCMSFields() instanceof FieldList);
|
|
}
|
|
|
|
function testAlternateTreeTitle() {
|
|
$group = new Group();
|
|
$group->Title = 'The A Team';
|
|
$group->AccessAllSubsites = true;
|
|
$this->assertEquals($group->TreeTitle(), 'The A Team <i>(global group)</i>');
|
|
$group->AccessAllSubsites = false;
|
|
$group->write();
|
|
$group->Subsites()->add($this->objFromFixture('Subsite', 'domaintest1'));
|
|
$group->Subsites()->add($this->objFromFixture('Subsite', 'domaintest2'));
|
|
$this->assertEquals($group->TreeTitle(), 'The A Team <i>(Test 1, Test 2)</i>');
|
|
}
|
|
} |