Created
March 21, 2012 11:34
-
-
Save icambridge/2146327 to your computer and use it in GitHub Desktop.
Reflection fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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