Implement startTest rather than startTestSuite

Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.
This commit is contained in:
Grégoire Paris 2018-09-17 22:24:45 +02:00
parent 4957fa0c83
commit 63671d1633
No known key found for this signature in database
GPG Key ID: 24D48B8012B116BF
3 changed files with 9 additions and 9 deletions

View File

@ -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>
* *

View File

@ -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>
* *

View File

@ -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);
} }
} }