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)); } }