Skip to content

Instantly share code, notes, and snippets.

@icambridge
Created March 21, 2012 11:34
Show Gist options
  • Save icambridge/2146327 to your computer and use it in GitHub Desktop.
Save icambridge/2146327 to your computer and use it in GitHub Desktop.
Reflection fail
<?php
$reflection = new ReflectionObject($proxy);
$content = $reflection->getProperty('content ');
$content->setAccessible(true);
$_content = $content->getValue($proxy);
$this->assertEquals("content", $_content);
/**
var_dump of proxy contains.
===
object(Proxy)[36]
public 'content' => string 'content here mofo' (length=17)
===
But I get Unexpected exception of type [ReflectionException] with message [Property content does not exist]
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment