You are here

protected function ProxyClassGeneratorTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php \Doctrine\Tests\Common\Proxy\ProxyClassGeneratorTest::setUp()

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Overrides PHPUnit_Framework_TestCase::setUp

File

vendor/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);
}