| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class BaseSubsiteTest extends SapphireTest |
||
| 11 | { |
||
| 12 | protected function setUp() |
||
| 13 | { |
||
| 14 | parent::setUp(); |
||
| 15 | |||
| 16 | SubsiteState::singleton()->setUseSessions(true); |
||
| 17 | Config::modify()->set(Subsite::class, 'write_hostmap', false); |
||
| 18 | Subsite::$force_subsite = null; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Avoid subsites filtering on fixture fetching. |
||
| 23 | * @param string $className |
||
| 24 | * @param string $identifier |
||
| 25 | * @return \SilverStripe\ORM\DataObject |
||
| 26 | */ |
||
| 27 | protected function objFromFixture($className, $identifier) |
||
| 28 | { |
||
| 29 | Subsite::disable_subsite_filter(true); |
||
| 30 | $obj = parent::objFromFixture($className, $identifier); |
||
| 31 | Subsite::disable_subsite_filter(false); |
||
| 32 | |||
| 33 | return $obj; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Tests the initial state of disable_subsite_filter |
||
| 38 | */ |
||
| 39 | public function testDisableSubsiteFilter() |
||
| 42 | } |
||
| 43 | } |
||
| 44 |