Implement startTest rather than startTestSuite
Passing a TestSuite instance to CoverageListenerTrait::testStart() will have no effect.
This commit is contained in:
parent
4957fa0c83
commit
63671d1633
@ -12,8 +12,8 @@
|
|||||||
namespace Symfony\Bridge\PhpUnit\Legacy;
|
namespace Symfony\Bridge\PhpUnit\Legacy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CoverageListener adds `@covers <className>` on each test suite when possible
|
* CoverageListener adds `@covers <className>` on each test when possible to
|
||||||
* to make the code coverage more accurate.
|
* make the code coverage more accurate.
|
||||||
*
|
*
|
||||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||||
*
|
*
|
||||||
|
@ -15,8 +15,8 @@ use PHPUnit\Framework\BaseTestListener;
|
|||||||
use PHPUnit\Framework\Test;
|
use PHPUnit\Framework\Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CoverageListener adds `@covers <className>` on each test suite when possible
|
* CoverageListener adds `@covers <className>` on each test when possible to
|
||||||
* to make the code coverage more accurate.
|
* make the code coverage more accurate.
|
||||||
*
|
*
|
||||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||||
*
|
*
|
||||||
|
@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
namespace Symfony\Bridge\PhpUnit\Legacy;
|
namespace Symfony\Bridge\PhpUnit\Legacy;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\Test;
|
||||||
use PHPUnit\Framework\TestListener;
|
use PHPUnit\Framework\TestListener;
|
||||||
use PHPUnit\Framework\TestListenerDefaultImplementation;
|
use PHPUnit\Framework\TestListenerDefaultImplementation;
|
||||||
use PHPUnit\Framework\TestSuite;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CoverageListener adds `@covers <className>` on each test suite when possible
|
* CoverageListener adds `@covers <className>` on each test when possible to
|
||||||
* to make the code coverage more accurate.
|
* make the code coverage more accurate.
|
||||||
*
|
*
|
||||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||||
*
|
*
|
||||||
@ -34,8 +34,8 @@ class CoverageListenerForV7 implements TestListener
|
|||||||
$this->trait = new CoverageListenerTrait($sutFqcnResolver, $warningOnSutNotFound);
|
$this->trait = new CoverageListenerTrait($sutFqcnResolver, $warningOnSutNotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function startTestSuite(TestSuite $suite): void
|
public function startTest(Test $test): void
|
||||||
{
|
{
|
||||||
$this->trait->startTest($suite);
|
$this->trait->startTest($test);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user