2013-01-03 14:46:56 +01:00
|
|
|
<?php
|
2016-09-22 16:38:29 +02:00
|
|
|
|
|
|
|
use SilverStripe\Dev\SapphireTest;
|
2013-01-03 14:46:56 +01:00
|
|
|
class BaseSubsiteTest extends SapphireTest {
|
2013-07-05 03:57:58 +02:00
|
|
|
|
|
|
|
function setUp() {
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
Subsite::$use_session_subsiteid = true;
|
|
|
|
}
|
|
|
|
|
2013-01-03 14:46:56 +01:00
|
|
|
/**
|
|
|
|
* Avoid subsites filtering on fixture fetching.
|
|
|
|
*/
|
|
|
|
function objFromFixture($class, $id) {
|
|
|
|
Subsite::disable_subsite_filter(true);
|
|
|
|
$obj = parent::objFromFixture($class, $id);
|
|
|
|
Subsite::disable_subsite_filter(false);
|
|
|
|
|
|
|
|
return $obj;
|
|
|
|
}
|
2013-04-30 05:50:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tests the initial state of disable_subsite_filter
|
|
|
|
*/
|
|
|
|
function testDisableSubsiteFilter() {
|
|
|
|
$this->assertFalse(Subsite::$disable_subsite_filter);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|