bug #28495 [PhpUnitBridge] Implement startTest rather than startTestSuite (greg0ire)
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Implement startTest rather than startTestSuite
Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Closes #28481
Commits
-------
63671d1633
Implement startTest rather than startTestSuite
This commit is contained in:
commit
e597dba77d
@ -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