* @license MIT * * @group Coverage */ class MagicMethodGeneratorTest extends PHPUnit_Framework_TestCase { /** * @covers \ProxyManager\Generator\MagicMethodGenerator::__construct */ public function testGeneratesCorrectByRefReturnValue() { $reflection = new ReflectionClass('ProxyManagerTestAsset\\ClassWithByRefMagicMethods'); $magicMethod = new MagicMethodGenerator($reflection, '__get', array('name')); $this->assertTrue($magicMethod->returnsReference()); } /** * @covers \ProxyManager\Generator\MagicMethodGenerator::__construct */ public function testGeneratesCorrectByValReturnValue() { $reflection = new ReflectionClass('ProxyManagerTestAsset\\ClassWithMagicMethods'); $magicMethod = new MagicMethodGenerator($reflection, '__get', array('name')); $this->assertFalse($magicMethod->returnsReference()); } }