|
22 | 22 | use Cundd\Rest\VirtualObject\Persistence\RawQueryBackendInterface;
|
23 | 23 | use Doctrine\DBAL\DBALException;
|
24 | 24 | use Psr\Log\LoggerInterface as PsrLoggerInterface;
|
| 25 | +use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider; |
| 26 | +use TYPO3\CMS\Core\Imaging\IconRegistry; |
25 | 27 | use TYPO3\CMS\Core\Tests\FunctionalTestCase;
|
26 | 28 | use TYPO3\CMS\Core\Utility\GeneralUtility;
|
27 | 29 | use TYPO3\CMS\Extbase\Object\Container\Container;
|
@@ -173,6 +175,8 @@ public function injectPropertyIntoObject($propertyValue, $propertyKey, $object)
|
173 | 175 | */
|
174 | 176 | private function buildConfiguredObjectManager()
|
175 | 177 | {
|
| 178 | + $this->initializeIconRegistry(); |
| 179 | + |
176 | 180 | /** @var Container $objectContainer */
|
177 | 181 | $objectContainer = GeneralUtility::makeInstance(Container::class);
|
178 | 182 |
|
@@ -282,4 +286,17 @@ protected function registerLoggerImplementation()
|
282 | 286 | $container->registerImplementation(PsrLoggerInterface::class, StreamLogger::class);
|
283 | 287 | $container->registerImplementation(CunddLoggerInterface::class, StreamLogger::class);
|
284 | 288 | }
|
| 289 | + |
| 290 | + private function initializeIconRegistry() |
| 291 | + { |
| 292 | + $iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); |
| 293 | + |
| 294 | + if (!$iconRegistry->isRegistered('default-not-found')) { |
| 295 | + $iconRegistry->registerIcon( |
| 296 | + 'default-not-found', |
| 297 | + SvgIconProvider::class, |
| 298 | + ['source' => 'EXT:rest/ext_icon.svg'] |
| 299 | + ); |
| 300 | + } |
| 301 | + } |
285 | 302 | }
|
0 commit comments