mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-10 04:36:12 +01:00
[CLEANUP] Use power of the DI container in the functional tests (#961)
This commit is contained in:
parent
edbb5342bd
commit
3d92e0cc98
1 changed files with 4 additions and 5 deletions
|
@ -6,9 +6,8 @@ namespace TTN\Tea\Tests\Functional\Domain\Repository\Product;
|
||||||
|
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Product\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
||||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||||
use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
|
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
|
||||||
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
|
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,15 +20,15 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
|
|
||||||
private TeaRepository $subject;
|
private TeaRepository $subject;
|
||||||
|
|
||||||
private PersistenceManager $persistenceManager;
|
private PersistenceManagerInterface $persistenceManager;
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
|
$this->persistenceManager = $this->get(PersistenceManagerInterface::class);
|
||||||
|
|
||||||
$this->subject = $this->getContainer()->get(TeaRepository::class);
|
$this->subject = $this->get(TeaRepository::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue