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