bump tests to phpstan level 5 (#1922)

This commit is contained in:
Kevin Papst
2020-09-05 16:48:19 +02:00
committed by GitHub
parent b69ea0648c
commit ed528eb19a
35 changed files with 128 additions and 93 deletions

View File

@@ -75,11 +75,22 @@ class AnnotationExtractorTest extends TestCase
$sut = new AnnotationExtractor(new AnnotationReader());
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('AnnotationExtractor needs a class name (string) for work');
$this->expectExceptionMessage('AnnotationExtractor needs a non-empty class name for work');
/* @phpstan-ignore-next-line */
$sut->extract(new \stdClass());
}
public function testExceptionOnEmptyString()
{
$sut = new AnnotationExtractor(new AnnotationReader());
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('AnnotationExtractor needs a non-empty class name for work');
$sut->extract('');
}
public function testExceptionOnMissingExpression()
{
$sut = new AnnotationExtractor(new AnnotationReader());

View File

@@ -61,6 +61,7 @@ class MetaFieldExtractorTest extends TestCase
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('MetaFieldExtractor needs a MetaDisplayEventInterface instance for work');
/* @phpstan-ignore-next-line */
$sut->extract(new \stdClass());
}
}

View File

@@ -60,6 +60,7 @@ class UserPreferenceExtractorTest extends TestCase
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('UserPreferenceExtractor needs a UserPreferenceDisplayEvent instance for work');
/* @phpstan-ignore-next-line */
$sut->extract(new \stdClass());
}
}