Skip to content

Commit 1680381

Browse files
committed
Use assertStringContainsString when needed
1 parent 14934c8 commit 1680381

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Tests/CoverageListenerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ public function test()
3333

3434
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
3535
$output = implode("\n", $output);
36-
$this->assertContains('FooCov', $output);
36+
$this->assertStringContainsString('FooCov', $output);
3737

3838
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
3939
$output = implode("\n", $output);
40-
$this->assertNotContains('FooCov', $output);
41-
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);
42-
$this->assertNotContains("CoversTest::test\nCould not find the tested class.", $output);
43-
$this->assertNotContains("CoversDefaultClassTest::test\nCould not find the tested class.", $output);
44-
$this->assertNotContains("CoversNothingTest::test\nCould not find the tested class.", $output);
40+
$this->assertStringNotContainsString('FooCov', $output);
41+
$this->assertStringContainsString("SutNotFoundTest::test\nCould not find the tested class.", $output);
42+
$this->assertStringNotContainsString("CoversTest::test\nCould not find the tested class.", $output);
43+
$this->assertStringNotContainsString("CoversDefaultClassTest::test\nCould not find the tested class.", $output);
44+
$this->assertStringNotContainsString("CoversNothingTest::test\nCould not find the tested class.", $output);
4545
}
4646
}

0 commit comments

Comments
 (0)