This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/site_description/test.php

31 lines
843 B
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
class SiteDescriptionTest extends ShimmiePHPUnitTestCase
{
2024-01-15 14:31:51 +00:00
public function testSiteDescription(): void
{
global $config, $page;
$config->set_string("site_description", "A Shimmie testbed");
$this->get_page("post/list");
2019-11-21 17:16:11 +00:00
$this->assertStringContainsString(
"<meta name='description' content='A Shimmie testbed' />",
(string)$page->get_all_html_headers()
);
}
2024-01-15 14:31:51 +00:00
public function testSiteKeywords(): void
{
global $config, $page;
$config->set_string("site_keywords", "foo,bar,baz");
$this->get_page("post/list");
2019-11-21 17:16:11 +00:00
$this->assertStringContainsString(
"<meta name='keywords' content='foo,bar,baz' />",
(string)$page->get_all_html_headers()
);
}
}