Corrected names to DDC3231
This commit is contained in:
parent
859a5f88cb
commit
cd547fecea
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\Models\DDC1089;
|
||||
|
||||
class DDC1089EntityRepository extends \Doctrine\ORM\EntityRepository
|
||||
{
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\Models\DDC3231;
|
||||
|
||||
class DDC3231EntityRepository extends \Doctrine\ORM\EntityRepository
|
||||
{
|
||||
}
|
@ -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
|
23
tests/Doctrine/Tests/Models/DDC3231/DDC3231User2.php
Normal file
23
tests/Doctrine/Tests/Models/DDC3231/DDC3231User2.php
Normal 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;
|
||||
|
||||
}
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user