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

23 lines
537 B
PHP

--TEST--
Verifies that generated lazy loading value holders disallow protected property direct isset check
--FILE--
<?php
require_once __DIR__ . '/init.php';
class Kitchen
{
protected $sweets = 'candy';
}
$factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory($configuration);
$proxy = $factory->createProxy('Kitchen', function (& $wrapped, $proxy, $method, array $parameters, & $initializer) {
$initializer = null;
$wrapped = new Kitchen();
});
var_dump(isset($proxy->sweets));
?>
--EXPECT--
bool(false)