mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-13 01:51:50 +01:00
BaseType::isCorrectType() method > make static
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user