Skip to content

Commit

Permalink
Merge pull request #28002 from MammutAlex/5.8
Browse files Browse the repository at this point in the history
[5.8] Corrected test for support optional
  • Loading branch information
taylorotwell authored Mar 25, 2019
2 parents 553908e + 3eae3dd commit 9898c3d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Support/SupportOptionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function testIssetExistItemOnArray()
$optional = new Optional($targetArr);

$this->assertTrue(isset($optional['item']));
$this->assertTrue(isset($optional->item));
}

public function testIssetNotExistItemOnArray()
Expand All @@ -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));
}
}

0 comments on commit 9898c3d

Please sign in to comment.