You are here

private function ProxyClassGeneratorTest::createClassMetadata in Plug 7

6 calls to ProxyClassGeneratorTest::createClassMetadata()
ProxyClassGeneratorTest::testClassWithCallableTypeHintOnProxiedMethod in lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
ProxyClassGeneratorTest::testClassWithInvalidTypeHintOnProxiedMethod in lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
ProxyClassGeneratorTest::testClassWithSleepProxyGeneration in lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
ProxyClassGeneratorTest::testClassWithStaticPropertyProxyGeneration in lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
Check that the proxy doesn't serialize static properties (in __sleep() method) @group DCOM-212
ProxyClassGeneratorTest::testClassWithVariadicArgumentOnProxiedMethod in lib/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php

... See full list

File

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

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

private function createClassMetadata($className, array $ids) {
  $metadata = $this
    ->getMock('Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata');
  $reflClass = new ReflectionClass($className);
  $metadata
    ->expects($this
    ->any())
    ->method('getReflectionClass')
    ->will($this
    ->returnValue($reflClass));
  $metadata
    ->expects($this
    ->any())
    ->method('getIdentifierFieldNames')
    ->will($this
    ->returnValue($ids));
  $metadata
    ->expects($this
    ->any())
    ->method('getName')
    ->will($this
    ->returnValue($className));
  return $metadata;
}