1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Corrected names to DDC3231

This commit is contained in:
encoder64 2014-09-06 18:29:14 +03:00
parent 859a5f88cb
commit cd547fecea
6 changed files with 40 additions and 74 deletions

View File

@ -1,7 +0,0 @@
<?php
namespace Doctrine\Tests\Models\DDC1089;
class DDC1089EntityRepository extends \Doctrine\ORM\EntityRepository
{
}

View File

@ -1,57 +0,0 @@
<?php
namespace Doctrine\Tests\Models\DDC1089;
/**
* @Entity(repositoryClass="DDC1089User2Repository")
* @Table(name="users2")
*/
class DDC1089User2
{
/**
* @Id
* @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @Column(type="string", length=255)
*/
protected $name;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return DDC1089User
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
}

View File

@ -0,0 +1,7 @@
<?php
namespace Doctrine\Tests\Models\DDC3231;
class DDC3231EntityRepository extends \Doctrine\ORM\EntityRepository
{
}

View File

@ -1,12 +1,12 @@
<?php
namespace Doctrine\Tests\Models\DDC1089;
namespace Doctrine\Tests\Models\DDC3231;
/**
* @Entity(repositoryClass="DDC1089UserRepository")
* @Entity(repositoryClass="DDC3231UserRepository")
* @Table(name="users")
*/
class DDC1089User
class DDC3231User
{
/**
* @Id

View File

@ -0,0 +1,23 @@
<?php
namespace Doctrine\Tests\Models\DDC3231;
/**
* @Entity(repositoryClass="DDC3231User2Repository")
* @Table(name="users2")
*/
class DDC3231User2
{
/**
* @Id
* @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @Column(type="string", length=255)
*/
protected $name;
}

View File

@ -57,17 +57,17 @@ class EntityRepositoryGeneratorTest extends \Doctrine\Tests\OrmTestCase
}
/**
* @group DDC-1089
* @group DDC-3231
*/
public function testGeneratedEntityRepositoryClass()
{
$em = $this->_getTestEntityManager();
$ns = $this->_namespace;
$className = 'DDC1089User';
$this->writeEntityClass('Doctrine\Tests\Models\DDC1089\\' . $className, $ns . '\\' . $className);
$className = 'DDC3231User';
$this->writeEntityClass('Doctrine\Tests\Models\DDC3231\\' . $className, $ns . '\\' . $className);
$rpath = $this->writeRepositoryClass($ns . '\\' . $className, 'Doctrine\Tests\Models\DDC1089\DDC1089EntityRepository');
$rpath = $this->writeRepositoryClass($ns . '\\' . $className, 'Doctrine\Tests\Models\DDC3231\DDC3231EntityRepository');
$this->assertNotNull($rpath);
$this->assertFileExists($rpath);
@ -77,11 +77,11 @@ class EntityRepositoryGeneratorTest extends \Doctrine\Tests\OrmTestCase
$repo = new \ReflectionClass($em->getRepository($ns . '\\' . $className));
$this->assertSame($ns . '\\' . $className . 'Repository', $repo->getName());
$this->assertSame('Doctrine\Tests\Models\DDC1089\DDC1089EntityRepository', $repo->getParentClass()->getName());
$this->assertSame('Doctrine\Tests\Models\DDC3231\DDC3231EntityRepository', $repo->getParentClass()->getName());
$className2 = 'DDC1089User2';
$this->writeEntityClass('Doctrine\Tests\Models\DDC1089\\' . $className2, $ns . '\\' . $className2);
$className2 = 'DDC3231User2';
$this->writeEntityClass('Doctrine\Tests\Models\DDC3231\\' . $className2, $ns . '\\' . $className2);
$rpath2 = $this->writeRepositoryClass($ns . '\\' . $className2);