setAmount(50); $fixture->setAmountRunning(10); $fixture->setUser($this->getUserByRole($role)); $fixture->setStartDate(new \DateTime()); $this->importFixture($fixture); } public function testYearlyListIsSecure() { $this->assertUrlIsSecured('/reporting/yearly_users_list'); } public function testWeeklyListIsSecure() { $this->assertUrlIsSecured('/reporting/weekly_users_list'); } public function testMonthlyListIsSecure() { $this->assertUrlIsSecured('/reporting/monthly_users_list'); } public function testYearlyUsersListIsSecureForUserRole() { $this->assertUrlIsSecuredForRole(User::ROLE_USER, '/reporting/yearly_users_list'); } public function testWeeklyUsersListIsSecureForUserRole() { $this->assertUrlIsSecuredForRole(User::ROLE_USER, '/reporting/weekly_users_list'); } public function testMonthlyUsersListIsSecureForUserRole() { $this->assertUrlIsSecuredForRole(User::ROLE_USER, '/reporting/monthly_users_list'); } public function testYearlyUsersReport() { $client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD); $this->importReportingFixture(User::ROLE_TEAMLEAD); $this->assertAccessIsGranted($client, '/reporting/yearly_users_list'); self::assertStringContainsString('
count()); } public function testWeeklyUsersReport() { $client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD); $this->importReportingFixture(User::ROLE_TEAMLEAD); $this->assertAccessIsGranted($client, '/reporting/weekly_users_list'); self::assertStringContainsString('
count()); } public function testMonthlyUsersReport() { $client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD); $this->importReportingFixture(User::ROLE_TEAMLEAD); $this->assertAccessIsGranted($client, '/reporting/monthly_users_list'); self::assertStringContainsString('
count()); } }