Skip to content

Commit

Permalink
Merge pull request #144 from maurobonfietti/master
Browse files Browse the repository at this point in the history
Add new test to find all users by default
  • Loading branch information
l0gicgate committed Jan 24, 2020
2 parents 39597f8 + 612263d commit f544b30
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -19,6 +19,21 @@ public function testFindAll()
$this->assertEquals([$user], $userRepository->findAll());
}

public function testFindAllUsersByDefault()
{
$users = [
1 => new User(1, 'bill.gates', 'Bill', 'Gates'),
2 => new User(2, 'steve.jobs', 'Steve', 'Jobs'),
3 => new User(3, 'mark.zuckerberg', 'Mark', 'Zuckerberg'),
4 => new User(4, 'evan.spiegel', 'Evan', 'Spiegel'),
5 => new User(5, 'jack.dorsey', 'Jack', 'Dorsey'),
];

$userRepository = new InMemoryUserRepository();

$this->assertEquals(array_values($users), $userRepository->findAll());
}

public function testFindUserOfId()
{
$user = new User(1, 'bill.gates', 'Bill', 'Gates');
Expand Down

0 comments on commit f544b30

Please sign in to comment.