setAmount(50); $fixture->setAmountRunning(10); $fixture->setUser($this->getUserByRole($role)); $fixture->setStartDate(new \DateTime()); $this->importFixture($fixture); } abstract protected function getReportUrl(): string; abstract protected function getBoxId(): string; public function testIsSecure(): void { $this->assertUrlIsSecured($this->getReportUrl()); } public function getTestData(): array { return [ [4, 'duration', 'Working hours total'], [4, 'rate', 'Total revenue'], [4, 'internalRate', 'Internal price'], ]; } /** * @dataProvider getTestData */ public function testUserPeriodReport(int $user, string $dataType, string $title): void { $client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN); $this->importReportingFixture(User::ROLE_SUPER_ADMIN); $this->assertAccessIsGranted($client, sprintf('%s?user=%s&date=12999119191&sumType=%s', $this->getReportUrl(), $user, $dataType)); self::assertStringContainsString(sprintf('