for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Syntax 'keyword_source' tests for the description plugin.
*
* @group plugin_description
* @group plugins
* @author Mark C. Prins <[email protected]>
* @noinspection AutoloadingIssuesInspection
* @phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
*/
class syntax_plugin_description_test extends DokuWikiTest
{
protected $pluginsEnabled = array('description');
* copy data and add pages to the index.
public static function setUpBeforeClass(): void
parent::setUpBeforeClass();
TestUtils::rcopy(TMP_DIR, __DIR__ . '/data/');
}
public function setUp(): void
parent::setUp();
global $conf;
$conf['allowdebug'] = 1;
$conf['keyword_source'] = 'syntax';
* @throws Exception if anything goes wrong
final public function testHeaderFromSyntax(): void
$index = plugin_load('syntax', 'description');
$this->assertTrue($index instanceof syntax_plugin_description);
$request = new TestRequest();
$response = $request->get(array('id' => 'wiki:syntax'));
// check description meta headers, set from file
$this->assertStringContainsString(
'Place the page description here',
$response->queryHTML('meta[name="description"]')->attr('content')
);