fix tests against PhpUnit 10 refactors

This commit is contained in:
Fabio Ivona
2022-08-25 16:19:22 +02:00
parent c0d66b7dc7
commit a4ec4b2841
5 changed files with 19 additions and 16 deletions

View File

@ -60,13 +60,13 @@ it('guesses if the given argument is a class or function', function () {
})->covers(TestCoversClass3::class, 'testCoversFunction');
it('appends CoversNothing to method attributes', function () {
$phpDoc = (new ReflectionClass($this))->getMethod($this->getName());
$phpDoc = (new ReflectionClass($this))->getMethod($this->name());
expect(str_contains($phpDoc->getDocComment(), '* @coversNothing'))->toBeTrue();
})->coversNothing();
it('does not append CoversNothing to other methods', function () {
$phpDoc = (new ReflectionClass($this))->getMethod($this->getName());
$phpDoc = (new ReflectionClass($this))->getMethod($this->name());
expect(str_contains($phpDoc->getDocComment(), '* @coversNothing'))->toBeFalse();
});