Renamed domain FormManagement to Form

This commit is contained in:
Kevin Frantz
2019-05-30 16:13:29 +02:00
parent 8307016460
commit 145b093e7c
16 changed files with 25 additions and 25 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace tests\Unit\Domain\Form;
use PHPUnit\Framework\TestCase;
use Infinito\Domain\Form\FormClassNameService;
use Infinito\Entity\Source\PureSource;
use Infinito\DBAL\Types\ActionType;
/**
* @author kevinfrantz
*/
class FormClassNameServiceTest extends TestCase
{
public function testGetName(): void
{
$entityClass = PureSource::class;
$formNameService = new FormClassNameService();
$entityForm = $formNameService->getClass($entityClass);
$this->assertEquals('Infinito\\Form\\Entity\\Source\\PureSourceType', $entityForm);
}
public function testWithType(): void
{
$entityClass = PureSource::class;
$formNameService = new FormClassNameService();
$entityForm = $formNameService->getClass($entityClass, ActionType::CREATE);
$this->assertEquals('Infinito\\Form\\Entity\\Source\\PureSourceCreateType', $entityForm);
}
}