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