diff --git a/test/unit/ProtectedGlobalTest.php b/test/unit/ProtectedGlobalTest.php index 2c490e2..267153d 100644 --- a/test/unit/ProtectedGlobalTest.php +++ b/test/unit/ProtectedGlobalTest.php @@ -73,4 +73,21 @@ public function testOffsetUnsetThrowsException() { self::expectException(ProtectedGlobalException::class); unset($sut["something"]); } + + public function testOffsetUnset() { + $whiteList = [ + "name" => "test", + "country" => "United Kingdom", + ]; + $sut = new ProtectedGlobal($whiteList); + + $exception = null; + + try { + unset($sut["name"]); + } + catch(\Exception $exception) {} + + self::assertNull($exception); + } } \ No newline at end of file