Rised CodeCoverage of ActionService to 100%

This commit is contained in:
Kevin Frantz
2019-01-27 16:06:17 +01:00
parent 707df1b951
commit 2b1a3ad969
3 changed files with 64 additions and 15 deletions

View File

@@ -10,7 +10,6 @@ use App\Domain\FormManagement\EntityFormBuilderServiceInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use App\Repository\RepositoryInterface;
use Symfony\Component\Form\FormBuilderInterface;
use App\Entity\EntityInterface;
use Doctrine\ORM\EntityManagerInterface;
/**
@@ -84,9 +83,11 @@ final class ActionService implements ActionServiceInterface
/**
* @return FormBuilderInterface
*/
public function getForm(EntityInterface $entity): FormBuilderInterface
public function getForm(): FormBuilderInterface
{
$this->entityFormBuilderService->create($entity);
$entity = $this->requestedAction->getRequestedEntity()->getEntity();
return $this->entityFormBuilderService->create($entity);
}
/**

View File

@@ -6,7 +6,6 @@ use App\Domain\RequestManagement\Action\RequestedActionInterface;
use Symfony\Component\HttpFoundation\Request;
use App\Repository\RepositoryInterface;
use Symfony\Component\Form\FormBuilderInterface;
use App\Entity\EntityInterface;
use Doctrine\ORM\EntityManagerInterface;
/**
@@ -37,11 +36,9 @@ interface ActionServiceInterface
public function getRepository(): RepositoryInterface;
/**
* @param EntityInterface $entity
*
* @return FormBuilderInterface
*/
public function getForm(EntityInterface $entity): FormBuilderInterface;
public function getForm(): FormBuilderInterface;
/**
* @return EntityManagerInterface