2011-03-18 04:17:04 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2011-03-22 10:47:26 +01:00
|
|
|
* @package cms
|
2011-03-18 04:17:04 +01:00
|
|
|
* @subpackage tests
|
|
|
|
*/
|
|
|
|
class RootURLControllerTest extends SapphireTest {
|
2013-03-18 11:47:15 +01:00
|
|
|
protected static $fixture_file = 'RootURLControllerTest.yml';
|
2011-03-18 04:17:04 +01:00
|
|
|
|
|
|
|
public function testGetHomepageLink() {
|
|
|
|
$default = $this->objFromFixture('Page', 'home');
|
|
|
|
|
2013-03-18 11:47:15 +01:00
|
|
|
SiteTree::config()->nested_urls = false;
|
2011-03-18 04:17:04 +01:00
|
|
|
$this->assertEquals('home', RootURLController::get_homepage_link());
|
2013-03-18 11:47:15 +01:00
|
|
|
Config::inst()->update('SiteTree', 'nested_urls', true);
|
2011-03-18 04:17:04 +01:00
|
|
|
$this->assertEquals('home', RootURLController::get_homepage_link());
|
|
|
|
}
|
|
|
|
|
2012-04-12 09:23:20 +02:00
|
|
|
}
|