/** * Tests the return of four parts * * @test */ public function getSpriteIconClassesWithFourPartsReturnsT3IconAndCombinedParts() { $result = explode(' ', IconUtilityFixture::getSpriteIconClasses('actions-juggle-speed-game')); sort($result); $this->assertEquals(array('t3-icon', 't3-icon-actions', 't3-icon-actions-juggle', 't3-icon-juggle-speed-game'), $result); }
/** * Tests whether a faulty overrideResourceIcon hook (the hook object cannot be found) is not called. * * @test * @expectedException \UnexpectedValueException */ public function isFaultyResourceIconHookNotCalled() { $classReference = $this->getUniqueId('user_overrideResourceIconHook'); $folderObject = $this->getTestSubjectFolderObject('/test'); $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideResourceIcon'][$classReference] = $classReference; $GLOBALS['T3_VAR']['getUserObj'][$classReference] = new \stdClass(); IconUtilityFixture::getSpriteIconForResource($folderObject); }