BaseType::isCorrectType() method > make static

This commit is contained in:
Meritoo
2019-05-05 23:05:42 +02:00
parent dd5ac0f7e6
commit a6b2704c66
10 changed files with 86 additions and 79 deletions

View File

@@ -187,7 +187,7 @@ trait BaseTestCaseTrait
int $requiredArgumentsCount = 0
): void {
// Type of visibility is not correct?
if (!(new OopVisibilityType())->isCorrectType($visibilityType)) {
if (!OopVisibilityType::isCorrectType($visibilityType)) {
throw UnknownOopVisibilityTypeException::createException($visibilityType);
}

View File

@@ -33,14 +33,14 @@ trait BaseTypeTestCaseTrait
/**
* Verifies whether given type is correct or not
*
* @param null|string $type Type to verify
* @param bool $expected Information if given type is correct or not
* @param bool $isCorrect Information if processed type is correct
* @param bool $expected Expected information if processed type is correct
*
* @dataProvider provideTypeToVerify
*/
public function testIfGivenTypeIsCorrect(?string $type, bool $expected): void
public function testIfGivenTypeIsCorrect(bool $isCorrect, bool $expected): void
{
static::assertEquals($expected, $this->getTestedTypeInstance()->isCorrectType($type));
static::assertEquals($expected, $isCorrect);
}
/**