From 3eae3dd11f94405e41f992355ac16c5e1e61afb0 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 25 Mar 2019 09:55:55 +0200 Subject: [PATCH] Corrected test for support optional --- tests/Support/SupportOptionalTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Support/SupportOptionalTest.php b/tests/Support/SupportOptionalTest.php index 343cc457a1f6..9f5560ab5d08 100644 --- a/tests/Support/SupportOptionalTest.php +++ b/tests/Support/SupportOptionalTest.php @@ -79,6 +79,7 @@ public function testIssetExistItemOnArray() $optional = new Optional($targetArr); $this->assertTrue(isset($optional['item'])); + $this->assertTrue(isset($optional->item)); } public function testIssetNotExistItemOnArray() @@ -88,5 +89,15 @@ public function testIssetNotExistItemOnArray() $optional = new Optional($targetArr); $this->assertFalse(isset($optional['item'])); + $this->assertFalse(isset($optional->item)); + } + + public function testIssetExistItemOnNull() + { + $targetNull = null; + + $optional = new Optional($targetNull); + + $this->assertFalse(isset($optional->item)); } }