From 2bbd0a4ef342a088cc477eb2d57752712689f175 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Wed, 10 Apr 2019 09:09:44 +0200 Subject: [PATCH] PHPUnit > increase code coverage --- tests/Type/OopVisibilityTypeTest.php | 86 ++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 tests/Type/OopVisibilityTypeTest.php 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, + ]; + } +}