Changed injection method from class to interface

This commit is contained in:
Kevin Frantz 2019-02-15 22:55:11 +01:00
parent c0113ecd32
commit 06053c6bcf
2 changed files with 4 additions and 6 deletions

View File

@ -5,7 +5,6 @@
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters: parameters:
locale: 'en' locale: 'en'
services: services:
# default configuration for services in *this* file # default configuration for services in *this* file
_defaults: _defaults:
@ -45,6 +44,6 @@ services:
# add more service definitions when explicit configuration is needed # add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones # please note that last definitions always *replace* previous ones
# testing configuration # Needed for integration tests
App\Domain\RequestManagement\Entity\RequestedEntityService: App\Domain\RequestManagement\Entity\RequestedEntityService:
public: true public: true

View File

@ -4,7 +4,6 @@ namespace tests\Integration\Domain\RequestManagement\Entity;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use App\Domain\RequestManagement\Entity\RequestedEntityServiceInterface; use App\Domain\RequestManagement\Entity\RequestedEntityServiceInterface;
use App\Domain\RequestManagement\Entity\RequestedEntityService;
use App\Entity\Source\AbstractSource; use App\Entity\Source\AbstractSource;
/** /**
@ -25,7 +24,7 @@ class RequestedEntityServiceIntegrationTest extends KernelTestCase
public function setUp(): void public function setUp(): void
{ {
self::bootKernel(); self::bootKernel();
$this->requestedEntityService = self::$container->get(RequestedEntityService::class); $this->requestedEntityService = self::$container->get(RequestedEntityServiceInterface::class);
} }
public function testClassAccessors(): void public function testClassAccessors(): void