diff --git a/Tests/Functional/Domain/Repository/FrontendUserGroupRepositoryTest.php b/Tests/Functional/Domain/Repository/FrontendUserGroupRepositoryTest.php index cdd1e81..d4243f3 100644 --- a/Tests/Functional/Domain/Repository/FrontendUserGroupRepositoryTest.php +++ b/Tests/Functional/Domain/Repository/FrontendUserGroupRepositoryTest.php @@ -5,8 +5,11 @@ namespace OliverKlee\FeUserExtraFields\Tests\Functional\Domain\Repository; use OliverKlee\FeUserExtraFields\Domain\Model\FrontendUserGroup; +use OliverKlee\FeUserExtraFields\Domain\Repository\DirectPersistInterface; use OliverKlee\FeUserExtraFields\Domain\Repository\FrontendUserGroupRepository; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; +use TYPO3\CMS\Extbase\Persistence\Repository; +use TYPO3\CMS\Extbase\Persistence\RepositoryInterface; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -26,6 +29,30 @@ protected function setUp(): void $this->subject = $this->get(FrontendUserGroupRepository::class); } + /** + * @test + */ + public function implementsRepositoryInterface(): void + { + self::assertInstanceOf(RepositoryInterface::class, $this->subject); + } + + /** + * @test + */ + public function isRepository(): void + { + self::assertInstanceOf(Repository::class, $this->subject); + } + + /** + * @test + */ + public function implementsDirectPersistInterface(): void + { + self::assertInstanceOf(DirectPersistInterface::class, $this->subject); + } + /** * @test */ diff --git a/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php b/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php index 38df790..6cd3442 100644 --- a/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php +++ b/Tests/Functional/Domain/Repository/FrontendUserRepositoryTest.php @@ -7,10 +7,13 @@ use OliverKlee\FeUserExtraFields\Domain\Model\FrontendUser; use OliverKlee\FeUserExtraFields\Domain\Model\FrontendUserGroup; use OliverKlee\FeUserExtraFields\Domain\Model\Gender; +use OliverKlee\FeUserExtraFields\Domain\Repository\DirectPersistInterface; use OliverKlee\FeUserExtraFields\Domain\Repository\FrontendUserRepository; use TYPO3\CMS\Extbase\Domain\Model\FileReference; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface; +use TYPO3\CMS\Extbase\Persistence\Repository; +use TYPO3\CMS\Extbase\Persistence\RepositoryInterface; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; /** @@ -34,6 +37,30 @@ protected function setUp(): void $this->subject = $this->get(FrontendUserRepository::class); } + /** + * @test + */ + public function implementsRepositoryInterface(): void + { + self::assertInstanceOf(RepositoryInterface::class, $this->subject); + } + + /** + * @test + */ + public function isRepository(): void + { + self::assertInstanceOf(Repository::class, $this->subject); + } + + /** + * @test + */ + public function implementsDirectPersistInterface(): void + { + self::assertInstanceOf(DirectPersistInterface::class, $this->subject); + } + /** * @test */ diff --git a/Tests/Unit/Domain/Repository/FrontendUserGroupRepositoryTest.php b/Tests/Unit/Domain/Repository/FrontendUserGroupRepositoryTest.php deleted file mode 100644 index fcd22ca..0000000 --- a/Tests/Unit/Domain/Repository/FrontendUserGroupRepositoryTest.php +++ /dev/null @@ -1,57 +0,0 @@ -createStub(ObjectManagerInterface::class); - // @phpstan-ignore arguments.count (This line is 11LTS-specific, but we're running PHPStan on TYPO3 12.) - $this->subject = new FrontendUserGroupRepository($objectManagerStub); - } else { - $this->subject = new FrontendUserGroupRepository(); - } - } - - /** - * @test - */ - public function implementsRepositoryInterface(): void - { - self::assertInstanceOf(RepositoryInterface::class, $this->subject); - } - - /** - * @test - */ - public function isRepository(): void - { - self::assertInstanceOf(Repository::class, $this->subject); - } - - /** - * @test - */ - public function implementsDirectPersistInterface(): void - { - self::assertInstanceOf(DirectPersistInterface::class, $this->subject); - } -} diff --git a/Tests/Unit/Domain/Repository/FrontendUserRepositoryTest.php b/Tests/Unit/Domain/Repository/FrontendUserRepositoryTest.php deleted file mode 100644 index c64ad59..0000000 --- a/Tests/Unit/Domain/Repository/FrontendUserRepositoryTest.php +++ /dev/null @@ -1,57 +0,0 @@ -createStub(ObjectManagerInterface::class); - // @phpstan-ignore arguments.count (This line is 11LTS-specific, but we're running PHPStan on TYPO3 12.) - $this->subject = new FrontendUserRepository($objectManagerStub); - } else { - $this->subject = new FrontendUserRepository(); - } - } - - /** - * @test - */ - public function implementsRepositoryInterface(): void - { - self::assertInstanceOf(RepositoryInterface::class, $this->subject); - } - - /** - * @test - */ - public function isRepository(): void - { - self::assertInstanceOf(Repository::class, $this->subject); - } - - /** - * @test - */ - public function implementsDirectPersistInterface(): void - { - self::assertInstanceOf(DirectPersistInterface::class, $this->subject); - } -}