2 namespace TYPO3\CMS\Frontend\Tests\Unit\Page;
50 'simple meta' => array(
52 'author' =>
'Markus Klein',
56 '<meta name="generator" content="TYPO3 CMS">',
57 '<meta name="author" content="Markus Klein">',
60 'simple meta xhtml' => array(
62 'author' =>
'Markus Klein',
66 '<meta name="generator" content="TYPO3 CMS" />',
67 '<meta name="author" content="Markus Klein" />',
70 'meta with nested stdWrap' => array(
72 'author' =>
'Markus ',
73 'author.' => array(
'stdWrap.' => array(
'wrap' =>
'|Klein'))
77 '<meta name="generator" content="TYPO3 CMS">',
78 '<meta name="author" content="Markus Klein">',
81 'httpEquivalent meta' => array(
83 'X-UA-Compatible' =>
'IE=edge,chrome=1',
84 'X-UA-Compatible.' => array(
'httpEquivalent' => 1)
88 '<meta name="generator" content="TYPO3 CMS">',
89 '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">'
92 'httpEquivalent meta xhtml' => array(
94 'X-UA-Compatible' =>
'IE=edge,chrome=1',
95 'X-UA-Compatible.' => array(
'httpEquivalent' => 1)
99 '<meta name="generator" content="TYPO3 CMS" />',
100 '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />'
103 'httpEquivalent meta xhtml new notation' => array(
105 'X-UA-Compatible' =>
'IE=edge,chrome=1',
106 'X-UA-Compatible.' => array(
'attribute' =>
'http-equiv')
110 '<meta name="generator" content="TYPO3 CMS" />',
111 '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />'
114 'refresh meta' => array(
120 '<meta name="generator" content="TYPO3 CMS">',
121 '<meta http-equiv="refresh" content="10">',
124 'refresh meta new notation' => array(
127 'refresh.' => array(
'attribute' =>
'http-equiv')
131 '<meta name="generator" content="TYPO3 CMS">',
132 '<meta http-equiv="refresh" content="10">',
135 'refresh meta new notation wins form old' => array(
138 'refresh.' => array(
'attribute' =>
'http-equiv-new')
142 '<meta name="generator" content="TYPO3 CMS">',
143 '<meta http-equiv-new="refresh" content="10">',
146 'meta with dot' => array(
148 'DC.author' =>
'Markus Klein',
152 '<meta name="generator" content="TYPO3 CMS">',
153 '<meta name="DC.author" content="Markus Klein">',
156 'meta with colon' => array(
158 'OG:title' =>
'Magic Tests',
162 '<meta name="generator" content="TYPO3 CMS">',
163 '<meta name="OG:title" content="Magic Tests">',
166 'different attribute name' => array(
168 'og:site_title' =>
'My TYPO3 site',
169 'og:site_title.' => array(
'attribute' =>
'property'),
173 '<meta name="generator" content="TYPO3 CMS">',
174 '<meta property="og:site_title" content="My TYPO3 site">',
177 'multi value attribute name' => array(
179 'og:locale:alternate.' => array(
180 'attribute' =>
'property',
189 '<meta name="generator" content="TYPO3 CMS">',
190 '<meta property="og:locale:alternate" content="nl_NL">',
191 '<meta property="og:locale:alternate" content="de_DE">',
194 'multi value attribute name (empty values are skipped)' => array(
196 'og:locale:alternate.' => array(
197 'attribute' =>
'property',
207 '<meta name="generator" content="TYPO3 CMS">',
208 '<meta property="og:locale:alternate" content="nl_NL">',
209 '<meta property="og:locale:alternate" content="de_DE">',
212 'meta with empty string value' => array(
218 '<meta name="generator" content="TYPO3 CMS">',
221 'meta with 0 value' => array(
227 '<meta name="generator" content="TYPO3 CMS">',
228 '<meta name="custom:key" content="0">',
244 $result = $this->pageGeneratorFixture->callGenerateMetaTagHtml($typoScript, $xhtml, $this->contentObjectRenderer);
245 $this->assertSame($expectedTags, $result);
254 'one simple search word' => array(
259 'one simple search word with standalone words' => array(
262 '[[:space:]]test[[:space:]]',
264 'two simple search words' => array(
265 array(
'test',
'test2'),
269 'two simple search words with standalone words' => array(
270 array(
'test',
'test2'),
272 '[[:space:]]test[[:space:]]|[[:space:]]test2[[:space:]]',
274 'word with regex chars' => array(
275 array(
'A \\ word with / a bunch of [] regex () chars .*'),
277 'A \\\\ word with \\/ a bunch of \\[\\] regex \\(\\) chars \\.\\*',
292 $_GET[
'sword_list'] = $searchWordGetParameters;
295 if ($enableStandaloneSearchWords) {
296 $GLOBALS[
'TSFE']->config = array(
'config' => array(
'sword_standAlone' => 1));
299 $this->pageGeneratorFixture->callInitializeSearchWordDataInTsfe();
300 $this->assertEquals(
$GLOBALS[
'TSFE']->sWordRegEx, $expectedRegex);