silverstripe-subsites/tests/BaseSubsiteTest.php
2013-04-30 15:50:45 +12:00

22 lines
467 B
PHP

<?php
class BaseSubsiteTest extends SapphireTest {
/**
* 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;
}
/**
* Tests the initial state of disable_subsite_filter
*/
function testDisableSubsiteFilter() {
$this->assertFalse(Subsite::$disable_subsite_filter);
}
}