assertEquals('Home Page', $this->get('/')->getBody()); $this->assertEquals('Home Page', $this->get('/home/index/')->getBody()); $this->assertEquals('Home Page', $this->get('/home/second-index/')->getBody()); $this->assertEquals('Second Level Page', $this->get('/home/second-level/')->getBody()); $this->assertEquals('Second Level Page', $this->get('/home/second-level/index/')->getBody()); $this->assertEquals('Second Level Page', $this->get('/home/second-level/second-index/')->getBody()); $this->assertEquals('Third Level Page', $this->get('/home/second-level/third-level/')->getBody()); $this->assertEquals('Third Level Page', $this->get('/home/second-level/third-level/index/')->getBody()); $this->assertEquals('Third Level Page', $this->get('/home/second-level/third-level/second-index/')->getBody()); SiteTree::disable_nested_urls(); $this->assertEquals('Home Page', $this->get('/')->getBody()); $this->assertEquals('Home Page', $this->get('/home/')->getBody()); $this->assertEquals('Home Page', $this->get('/home/second-index/')->getBody()); $this->assertEquals('Second Level Page', $this->get('/second-level/')->getBody()); $this->assertEquals('Second Level Page', $this->get('/second-level/index/')->getBody()); $this->assertEquals('Second Level Page', $this->get('/second-level/second-index/')->getBody()); $this->assertEquals('Third Level Page', $this->get('/third-level/')->getBody()); $this->assertEquals('Third Level Page', $this->get('/third-level/index/')->getBody()); $this->assertEquals('Third Level Page', $this->get('/third-level/second-index/')->getBody()); } } class ContentControllerTest_Page extends Page { public static $allowed_actions = array ( 'second_index' ); } class ContentControllerTest_Page_Controller extends Page_Controller { public function index() { return $this->Title; } public function second_index() { return $this->index(); } }