Move tests to ticket namespace (and rename them)
This commit is contained in:
parent
0e88f1b654
commit
bd47ec95a1
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional {
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket {
|
||||
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfAbstractTest\Employee;
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfAbstractTest\Person;
|
||||
use Doctrine\Tests\OrmFunctionalTestCase;
|
||||
|
||||
class InstanceOfAbstractTest extends OrmFunctionalTestCase
|
||||
class Ticket4646InstanceOfAbstractTest extends OrmFunctionalTestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
@ -30,15 +30,15 @@ namespace Doctrine\Tests\ORM\Functional {
|
||||
$this->assertCount(1, $result);
|
||||
|
||||
foreach ($result as $r) {
|
||||
$this->assertInstanceOf(InstanceOfAbstractTest\Person::class, $r);
|
||||
$this->assertInstanceOf(InstanceOfAbstractTest\Employee::class, $r);
|
||||
$this->assertInstanceOf(Person::class, $r);
|
||||
$this->assertInstanceOf(Employee::class, $r);
|
||||
$this->assertSame('bar', $r->getName());
|
||||
}
|
||||
}
|
||||
|
||||
private function loadData()
|
||||
{
|
||||
$employee = new InstanceOfAbstractTest\Employee();
|
||||
$employee = new Employee();
|
||||
$employee->setName('bar');
|
||||
$employee->setDepartement('qux');
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional {
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket {
|
||||
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfMultiLevelTest\Employee;
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfMultiLevelTest\Engineer;
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfMultiLevelTest\Person;
|
||||
use Doctrine\Tests\OrmFunctionalTestCase;
|
||||
|
||||
class InstanceOfMultiLevelTest extends OrmFunctionalTestCase
|
||||
class Ticket4646InstanceOfMultiLevelTest extends OrmFunctionalTestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
@ -33,7 +33,7 @@ namespace Doctrine\Tests\ORM\Functional {
|
||||
|
||||
foreach ($result as $r) {
|
||||
$this->assertInstanceOf(Person::class, $r);
|
||||
if ($r instanceof InstanceOfMultiLevelTest\Engineer) {
|
||||
if ($r instanceof Engineer) {
|
||||
$this->assertEquals('foobar', $r->getName());
|
||||
$this->assertEquals('doctrine', $r->getSpecialization());
|
||||
} elseif ($r instanceof Employee) {
|
@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional {
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket {
|
||||
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfTest\Employee;
|
||||
use Doctrine\Tests\ORM\Functional\InstanceOfTest\Person;
|
||||
use Doctrine\Tests\OrmFunctionalTestCase;
|
||||
|
||||
class InstanceOfTest extends OrmFunctionalTestCase
|
||||
class Ticket4646InstanceOfTest extends OrmFunctionalTestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
@ -28,8 +30,8 @@ namespace Doctrine\Tests\ORM\Functional {
|
||||
$this->assertCount(2, $result);
|
||||
|
||||
foreach ($result as $r) {
|
||||
$this->assertInstanceOf(InstanceOfTest\Person::class, $r);
|
||||
if ($r instanceof InstanceOfTest\Employee) {
|
||||
$this->assertInstanceOf(Person::class, $r);
|
||||
if ($r instanceof Employee) {
|
||||
$this->assertEquals('bar', $r->getName());
|
||||
} else {
|
||||
$this->assertEquals('foo', $r->getName());
|
||||
@ -39,10 +41,10 @@ namespace Doctrine\Tests\ORM\Functional {
|
||||
|
||||
private function loadData()
|
||||
{
|
||||
$person = new InstanceOfTest\Person();
|
||||
$person = new Person();
|
||||
$person->setName('foo');
|
||||
|
||||
$employee = new InstanceOfTest\Employee();
|
||||
$employee = new Employee();
|
||||
$employee->setName('bar');
|
||||
$employee->setDepartement('qux');
|
||||
|
Loading…
x
Reference in New Issue
Block a user