Skip to content

Instantly share code, notes, and snippets.

@maks-rafalko
Created October 11, 2017 20:24
Show Gist options
  • Save maks-rafalko/c2aafc16acb66599faf24630e9249711 to your computer and use it in GitHub Desktop.
Save maks-rafalko/c2aafc16acb66599faf24630e9249711 to your computer and use it in GitHub Desktop.
<?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