foo); Assert::false(isset($obj->foo)); // re-set $obj->foo = 'hello'; Assert::same('hello', $obj->foo); }); test('double unset', function () { $obj = new TestClass; unset($obj->foo, $obj->foo); }); test('reading of unset property', function () { Assert::exception(function () { $obj = new TestClass; unset($obj->foo); $val = $obj->foo; }, Nette\MemberAccessException::class, 'Cannot read an undeclared property TestClass::$foo.'); });