2 declare(strict_types = 1);
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
33 protected function setUp()
35 $this->subject = $this->getAccessibleMock(AddonRegistry::class, [
'dummy'], [],
'',
false);
45 ->register(GeneralUtility::makeInstance(Addon::class,
'addon/global'))
47 GeneralUtility::makeInstance(Addon::class,
'addon/another/global')
48 ->setCssFiles([
'EXT:foobar/Resources/Public/Css/Addon.css'])
51 GeneralUtility::makeInstance(Addon::class,
'addon/with/same/cssfile')
56 ->setCssFiles([
'EXT:foobar/Resources/Public/Css/Addon.css'])
59 GeneralUtility::makeInstance(Addon::class,
'addon/for/mode')
60 ->setModes([
'xml',
'htmlmixed'])
63 GeneralUtility::makeInstance(Addon::class,
'addon/with/settings')
79 'addon/another/global',
80 'addon/with/same/cssfile',
81 'addon/with/settings',
85 foreach ($this->subject->getForMode() as $addon) {
86 $actual[] = $addon->getIdentifier();
89 static::assertSame($expected, $actual);
99 'addon/another/global',
100 'addon/with/same/cssfile',
102 'addon/with/settings',
106 foreach ($this->subject->getForMode(
'xml') as $addon) {
107 $actual[] = $addon->getIdentifier();
110 static::assertSame($expected, $actual);
124 $actual = $this->subject->compileSettings($this->subject->getForMode());
126 static::assertSame($expected, $actual);