Feature #22992 » 14860_test.diff
tests/t3lib/t3lib_pagerendererTest.php (working copy) | ||
---|---|---|
}
|
||
/**
|
||
* test add meta tag
|
||
* test add meta tags
|
||
*
|
||
*/
|
||
public function testAddMetaTag() {
|
||
public function testAddMetaTags() {
|
||
$expectedReturnValue = '<meta name="author" content="Anna Lyse">';
|
||
$this->fixture->addMetaTag('<meta name="author" content="Anna Lyse">');
|
||
$expectedReturnValues = array(
|
||
'<meta name="author" content="Anna Lyse" />',
|
||
'<meta name="author" content="John Doe" lang="en" />',
|
||
'<meta name="robots" content="noindex" />',
|
||
'<meta name="DC.format" content="text/html" scheme="DCTERMS.IMT" />',
|
||
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',
|
||
'<meta http-equiv="refresh" content="5; URL=http://www.example.org/" />',
|
||
);
|
||
$this->fixture->addMetaTag('<meta name="author" content="Anna Lyse" />');
|
||
$this->fixture->addMetaTag('author', 'John Doe', array('lang' => 'en'));
|
||
$this->fixture->addMetaTag('robots', 'noindex');
|
||
$this->fixture->addMetaTag('DC.format', 'text/html', array('scheme' => 'DCTERMS.IMT'));
|
||
$this->fixture->addMetaTagHttpEquiv('Content-Type', 'text/html; charset=utf-8');
|
||
$this->fixture->addMetaTagHttpEquiv('refresh', '5; URL=http://www.example.org/');
|
||
$out = $this->fixture->render();
|
||
$this->assertContains(
|
||
$expectedReturnValue,
|
||
$out
|
||
);
|
||
foreach ($expectedReturnValues as $metaTag) {
|
||
$this->assertContains(
|
||
$metaTag,
|
||
$out,$out
|
||
);
|
||
}
|
||
}
|
||
/**
|
- « Previous
- 1
- 2
- 3
- 4
- Next »