/** * Set up * * @return void */ protected function setUp() { $this->subject = new \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider(); $this->icon = GeneralUtility::makeInstance(Icon::class); $this->icon->setIdentifier('foo'); $this->icon->setSize(Icon::SIZE_SMALL); }
/** * Set up * * @return void */ protected function setUp() { $this->subject = new \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider(); $this->icon = GeneralUtility::makeInstance(Icon::class); $this->icon->setIdentifier('foo'); $this->icon->setSize(Icon::SIZE_SMALL); $svgTestFileContent = '<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#CD201F" d="M11 12l3-2v6H2v-6l3 2 3-2 3 2z"></path><script><![CDATA[ function alertMe() {} ]]></script></svg>'; $this->testFileName = GeneralUtility::tempnam(uniqid('svg_') . '.svg'); file_put_contents($this->testFileName, $svgTestFileContent); }