More tests

This commit is contained in:
Nuno Maduro
2023-05-27 14:08:38 +01:00
parent a90b90ad29
commit 26a6e7d712
12 changed files with 101 additions and 15 deletions

View File

@ -68,3 +68,11 @@ it('throws exception if no class nor method has been found', function () {
$testCall->covers('fakeName');
})->throws(InvalidArgumentException::class, 'No class or method named "fakeName" has been found.');
describe('a "describe" group of tests', function () {
it('does not append CoversNothing to method attributes', function () {
$phpDoc = (new ReflectionClass($this))->getMethod($this->name());
expect(str_contains($phpDoc->getDocComment(), '* @coversNothing'))->toBeTrue();
});
})->coversNothing();