diff --git a/tests/Type/OopVisibilityTypeTest.php b/tests/Type/OopVisibilityTypeTest.php new file mode 100644 index 0000000..f501dcd --- /dev/null +++ b/tests/Type/OopVisibilityTypeTest.php @@ -0,0 +1,86 @@ + + * @copyright Meritoo + * + * @internal + * @covers \Meritoo\Common\Type\OopVisibilityType + */ +class OopVisibilityTypeTest extends BaseTypeTestCase +{ + /** + * {@inheritdoc} + */ + protected function getAllExpectedTypes(): array + { + return [ + 'IS_PRIVATE' => 3, + 'IS_PROTECTED' => 2, + 'IS_PUBLIC' => 1, + ]; + } + + /** + *{@inheritdoc} + */ + protected function getTestedTypeInstance(): BaseType + { + return new OopVisibilityType(); + } + + /** + * {@inheritdoc} + */ + public function provideTypeToVerify(): ?\Generator + { + yield[ + '', + false, + ]; + + yield[ + null, + false, + ]; + + yield[ + -1, + false, + ]; + + yield[ + true, + false, + ]; + + yield[ + 1, + true, + ]; + + yield[ + 2, + true, + ]; + + yield[ + 3, + true, + ]; + } +}