Created
October 11, 2017 20:24
-
-
Save maks-rafalko/c2aafc16acb66599faf24630e9249711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @dataProvider usersProvider | |
*/ | |
public function test_it_filters_adults(array $users, int $expectedCount) | |
{ | |
$filter = new UserFilterAge(); | |
$this->assertCount($expectedCount, $filter($users)); | |
} | |
public function usersProvider() | |
{ | |
return [ | |
[ | |
[ | |
['age' => 15], | |
['age' => 20], | |
], | |
1 | |
], | |
[ | |
[ | |
['age' => 18], | |
], | |
1 | |
] | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment