From e9019ddae8570de74d97be29a74f97aac3f67dea Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 15 Apr 2024 07:21:27 +0200 Subject: [PATCH] [TASK] Test that `TeaRepository.findByOwnerUid` ignores the storage PID (#1227) --- .../Repository/Fixtures/TeaWithOwnerOnPage.csv | 3 +++ .../Domain/Repository/TeaRepositoryTest.php | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Tests/Functional/Domain/Repository/Fixtures/TeaWithOwnerOnPage.csv diff --git a/Tests/Functional/Domain/Repository/Fixtures/TeaWithOwnerOnPage.csv b/Tests/Functional/Domain/Repository/Fixtures/TeaWithOwnerOnPage.csv new file mode 100644 index 0000000..2e013f5 --- /dev/null +++ b/Tests/Functional/Domain/Repository/Fixtures/TeaWithOwnerOnPage.csv @@ -0,0 +1,3 @@ +"tx_tea_domain_model_tea" +,"uid","pid","title","owner" +,1,1,"Earl Grey",1 diff --git a/Tests/Functional/Domain/Repository/TeaRepositoryTest.php b/Tests/Functional/Domain/Repository/TeaRepositoryTest.php index 533b42a..f6aa642 100644 --- a/Tests/Functional/Domain/Repository/TeaRepositoryTest.php +++ b/Tests/Functional/Domain/Repository/TeaRepositoryTest.php @@ -144,6 +144,18 @@ final class TeaRepositoryTest extends FunctionalTestCase self::assertCount(1, $result); } + /** + * @test + */ + public function findByOwnerUidFindsTeaWithTheGivenOwnerUidOnPage(): void + { + $this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithOwnerOnPage.csv'); + + $result = $this->subject->findByOwnerUid(1); + + self::assertCount(1, $result); + } + /** * @test */