use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildStdClass;
use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildTestClass;
use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\LazyClass;
use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\MagicClass;
use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ReadOnlyClass;
use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\TestClass;
class LazyGhostTraitTest extends TestCase
{ public function testGetPublic() { $instance = ChildTestClass::
createLazyGhost(function DChildTestClass
$ghost) { $ghost->
__construct();
});
$this->
assertSame(["\0".TestClass::
class."\0lazyObjectState"
],
array_keys((array) $instance));
$this->
assertSame(-4,
$instance->public
);
$this->
assertSame(4,
$instance->publicReadonly
);
} public function testGetPrivate() { $instance = ChildTestClass::
createLazyGhost(function DChildTestClass
$ghost) {