for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class SitemapPageTest extends FunctionalTest {
protected static $fixture_file = 'SitemapPageTest.yml';
protected static $use_draft_site = true;
public function setUp()
{
parent::setUp();
Config::inst()->update('SSViewer', 'theme', 'starter');
}
/**
* Note: this test depends on the "starter" theme being installed and configured as default
*/
public function testSitemapShowsNavigationTitleNotNormalTitle() {
$response = $this->get('sitemap');
$parser = new CSSContentParser($response->getBody());
$elements = $parser->getBySelector('.sitemap li.first .sitemap-link');
$this->assertNotEmpty($elements);
$this->assertEquals('Top page nav 1', (string) $elements[0]);