|
@@ -36,10 +36,17 @@ class ObjectDecoratorTest extends \PHPUnit_Framework_TestCase
|
|
|
{
|
|
|
$this->assertEquals('<strong>escaped!</strong>', self::$escaped->__toString(), 'The escaped object behaves like the real object');
|
|
|
}
|
|
|
+
|
|
|
+ public function testMagicGet()
|
|
|
+ {
|
|
|
+ $this->assertEquals('<em>escape me</em>', self::$escaped->someMember, 'The escaped object behaves like the real object');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
class OutputEscaperTest
|
|
|
{
|
|
|
+ public $someMember = '<em>escape me</em>';
|
|
|
+
|
|
|
public function __toString()
|
|
|
{
|
|
|
return $this->getTitle();
|