You are here

protected function ProxyClassGeneratorTest::setUp in Plug 7

File

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

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

protected function setUp() {
  $this->metadata = new LazyLoadableObjectClassMetadata();
  $this->proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true);
  if (class_exists($this->proxyClass, false)) {
    return;
  }
  $this
    ->generateAndRequire($this->proxyGenerator, $this->metadata);
}