‪TYPO3CMS  9.5
TypoScriptParserTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
20 class ‪TypoScriptParserTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
21 {
28  public function ‪hasFlakyReferences()
29  {
30  $typoScript = implode(LF, [
31  '',
32  '[GLOBAL]',
33  'RTE.default.proc.entryHTMLparser_db = 1',
34  'RTE.default.proc.entryHTMLparser_db {',
35  'tags {',
36  '}',
37  '}',
38 
39  'RTE.default.FE < RTE.default',
40 
41  'RTE.default.enableWordClean = 1',
42  'RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db',
43  '',
44  ]);
45 
46  $typoScriptParser = new \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser();
47  $typoScriptParser->parse($typoScript);
48  $res = ['TSconfig' => $typoScriptParser->setup];
49  // The issue only pops up if the TS was cached. This call simulates the unserialize(serialize())
50  // call done by the cache framework to trigger the issue.
51  $res = unserialize(serialize($res));
52  $res['TSconfig']['RTE.']['default.']['FE.']['proc.']['entryHTMLparser_db.']['tags.'] = 'This';
53  $this->assertEquals([], $res['TSconfig']['RTE.']['default.']['proc.']['entryHTMLparser_db.']['tags.']);
54  }
55 }
‪TYPO3\CMS\Core\Tests\Functional\TypoScript\Parser\TypoScriptParserTest
Definition: TypoScriptParserTest.php:21
‪TYPO3\CMS\Core\Tests\Functional\TypoScript\Parser
Definition: TypoScriptParserTest.php:2
‪TYPO3\CMS\Core\Tests\Functional\TypoScript\Parser\TypoScriptParserTest\hasFlakyReferences
‪hasFlakyReferences()
Definition: TypoScriptParserTest.php:28