diff --git a/tests/Doctrine/Tests/Models/DDC2372/DDC2372Address.php b/tests/Doctrine/Tests/Models/DDC2372/DDC2372Address.php new file mode 100644 index 000000000..26144c61d --- /dev/null +++ b/tests/Doctrine/Tests/Models/DDC2372/DDC2372Address.php @@ -0,0 +1,45 @@ +id; + } + + public function getStreet() + { + return $this->street; + } + + public function setStreet($street) + { + $this->street = $street; + } + + public function getUser() + { + return $this->user; + } + + public function setUser(User $user) + { + if ($this->user !== $user) { + $this->user = $user; + $user->setAddress($this); + } + } +} \ No newline at end of file diff --git a/tools/sandbox/Entities/TraitedUser.php b/tests/Doctrine/Tests/Models/DDC2372/DDC2372User.php similarity index 68% rename from tools/sandbox/Entities/TraitedUser.php rename to tests/Doctrine/Tests/Models/DDC2372/DDC2372User.php index fe0b68754..4df0df6a5 100644 --- a/tools/sandbox/Entities/TraitedUser.php +++ b/tests/Doctrine/Tests/Models/DDC2372/DDC2372User.php @@ -1,13 +1,13 @@ _getTestEntityManager(); $cmf->setEntityManager($em); - $user = new TraitedUser(); + $user = new DDC2372User(); $metadata = $cmf->getMetadataFor(get_class($user)); - $metadata->name = $this->_namespace . "\TraitedUser"; + $metadata->name = $this->_namespace . "\DDC2372User"; $metadata->namespace = $this->_namespace; $this->_generator->writeEntityClass($metadata, $this->_tmpDir); - $this->assertFileExists($this->_tmpDir . "/" . $this->_namespace . "/TraitedUser.php"); - require $this->_tmpDir . "/" . $this->_namespace . "/TraitedUser.php"; + $this->assertFileExists($this->_tmpDir . "/" . $this->_namespace . "/DDC2372User.php"); + require $this->_tmpDir . "/" . $this->_namespace . "/DDC2372User.php"; $reflClass = new \ReflectionClass($metadata->name); diff --git a/tests/Doctrine/Tests/TestInit.php b/tests/Doctrine/Tests/TestInit.php index ac7f7354b..c257a75b6 100644 --- a/tests/Doctrine/Tests/TestInit.php +++ b/tests/Doctrine/Tests/TestInit.php @@ -17,7 +17,6 @@ if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) { } /* @var $classLoader \Composer\Autoload\ClassLoader */ -$classLoader->add('Entities', __DIR__ . '/../../../tools/sandbox'); $classLoader->add('Doctrine\\Tests\\', __DIR__ . '/../../'); unset($classLoader);