phpunit-globals icon indicating copy to clipboard operation
phpunit-globals copied to clipboard

Also parse classes parent's attributes

Open gisostallenberg opened this issue 2 years ago • 2 comments
trafficstars

gisostallenberg avatar Aug 17 '23 08:08 gisostallenberg

If this is an acceptable change I will add tests.

To add some context: I have a set of test cases that share some different settings and would like to add an abstract test case as a base for them.

#[\Zalas\PHPUnit\Globals\Attribute\Server('MY_SETTING', 'value')]
abstract SpecialTestCase extends \PHPUnit\Framework\TestCase {
    // ...
}

final class SpecificTest extends SpecialTestCase {
    // ...
}

gisostallenberg avatar Aug 17 '23 08:08 gisostallenberg

It does make sense. It needs to be done carefully though. There might be a performance impact while trying to parse the base phpunit test case (which I see you’re preventing👍).

jakzal avatar Aug 17 '23 11:08 jakzal

Closing due to inactivity. If you're still interested in contributing this, feel free to resubmit 👍

jakzal avatar May 20 '24 08:05 jakzal