mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	Implemented ActionIconClassMapTest
This commit is contained in:
		@@ -0,0 +1,43 @@
 | 
			
		||||
<?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
 | 
			
		||||
    {
 | 
			
		||||
        foreach (ActionType::getChoices() as $action) {
 | 
			
		||||
            $this->assertIsString($this->actionIconClassMap->getIconClass($action));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user