forked from Cavemanon/cavepaintings
setup tests
This commit is contained in:
@ -1,18 +1,23 @@
|
||||
<?php
|
||||
class SiteDescriptionTest {
|
||||
class SiteDescriptionTest extends ShimmiePHPUnitTestCase {
|
||||
function testSiteDescription() {
|
||||
$this->log_in_as_admin();
|
||||
$this->get_page('setup');
|
||||
$this->assert_title("Shimmie Setup");
|
||||
$this->set_field("_config_site_description", "A Shimmie testbed");
|
||||
$this->set_field("_config_site_keywords", "foo,bar,baz");
|
||||
$raw = $this->click("Save Settings");
|
||||
global $config, $page;
|
||||
$config->set_string("site_description", "A Shimmie testbed");
|
||||
$this->get_page("post/list");
|
||||
$this->assertContains(
|
||||
'<meta name="description" content="A Shimmie testbed">',
|
||||
$page->html_headers
|
||||
);
|
||||
}
|
||||
|
||||
$header = '<meta name="description" content="A Shimmie testbed">';
|
||||
$this->assertTrue(strpos($raw, $header) > 0);
|
||||
$this->assertTrue(strpos($raw, "foo") > 0);
|
||||
|
||||
$this->log_out();
|
||||
function testSiteKeywords() {
|
||||
global $config, $page;
|
||||
$config->set_string("site_keywords", "foo,bar,baz");
|
||||
$this->get_page("post/list");
|
||||
$this->assertContains(
|
||||
'<meta name="keywords" content="foo,bar,baz">',
|
||||
$page->html_headers
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user