2019-02-18 22:20:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace tests\Unit\Domain\TwigManagement;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use Infinito\Domain\TwigManagement\ActionIconClassMapInterface;
|
|
|
|
use Infinito\Domain\TwigManagement\ActionIconClassMap;
|
|
|
|
use Infinito\Exception\NotSetException;
|
|
|
|
use Infinito\DBAL\Types\ActionType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
|
|
|
class ActionIconClassMapTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var ActionIconClassMapInterface
|
|
|
|
*/
|
|
|
|
private $actionIconClassMap;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*
|
|
|
|
* @see \PHPUnit\Framework\TestCase::setUp()
|
|
|
|
*/
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->actionIconClassMap = new ActionIconClassMap();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testException(): void
|
|
|
|
{
|
|
|
|
$this->expectException(NotSetException::class);
|
|
|
|
$this->actionIconClassMap->getIconClass('wejfhwhke12');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAllActionsSet(): void
|
|
|
|
{
|
2019-02-25 13:32:37 +01:00
|
|
|
foreach (ActionType::getValues() as $action) {
|
2019-02-18 22:20:51 +01:00
|
|
|
$this->assertIsString($this->actionIconClassMap->getIconClass($action));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|