You are here

public function ProxyClassGeneratorTest::testProxyRespectsByRefMethodParameters in Plug 7

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php, line 83

Class

ProxyClassGeneratorTest
Test the proxy generator. Its work is generating on-the-fly subclasses of a given model, which implement the Proxy pattern.

Namespace

Doctrine\Tests\Common\Proxy

Code

public function testProxyRespectsByRefMethodParameters() {
  $method = new ReflectionMethod($this->proxyClass, 'byRefParamMethod');
  $parameters = $method
    ->getParameters();
  $this
    ->assertSame('thisIsNotByRef', $parameters[0]
    ->getName());
  $this
    ->assertFalse($parameters[0]
    ->isPassedByReference());
  $this
    ->assertSame('thisIsByRef', $parameters[1]
    ->getName());
  $this
    ->assertTrue($parameters[1]
    ->isPassedByReference());
}