Skip to content

Commit

Permalink
Add a bunch of lookup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Jan 30, 2024
1 parent fa97872 commit 1fb1ad0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/InMemoryRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ public function testSimpleFindBy(): void
$this->assertSame('2@example.com', $results[1]->getEmail());
}

public function testCount(): void
{
$repo = $this->getFixture();
self::assertSame(5, $repo->count([]));
self::assertSame(2, $repo->count(['lastName' => 'last']));
self::assertSame(3, $repo->count(['lastName' => 'other']));
self::assertSame(1, $repo->count(['email' => '1@example.com', 'lastName' => 'last']));
self::assertSame(0, $repo->count(['email' => '1@example.com', 'lastName' => 'other']));
self::assertSame(1, $repo->count(['email' => '1@example.com']));
self::assertSame(0, $repo->count(['email' => '6@example.com']));
}

public function testFindByWithArrayValue(): void
{
$repo = $this->getFixture();
Expand Down

0 comments on commit 1fb1ad0

Please sign in to comment.