Files
san-reymoros/vendor/ocramius/proxy-manager/tests/language-feature-scripts/access-interceptor-denies-protected-property-unset.phpt
gauvainboiche 058c2110e9 first commit
2020-03-03 22:45:25 +01:00

20 lines
417 B
PHP

--TEST--
Verifies that generated access interceptors disallow protected property direct unset
--FILE--
<?php
require_once __DIR__ . '/init.php';
class Kitchen
{
protected $sweets;
}
$factory = new \ProxyManager\Factory\AccessInterceptorValueHolderFactory($configuration);
$proxy = $factory->createProxy(new Kitchen());
unset($proxy->sweets);
?>
--EXPECTF--
%SFatal error: Cannot %s property%sin %s on line %d