19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
39 protected function setUp()
41 $this->subject = new \TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider();
42 $this->icon = GeneralUtility::makeInstance(Icon::class);
43 $this->icon->setIdentifier(
'foo');
52 $this->subject->prepareIconMarkup($this->icon, [
'name' =>
'times']);
53 $this->assertEquals(
'<span class="icon-unify"><i class="fa fa-times"></i></span>', $this->icon->getMarkup());
64 'name with spaces' => [
'name with spaces', 1440754979],
65 'name with spaces and umlauts' => [
'name with spaces äöü', 1440754979],
66 'name umlauts' => [
'häuser', 1440754979],
67 'name with underscore' => [
'name_with_underscore', 1440754979],
68 'name is empty' => [
'', 1440754978],
80 $this->expectException(\InvalidArgumentException::class);
81 $this->expectExceptionCode($expectedExceptionCode);
83 $this->subject->prepareIconMarkup($this->icon, [
'name' => $name]);