‪TYPO3CMS  11.5
JavaScriptModuleInstructionTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
23 class ‪JavaScriptModuleInstructionTest extends UnitTestCase
24 {
25  public static function ‪flagsAreAssignedDataProvider(): array
26  {
27  return [
28  [0, 0, 0],
29  [8, 8, 8, 8, 8],
30  [12, 8, 4, 4],
31  [7, 1, 7, 1, 2, 4],
32  [7, 7, 7, 1, 2, 4],
33  ];
34  }
35 
40  public function ‪flagsAreAssigned(int $expectation, int $flags, int ...$additionalFlags): void
41  {
42  $subject = new ‪JavaScriptModuleInstruction('Test', $flags);
43  $subject->addFlags(...$additionalFlags);
44  self::assertSame($expectation, $subject->getFlags());
45  }
46 }
‪TYPO3\CMS\Core\Tests\Unit\Page
Definition: AssetCollectorTest.php:18
‪TYPO3\CMS\Core\Tests\Unit\Page\JavaScriptModuleInstructionTest\flagsAreAssigned
‪flagsAreAssigned(int $expectation, int $flags, int ... $additionalFlags)
Definition: JavaScriptModuleInstructionTest.php:40
‪TYPO3\CMS\Core\Tests\Unit\Page\JavaScriptModuleInstructionTest
Definition: JavaScriptModuleInstructionTest.php:24
‪TYPO3\CMS\Core\Page\JavaScriptModuleInstruction
Definition: JavaScriptModuleInstruction.php:23
‪TYPO3\CMS\Core\Tests\Unit\Page\JavaScriptModuleInstructionTest\flagsAreAssignedDataProvider
‪static flagsAreAssignedDataProvider()
Definition: JavaScriptModuleInstructionTest.php:25