‪TYPO3CMS  9.5
ImplementationClassNameTest.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
7 
11 class ‪ImplementationClassNameTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
12 {
16  protected ‪$testExtensionsToLoad = [
17  'typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/a',
18  'typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b',
19  ];
20 
24  protected ‪$coreExtensionsToLoad = ['extbase', 'fluid'];
25 
29  private ‪$objectManager;
30 
31  public function ‪setUp(): void
32  {
33  parent::setUp();
34 
35  $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
36 
37  $this->importCSVDataSet(GeneralUtility::getFileAbsFileName(
38  'typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/class_overriding/b/tx_a_domain_model_a.csv'
39  ));
40  }
41 
45  public function ‪testARepositoryObjectsAreTakenFromSession(): void
46  {
47  $aRepository = $this->objectManager->get(\‪ExtbaseTeam\A\Domain\Model\ARepository::class);
48  $a1 = $aRepository->findByUid(1);
49  $a2 = $aRepository->findByUid(1);
50 
51  $this->assertSame($a1, $a2);
52  }
53 
57  public function ‪testBRepositoryObjectsAreTakenFromSession(): void
58  {
59  $bRepository = $this->objectManager->get(\‪ExtbaseTeam\B\Domain\Model\BRepository::class);
60  $b1 = $bRepository->findByUid(1);
61  $b2 = $bRepository->findByUid(1);
62 
63  $this->assertSame($b1, $b2);
64  }
65 }
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest\setUp
‪setUp()
Definition: ImplementationClassNameTest.php:28
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest\testBRepositoryObjectsAreTakenFromSession
‪testBRepositoryObjectsAreTakenFromSession()
Definition: ImplementationClassNameTest.php:54
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest\testARepositoryObjectsAreTakenFromSession
‪testARepositoryObjectsAreTakenFromSession()
Definition: ImplementationClassNameTest.php:42
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest\$testExtensionsToLoad
‪array $testExtensionsToLoad
Definition: ImplementationClassNameTest.php:15
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest\$objectManager
‪ObjectManager $objectManager
Definition: ImplementationClassNameTest.php:26
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest
Definition: ImplementationClassNameTest.php:12
‪ExtbaseTeam
‪TYPO3\CMS\Extbase\Tests\Functional\ImplementationClassNameTest\$coreExtensionsToLoad
‪array $coreExtensionsToLoad
Definition: ImplementationClassNameTest.php:22
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:25
‪TYPO3\CMS\Extbase\Tests\Functional