‪TYPO3CMS  10.4
IconFactoryTest.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 
20 use Prophecy\Argument;
21 use Psr\EventDispatcher\EventDispatcherInterface;
29 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
30 
34 class ‪IconFactoryTest extends UnitTestCase
35 {
39  protected ‪$resetSingletonInstances = true;
40 
44  protected ‪$subject;
45 
49  protected ‪$notRegisteredIconIdentifier = 'my-super-unregistered-identifier';
50 
54  protected ‪$registeredIconIdentifier = 'actions-close';
55 
59  protected ‪$registeredSpinningIconIdentifier = 'spinning-icon';
60 
64  protected ‪$iconRegistryMock;
65 
69  protected ‪$mockRecord = [
70  'header' => 'dummy content header',
71  'uid' => '1',
72  'pid' => '1',
73  'image' => '',
74  'hidden' => '0',
75  'starttime' => '0',
76  'endtime' => '0',
77  'fe_group' => '',
78  'CType' => 'text',
79  't3ver_state' => '0',
80  't3ver_wsid' => '0',
81  'sys_language_uid' => '0',
82  'l18n_parent' => '0',
83  'subheader' => '',
84  'bodytext' => '',
85  ];
86 
90  protected function ‪setUp(): void
91  {
92  parent::setUp();
93  $this->iconRegistryMock = $this->prophesize(IconRegistry::class);
94  $eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
95  $eventDispatcher->dispatch(Argument::any())->willReturnArgument(0);
96 
97  $this->subject = new ‪IconFactory($eventDispatcher->reveal(), $this->iconRegistryMock->reveal());
98 
99  $this->iconRegistryMock->isRegistered('tcarecords--default')->willReturn(false);
100  $this->iconRegistryMock->isRegistered(Argument::any())->willReturn(true);
101  $this->iconRegistryMock->isDeprecated(Argument::any())->willReturn(false);
102  $this->iconRegistryMock->getDefaultIconIdentifier()->willReturn('default-not-found');
103  $this->iconRegistryMock->getIconIdentifierForMimeType('application/pdf')->willReturn('mimetypes-pdf');
104  $this->iconRegistryMock->getIconIdentifierForMimeType('image/*')->willReturn('mimetypes-media-image');
105  $this->iconRegistryMock->getIconIdentifierForMimeType(Argument::any())->willReturn(null);
106  $this->iconRegistryMock->getIconIdentifierForFileExtension(Argument::any())->willReturn('mimetypes-other-other');
107  $this->iconRegistryMock->getIconIdentifierForFileExtension('foo')->willReturn('mimetypes-other-other');
108  $this->iconRegistryMock->getIconIdentifierForFileExtension('pdf')->willReturn('mimetypes-pdf');
109  $this->iconRegistryMock->getIconIdentifierForFileExtension('png')->willReturn('mimetypes-media-image');
110  $this->iconRegistryMock->getIconConfigurationByIdentifier(Argument::any())->willReturn([
111  'provider' => FontawesomeIconProvider::class,
112  'options' => [
113  'name' => 'times',
114  'additionalClasses' => 'fa-fw'
115  ]
116  ]);
117  }
118 
124  public function ‪differentSizesDataProvider()
125  {
126  return [
127  ['size ' . ‪Icon::SIZE_SMALL => ['input' => ‪Icon::SIZE_SMALL, 'expected' => ‪Icon::SIZE_SMALL]],
128  ['size ' . ‪Icon::SIZE_DEFAULT => ['input' => ‪Icon::SIZE_DEFAULT, 'expected' => ‪Icon::SIZE_DEFAULT]],
129  ['size ' . ‪Icon::SIZE_LARGE => ['input' => ‪Icon::SIZE_LARGE, 'expected' => ‪Icon::SIZE_LARGE]]
130  ];
131  }
132 
137  {
138  self::assertStringContainsString(
139  '<span class="icon-markup">',
140  $this->subject->getIcon($this->registeredIconIdentifier)->render()
141  );
142  }
143 
148  {
149  self::assertStringContainsString(
150  '<span class="t3js-icon icon icon-size-default icon-state-default icon-actions-close" data-identifier="actions-close">',
151  $this->subject->getIcon($this->registeredIconIdentifier)->render()
152  );
153  }
154 
160  {
161  self::assertStringContainsString(
162  '<span class="t3js-icon icon icon-size-' . $size['expected'] . ' icon-state-default icon-actions-close" data-identifier="actions-close">',
163  $this->subject->getIcon($this->registeredIconIdentifier, $size['input'])->render()
164  );
165  }
166 
172  {
173  self::assertStringContainsString(
174  '<span class="icon-overlay icon-overlay-readonly">',
175  $this->subject->getIcon($this->registeredIconIdentifier, $size['input'], 'overlay-readonly')->render()
176  );
177  }
178 
183  {
184  $this->iconRegistryMock->isRegistered(Argument::any())->willReturn(false);
185  $this->iconRegistryMock->getDefaultIconIdentifier(Argument::any())->willReturn('default-not-found');
186  $this->iconRegistryMock->getIconConfigurationByIdentifier('default-not-found')->willReturn([
187  'provider' => FontawesomeIconProvider::class,
188  'options' => [
189  'name' => 'times-circle',
190  'additionalClasses' => 'fa-fw'
191  ]
192  ]);
193  self::assertStringContainsString(
194  '<span class="t3js-icon icon icon-size-default icon-state-default icon-default-not-found" data-identifier="default-not-found">',
195  $this->subject->getIcon($this->notRegisteredIconIdentifier)->render()
196  );
197  }
198 
204  {
205  $this->iconRegistryMock->isRegistered(Argument::any())->willReturn(false);
206  $this->iconRegistryMock->getDefaultIconIdentifier(Argument::any())->willReturn('default-not-found');
207  $this->iconRegistryMock->getIconConfigurationByIdentifier('default-not-found')->willReturn([
208  'provider' => FontawesomeIconProvider::class,
209  'options' => [
210  'name' => 'times-circle',
211  'additionalClasses' => 'fa-fw'
212  ]
213  ]);
214  self::assertStringContainsString(
215  '<span class="t3js-icon icon icon-size-' . $size['expected'] . ' icon-state-default icon-default-not-found" data-identifier="default-not-found">',
216  $this->subject->getIcon($this->notRegisteredIconIdentifier, $size['input'])->render()
217  );
218  }
219 
224  {
225  $this->iconRegistryMock->getIconConfigurationByIdentifier($this->registeredSpinningIconIdentifier)->willReturn([
226  'provider' => FontawesomeIconProvider::class,
227  'options' => [
228  'name' => 'times-circle',
229  'additionalClasses' => 'fa-fw',
230  'spinning' => true
231  ]
232  ]);
233  self::assertStringContainsString(
234  '<span class="t3js-icon icon icon-size-default icon-state-default icon-' . $this->registeredSpinningIconIdentifier . ' icon-spin" data-identifier="spinning-icon">',
235  $this->subject->getIcon($this->registeredSpinningIconIdentifier)->render()
236  );
237  }
238 
245  {
246  self::assertStringContainsString(
247  '<span class="icon-overlay icon-overlay-readonly">',
248  $this->subject->getIcon($this->notRegisteredIconIdentifier, $size['input'], 'overlay-readonly')->render()
249  );
250  }
251 
256  {
257  $this->expectException(\InvalidArgumentException::class);
258  $this->subject->getIcon($this->registeredIconIdentifier, 'foo')->render();
259  }
260 
261  //
262  // Tests for getIconForFileExtension
263  //
264 
271  {
272  self::assertStringContainsString(
273  '<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-other-other" data-identifier="mimetypes-other-other">',
274  $this->subject->getIconForFileExtension('')->render()
275  );
276  }
277 
284  {
285  self::assertStringContainsString(
286  '<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-other-other" data-identifier="mimetypes-other-other">',
287  $this->subject->getIconForFileExtension('foo')->render()
288  );
289  }
290 
297  {
298  self::assertStringContainsString(
299  '<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-pdf" data-identifier="mimetypes-pdf">',
300  $this->subject->getIconForFileExtension('pdf')->render()
301  );
302  }
303 
310  {
311  self::assertStringContainsString(
312  '<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-media-image" data-identifier="mimetypes-media-image">',
313  $this->subject->getIconForFileExtension('png')->render()
314  );
315  }
316 
321  {
322  $resourceProphecy = $this->prophesize(File::class);
323  $resourceProphecy->isMissing()->willReturn(false);
324  $resourceProphecy->getExtension()->willReturn('pdf');
325  $resourceProphecy->getMimeType()->willReturn('');
326 
327  self::assertStringContainsString(
328  '<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-pdf" data-identifier="mimetypes-pdf">',
329  $this->subject->getIconForResource($resourceProphecy->reveal())->render()
330  );
331  }
332 
334  // Tests concerning getIconForResource
336 
342  {
343  $fileObject = $this->‪getTestSubjectFileObject('');
344  $result = $this->subject->getIconForResource($fileObject)->render();
345  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-other-other" data-identifier="mimetypes-other-other">', $result);
346  }
347 
354  {
355  $fileObject = $this->‪getTestSubjectFileObject('foo');
356  $result = $this->subject->getIconForResource($fileObject)->render();
357  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-other-other" data-identifier="mimetypes-other-other">', $result);
358  }
359 
366  {
367  $fileObject = $this->‪getTestSubjectFileObject('pdf');
368  $result = $this->subject->getIconForResource($fileObject)->render();
369  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-pdf" data-identifier="mimetypes-pdf">', $result);
370  }
371 
378  {
379  $fileObject = $this->‪getTestSubjectFileObject('pdf', 'application/pdf');
380  $result = $this->subject->getIconForResource($fileObject)->render();
381  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-pdf" data-identifier="mimetypes-pdf">', $result);
382  }
383 
390  {
391  $fileObject = $this->‪getTestSubjectFileObject('custom', 'image/my-custom-extension');
392  $result = $this->subject->getIconForResource($fileObject)->render();
393  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-media-image" data-identifier="mimetypes-media-image">', $result);
394  }
395 
402  {
403  $fileObject = $this->‪getTestSubjectFileObject('png', 'image/png');
404  $result = $this->subject->getIconForResource($fileObject)->render();
405  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-media-image" data-identifier="mimetypes-media-image">', $result);
406  }
407 
414  {
415  $folderObject = $this->‪getTestSubjectFolderObject('/test');
416  $result = $this->subject->getIconForResource($folderObject)->render();
417  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-apps-filetree-folder-default" data-identifier="apps-filetree-folder-default">', $result);
418  }
419 
426  {
427  $folderObject = $this->‪getTestSubjectFolderObject('/test');
428  $result = $this->subject->getIconForResource($folderObject, ‪Icon::SIZE_DEFAULT, null, ['folder-open' => true])->render();
429  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-apps-filetree-folder-opened" data-identifier="apps-filetree-folder-opened">', $result);
430  }
431 
438  {
439  $folderObject = $this->‪getTestSubjectFolderObject('/');
440  $result = $this->subject->getIconForResource($folderObject)->render();
441  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-apps-filetree-root" data-identifier="apps-filetree-root">', $result);
442  }
443 
450  {
451  $folderObject = $this->‪getTestSubjectFolderObject('/mount');
452  $result = $this->subject->getIconForResource($folderObject, ‪Icon::SIZE_DEFAULT, null, ['mount-root' => true])->render();
453  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-apps-filetree-mount" data-identifier="apps-filetree-mount">', $result);
454  }
455 
456  //
457  // Test for getIconForRecord
458  //
459 
466  {
467  ‪$GLOBALS['TCA']['']['ctrl'] = [];
468  self::assertStringContainsString(
469  '<span class="t3js-icon icon icon-size-default icon-state-default icon-default-not-found" data-identifier="default-not-found">',
470  $this->subject->getIconForRecord('', [])->render()
471  );
472  }
473 
480  {
481  ‪$GLOBALS['TCA'] = [
482  'tt_content' => [
483  'ctrl' => [
484  'typeicon_column' => 'CType',
485  'typeicon_classes' => [
486  'default' => 'mimetypes-x-content-text',
487  ],
488  ],
489  ],
490  ];
491  $result = $this->subject->getIconForRecord('tt_content', [])->render();
492  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-x-content-text" data-identifier="mimetypes-x-content-text">', $result);
493  }
494 
501  {
502  ‪$GLOBALS['TCA'] = [
503  'tt_content' => [
504  'ctrl' => [
505  'typeicon_column' => 'CType',
506  'typeicon_classes' => [
507  'default' => '',
508  'text' => 'mimetypes-x-content-text',
509  ],
510  ],
511  ],
512  ];
513  $result = $this->subject->getIconForRecord('tt_content', $this->mockRecord)->render();
514  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-x-content-text" data-identifier="mimetypes-x-content-text">', $result);
515  }
516 
523  {
524  ‪$GLOBALS['TCA'] = [
525  'tt_content' => [
526  'ctrl' => [
527  'typeicon_column' => 'CType',
528  'typeicon_classes' => [
529  'default' => '',
530  'list' => 'mimetypes-x-content-plugin',
531  ],
532  ],
533  ],
534  ];
536  ‪$mockRecord['CType'] = 'list';
537  $result = $this->subject->getIconForRecord('tt_content', ‪$mockRecord)->render();
538  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-x-content-plugin" data-identifier="mimetypes-x-content-plugin">', $result);
539  }
540 
547  {
548  ‪$GLOBALS['TCA'] = [
549  'tt_content' => [
550  'ctrl' => [
551  'enablecolumns' => [
552  'disabled' => 'hidden',
553  ],
554  'typeicon_column' => 'CType',
555  'typeicon_classes' => [
556  'default' => '',
557  'text' => 'mimetypes-x-content-text',
558  ],
559  ],
560  ],
561  ];
563  ‪$mockRecord['hidden'] = '1';
564  $result = $this->subject->getIconForRecord('tt_content', ‪$mockRecord)->render();
565  self::assertStringContainsString('<span class="t3js-icon icon icon-size-default icon-state-default icon-mimetypes-x-content-text" data-identifier="mimetypes-x-content-text">', $result);
566  self::assertStringContainsString('<span class="icon-overlay icon-overlay-hidden">', $result);
567  }
568 
576  protected function ‪getTestSubjectFileObject($extension, $mimeType = '')
577  {
578  $mockedStorage = $this->createMock(ResourceStorage::class);
579  $mockedFile = $this->getMockBuilder(File::class)
580  ->setConstructorArgs([['identifier' => '', 'name' => ''], $mockedStorage])
581  ->getMock();
582  $mockedFile->expects(self::atMost(1))->method('getExtension')->willReturn($extension);
583  $mockedFile->expects(self::atLeastOnce())->method('getMimeType')->willReturn($mimeType);
584  return $mockedFile;
585  }
586 
593  protected function ‪getTestSubjectFolderObject($identifier)
594  {
595  $mockedStorage = $this->createMock(ResourceStorage::class);
596  $mockedStorage->expects(self::any())->method('getRootLevelFolder')->willReturn(
597  new ‪Folder($mockedStorage, '/', '/')
598  );
599  $mockedStorage->expects(self::any())->method('checkFolderActionPermission')->willReturn(true);
600  $mockedStorage->expects(self::any())->method('isBrowsable')->willReturn(true);
601  return new ‪Folder($mockedStorage, $identifier, $identifier);
602  }
603 }
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest
Definition: IconFactoryTest.php:35
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForFileWithUnknownFileTypeReturnsDefaultFileIcon
‪getIconForFileWithUnknownFileTypeReturnsDefaultFileIcon()
Definition: IconFactoryTest.php:276
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForFileWithNoFileTypeReturnsDefaultFileIcon
‪getIconForFileWithNoFileTypeReturnsDefaultFileIcon()
Definition: IconFactoryTest.php:263
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_DEFAULT
‪const SIZE_DEFAULT
Definition: Icon.php:35
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithUnknownFileTypeReturnsOtherIcon
‪getIconForResourceWithUnknownFileTypeReturnsOtherIcon()
Definition: IconFactoryTest.php:346
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceReturnsCorrectMarkupForFileResources
‪getIconForResourceReturnsCorrectMarkupForFileResources()
Definition: IconFactoryTest.php:313
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithOpenFolderReturnsOpenFolderIcon
‪getIconForResourceWithOpenFolderReturnsOpenFolderIcon()
Definition: IconFactoryTest.php:418
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithPdfReturnsPdfIcon
‪getIconForResourceWithPdfReturnsPdfIcon()
Definition: IconFactoryTest.php:358
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithMimeTypeApplicationPdfReturnsPdfIcon
‪getIconForResourceWithMimeTypeApplicationPdfReturnsPdfIcon()
Definition: IconFactoryTest.php:370
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithMountRootReturnsMountFolderIcon
‪getIconForResourceWithMountRootReturnsMountFolderIcon()
Definition: IconFactoryTest.php:442
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForFileWithFileTypePngReturnsPngIcon
‪getIconForFileWithFileTypePngReturnsPngIcon()
Definition: IconFactoryTest.php:302
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$mockRecord
‪array $mockRecord
Definition: IconFactoryTest.php:62
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$registeredIconIdentifier
‪string $registeredIconIdentifier
Definition: IconFactoryTest.php:50
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:33
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconByIdentifierReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed
‪getIconByIdentifierReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed()
Definition: IconFactoryTest.php:140
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithPngFileReturnsIcon
‪getIconForResourceWithPngFileReturnsIcon()
Definition: IconFactoryTest.php:394
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForRecordWithMockRecordWithHiddenFlagReturnsNormalIconAndOverlay
‪getIconForRecordWithMockRecordWithHiddenFlagReturnsNormalIconAndOverlay()
Definition: IconFactoryTest.php:539
‪TYPO3\CMS\Core\Tests\Unit\Imaging
Definition: DimensionTest.php:16
‪TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider
Definition: FontawesomeIconProvider.php:25
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForFileWithFileTypePdfReturnsPdfIcon
‪getIconForFileWithFileTypePdfReturnsPdfIcon()
Definition: IconFactoryTest.php:289
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\differentSizesDataProvider
‪array differentSizesDataProvider()
Definition: IconFactoryTest.php:117
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed
‪getIconReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed()
Definition: IconFactoryTest.php:175
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForRecordWithMockRecordOfTypePluginReturnsPluginIcon
‪getIconForRecordWithMockRecordOfTypePluginReturnsPluginIcon()
Definition: IconFactoryTest.php:515
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$iconRegistryMock
‪TYPO3 CMS Core Imaging IconRegistry $iconRegistryMock
Definition: IconFactoryTest.php:58
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithRootFolderReturnsRootFolderIcon
‪getIconForResourceWithRootFolderReturnsRootFolderIcon()
Definition: IconFactoryTest.php:430
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconByIdentifierAndSizeReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed
‪getIconByIdentifierAndSizeReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed($size)
Definition: IconFactoryTest.php:196
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:37
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconByIdentifierAndSizeReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed
‪getIconByIdentifierAndSizeReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed($size)
Definition: IconFactoryTest.php:152
‪TYPO3\CMS\Core\Resource\File
Definition: File.php:24
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForRecordWithEmptyRecordReturnsNormalIcon
‪getIconForRecordWithEmptyRecordReturnsNormalIcon()
Definition: IconFactoryTest.php:472
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithFolderReturnsFolderIcon
‪getIconForResourceWithFolderReturnsFolderIcon()
Definition: IconFactoryTest.php:406
‪TYPO3\CMS\Core\Imaging\IconRegistry
Definition: IconRegistry.php:38
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\setUp
‪setUp()
Definition: IconFactoryTest.php:83
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$registeredSpinningIconIdentifier
‪string $registeredSpinningIconIdentifier
Definition: IconFactoryTest.php:54
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForRecordWithNullTableReturnsMissingIcon
‪getIconForRecordWithNullTableReturnsMissingIcon()
Definition: IconFactoryTest.php:458
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$notRegisteredIconIdentifier
‪string $notRegisteredIconIdentifier
Definition: IconFactoryTest.php:46
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconReturnsCorrectMarkupIfIconIsRegisteredAsSpinningIcon
‪getIconReturnsCorrectMarkupIfIconIsRegisteredAsSpinningIcon()
Definition: IconFactoryTest.php:216
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$subject
‪IconFactory $subject
Definition: IconFactoryTest.php:42
‪TYPO3\CMS\Core\Resource\ResourceStorage
Definition: ResourceStorage.php:122
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getTestSubjectFolderObject
‪TYPO3 CMS Core Resource Folder getTestSubjectFolderObject($identifier)
Definition: IconFactoryTest.php:586
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconByIdentifierAndSizeAndOverlayReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed
‪getIconByIdentifierAndSizeAndOverlayReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed($size)
Definition: IconFactoryTest.php:237
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconReturnsIconWithCorrectMarkupWrapperIfRegisteredIconIdentifierIsUsed
‪getIconReturnsIconWithCorrectMarkupWrapperIfRegisteredIconIdentifierIsUsed()
Definition: IconFactoryTest.php:129
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getTestSubjectFileObject
‪TYPO3 CMS Core Resource File getTestSubjectFileObject($extension, $mimeType='')
Definition: IconFactoryTest.php:569
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForRecordWithMockRecordReturnsNormalIcon
‪getIconForRecordWithMockRecordReturnsNormalIcon()
Definition: IconFactoryTest.php:493
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\$resetSingletonInstances
‪bool $resetSingletonInstances
Definition: IconFactoryTest.php:38
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_LARGE
‪const SIZE_LARGE
Definition: Icon.php:40
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconByIdentifierAndSizeAndWithOverlayReturnsIconWithCorrectOverlayMarkupIfRegisteredIconIdentifierIsUsed
‪getIconByIdentifierAndSizeAndWithOverlayReturnsIconWithCorrectOverlayMarkupIfRegisteredIconIdentifierIsUsed($size)
Definition: IconFactoryTest.php:164
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconThrowsExceptionIfInvalidSizeIsGiven
‪getIconThrowsExceptionIfInvalidSizeIsGiven()
Definition: IconFactoryTest.php:248
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithCustomImageMimeTypeReturnsImageIcon
‪getIconForResourceWithCustomImageMimeTypeReturnsImageIcon()
Definition: IconFactoryTest.php:382
‪TYPO3\CMS\Core\Tests\Unit\Imaging\IconFactoryTest\getIconForResourceWithFileWithoutExtensionTypeReturnsOtherIcon
‪getIconForResourceWithFileWithoutExtensionTypeReturnsOtherIcon()
Definition: IconFactoryTest.php:334