Skip to content

Instantly share code, notes, and snippets.

@jzawadzki
Created November 15, 2021 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzawadzki/05ad86b9386e9ccffae9611c42632992 to your computer and use it in GitHub Desktop.
Save jzawadzki/05ad86b9386e9ccffae9611c42632992 to your computer and use it in GitHub Desktop.
<?php
class MyTeamProviderTest extends WebTestCase
{
/**
* @dataProvider dataProvider
*/
public function test_my_team()
{
$client = static::createClient();
$userRepository = static::getContainer()->get(UserRepository::class);
//lub inaczej wziąć usera
$testUser = $userRepository->findOneByEmail('test@user.pl');
$client->loginUser($testUser);
//instancja serwisu
$myTeamProvider = static::getContainer()->get(MyTeamProvider::class);
$myTeam = $myTeamProvider->provide();
$this->assertCount($expectedNumberOfProjects, $myTeam);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment