Added two asserts

This commit is contained in:
Kevin Frantz 2019-02-12 18:27:52 +01:00
parent 357319fd6c
commit f60e1e1453

View File

@ -17,6 +17,7 @@ use App\DBAL\Types\ActionType;
use App\Domain\RequestManagement\Entity\RequestedEntityService;
use App\Domain\RepositoryManagement\LayerRepositoryFactoryService;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Form\Form;
/**
* @author kevinfrantz
@ -66,8 +67,9 @@ class RequestedActionFormBuilderServiceIntegrationTest extends KernelTestCase
$class = PureSource::class;
$this->requestedEntity->setClass($class);
$result = $this->requestedActionFormBuilderService->create($this->requestedActionService);
//$this->assertTrue(method_exists($result, 'isValid'));
$this->assertInstanceOf(FormBuilderInterface::class, $result);
$this->assertInstanceOf(Form::class, $result->getForm());
$this->assertTrue(method_exists($result->getForm(), 'isValid'));
//Tests if the origine builder and the service function return the same value by the requestedActionService
$this->assertEquals($this->requestedActionFormBuilderService->create($this->requestedActionService), $this->requestedActionFormBuilderService->createByService());
}