mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Renamed domain LayerManagement to Layer
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace tests\Unit\Domain\Layer;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Infinito\DBAL\Types\ActionType;
|
||||
use Infinito\Domain\Layer\LayerActionMap;
|
||||
use Infinito\DBAL\Types\Meta\Right\LayerType;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class LayerActionMapTest extends TestCase
|
||||
{
|
||||
public function testGetLayersBySource(): void
|
||||
{
|
||||
foreach (ActionType::getValues() as $action) {
|
||||
$layers = LayerActionMap::getLayers($action);
|
||||
$this->assertArraySubset([LayerType::SOURCE], $layers);
|
||||
}
|
||||
}
|
||||
|
||||
public function testGetActionsBySource(): void
|
||||
{
|
||||
$actions = LayerActionMap::getActions(LayerType::SOURCE);
|
||||
foreach (ActionType::getValues() as $action) {
|
||||
$this->assertTrue(in_array($action, $actions));
|
||||
}
|
||||
}
|
||||
|
||||
public function testEmptyGetActionsBySource(): void
|
||||
{
|
||||
$this->assertEquals(0, count(LayerActionMap::getActions('blablabla')));
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace tests\Unit\Domain\Layer;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Infinito\Domain\Layer\LayerInterfaceMap;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class LayerInterfaceMapTest extends TestCase
|
||||
{
|
||||
public function testIfInterfaceForEachLayerExist(): void
|
||||
{
|
||||
foreach (LayerInterfaceMap::getAllInterfaces() as $interface) {
|
||||
$this->assertTrue(interface_exists($interface));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user