silverstripe-cms/tests/controller/RootURLControllerTest.php

19 lines
510 B
PHP
Raw Normal View History

<?php
/**
* @package cms
* @subpackage tests
*/
class RootURLControllerTest extends SapphireTest {
protected static $fixture_file = 'RootURLControllerTest.yml';
2016-03-08 21:50:55 +01:00
public function testGetHomepageLink() {
$default = $this->objFromFixture('Page', 'home');
2016-03-08 21:50:55 +01:00
SiteTree::config()->nested_urls = false;
$this->assertEquals('home', RootURLController::get_homepage_link());
Config::inst()->update('SiteTree', 'nested_urls', true);
$this->assertEquals('home', RootURLController::get_homepage_link());
}
2016-03-08 21:50:55 +01:00
}