Fix conflicts between Bridge/PhpUnit and Debug fixtures
This commit is contained in:
parent
ace6464d5c
commit
3392f9f32d
@ -27,11 +27,11 @@ class CoverageListenerTest extends TestCase
|
||||
|
||||
exec("$php -d zend_extension=xdebug.so $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text", $output);
|
||||
$output = implode("\n", $output);
|
||||
$this->assertContains('Foo', $output);
|
||||
$this->assertContains('FooCov', $output);
|
||||
|
||||
exec("$php -d zend_extension=xdebug.so $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text", $output);
|
||||
$output = implode("\n", $output);
|
||||
$this->assertNotContains('Foo', $output);
|
||||
$this->assertNotContains('FooCov', $output);
|
||||
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);
|
||||
$this->assertNotContains("CoversTest::test\nCould not find the tested class.", $output);
|
||||
$this->assertNotContains("CoversDefaultClassTest::test\nCould not find the tested class.", $output);
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
namespace PhpUnitCoverageTest;
|
||||
|
||||
class Bar
|
||||
class BarCov
|
||||
{
|
||||
private $foo;
|
||||
|
||||
public function __construct(Foo $foo)
|
||||
public function __construct(FooCov $foo)
|
||||
{
|
||||
$this->foo = $foo;
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace PhpUnitCoverageTest;
|
||||
|
||||
class Foo
|
||||
class FooCov
|
||||
{
|
||||
public function fooZ()
|
||||
{
|
@ -17,12 +17,12 @@ class BarTest extends TestCase
|
||||
{
|
||||
public function testBar()
|
||||
{
|
||||
if (!class_exists('PhpUnitCoverageTest\Foo')) {
|
||||
if (!class_exists('PhpUnitCoverageTest\FooCov')) {
|
||||
$this->markTestSkipped('This test is not part of the main Symfony test suite. It\'s here to test the CoverageListener.');
|
||||
}
|
||||
|
||||
$foo = new \PhpUnitCoverageTest\Foo();
|
||||
$bar = new \PhpUnitCoverageTest\Bar($foo);
|
||||
$foo = new \PhpUnitCoverageTest\FooCov();
|
||||
$bar = new \PhpUnitCoverageTest\BarCov($foo);
|
||||
|
||||
$this->assertSame('bar', $bar->barZ());
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require __DIR__.'/../src/Bar.php';
|
||||
require __DIR__.'/../src/Foo.php';
|
||||
require __DIR__.'/../src/BarCov.php';
|
||||
require __DIR__.'/../src/FooCov.php';
|
||||
|
||||
require __DIR__.'/../../../../Legacy/CoverageListenerTrait.php';
|
||||
if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Version::id(), '6.0.0', '<')) {
|
||||
|
Reference in New Issue
Block a user