upgraded to phpunit 8 (#1155)
This commit is contained in:
@@ -53,9 +53,9 @@ class CsvRendererTest extends AbstractRendererTest
|
||||
$this->assertTrue(file_exists($file->getRealPath()));
|
||||
$content = file_get_contents($file->getRealPath());
|
||||
|
||||
$this->assertContains('"' . $totalDuration . '"', $content);
|
||||
$this->assertContains('"' . $totalRate . '"', $content);
|
||||
$this->assertContains('"' . $expectedRate . '"', $content);
|
||||
$this->assertStringContainsString('"' . $totalDuration . '"', $content);
|
||||
$this->assertStringContainsString('"' . $totalRate . '"', $content);
|
||||
$this->assertStringContainsString('"' . $expectedRate . '"', $content);
|
||||
$this->assertEquals($expectedRows, substr_count($content, PHP_EOL));
|
||||
$this->assertEquals($expectedDescriptions, substr_count($content, 'activity description'));
|
||||
$this->assertEquals($expectedUser1, substr_count($content, ',"kevin",'));
|
||||
|
||||
@@ -49,17 +49,17 @@ class HtmlRendererTest extends AbstractRendererTest
|
||||
|
||||
$content = $response->getContent();
|
||||
|
||||
$this->assertContains('<h2>List of expenses</h2>', $content);
|
||||
$this->assertContains('<h3>Summary</h3>', $content);
|
||||
$this->assertStringContainsString('<h2>List of expenses</h2>', $content);
|
||||
$this->assertStringContainsString('<h3>Summary</h3>', $content);
|
||||
$this->assertEquals(1, substr_count($content, 'id="export-summary"'));
|
||||
$this->assertEquals(1, substr_count($content, 'id="export-records"'));
|
||||
$this->assertEquals(1, substr_count($content, 'id="summary-project"'));
|
||||
$this->assertEquals(1, substr_count($content, 'id="summary-activity"'));
|
||||
|
||||
$this->assertContains('<td>Customer Name</td>', $content);
|
||||
$this->assertContains('<td>project name</td>', $content);
|
||||
$this->assertContains('<td class="duration">01:50 h</td>', $content);
|
||||
$this->assertContains('<td class="cost">€2,437.12</td>', $content);
|
||||
$this->assertStringContainsString('<td>Customer Name</td>', $content);
|
||||
$this->assertStringContainsString('<td>project name</td>', $content);
|
||||
$this->assertStringContainsString('<td class="duration">01:50 h</td>', $content);
|
||||
$this->assertStringContainsString('<td class="cost">€2,437.12</td>', $content);
|
||||
|
||||
// 5 times in the "full list" and once in the "summary with activities"
|
||||
$this->assertEquals(6, substr_count($content, 'activity description'));
|
||||
|
||||
Reference in New Issue
Block a user