-
-
Notifications
You must be signed in to change notification settings - Fork 387
Missing code coverage on objects within @dataProvider methods #920
Copy link
Copy link
Closed
atk4/core
#352Description
| Q | A |
|---|---|
| php-code-coverage version | 9.2.15 |
| PHP version | 8.1.7 |
| Driver | PCOV (same result in XDebug - Github actions |
| PCOV version (if used) | 1.0.11 |
| Installation Method | Composer |
| Usage Method | PHPUnit |
| PHPUnit version (if used) | 9.5.21 |
Hi,
I have an issue while collecting code coverage only when objects are constructed in @dataProvider method.
The code coverage will collect code coverage in test methods.
I'm constructing objects within the dataProvider to allow different "checks" based on "closure" I'm passing to the object.
Is this desired functionality?
Verification
Repository: https://github.com/wrk-flow/php-get-typed-value
vendor/bin/phpunit --coverage-textIf I add new test to ArrayTransformerTest file then the code coverage for ArrayTransformer is collected.
public function testCoverage(): void
{
$test = new ArrayTransformer(closure: fn () => []);
$this->assertNotNull($test);
}
```phpReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
