1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Fix as per review

This commit is contained in:
Alessandro Lai 2017-04-18 11:57:49 +02:00 committed by Sergio Santoro
parent 7d98135084
commit 04acde667a
2 changed files with 6 additions and 7 deletions

View File

@ -28,9 +28,9 @@ namespace Doctrine\Tests\ORM\Functional {
$this->assertCount(1, $result);
foreach ($result as $r) {
$this->assertInstanceOf('Doctrine\Tests\ORM\Functional\InstanceOfAbstractTest\Person', $r);
$this->assertInstanceOf('Doctrine\Tests\ORM\Functional\InstanceOfAbstractTest\Employee', $r);
$this->assertEquals('bar', $r->getName());
$this->assertInstanceOf(InstanceOfAbstractTest\Person::class, $r);
$this->assertInstanceOf(InstanceOfAbstractTest\Employee::class, $r);
$this->assertSame('bar', $r->getName());
}
}
@ -109,5 +109,4 @@ namespace Doctrine\Tests\ORM\Functional\InstanceOfAbstractTest {
$this->departement = $departement;
}
}
}

View File

@ -10,10 +10,10 @@ namespace Doctrine\Tests\ORM\Functional {
{
parent::setUp();
$this->_schemaTool->createSchema(array(
$this->_schemaTool->createSchema([
$this->_em->getClassMetadata(__NAMESPACE__ . '\InstanceOfTest\Person'),
$this->_em->getClassMetadata(__NAMESPACE__ . '\InstanceOfTest\Employee'),
));
]);
}
public function testInstanceOf()
@ -28,7 +28,7 @@ namespace Doctrine\Tests\ORM\Functional {
$this->assertCount(2, $result);
foreach ($result as $r) {
$this->assertInstanceOf('Doctrine\Tests\ORM\Functional\InstanceOfTest\Person', $r);
$this->assertInstanceOf(InstanceOfTest\Person::class, $r);
if ($r instanceof InstanceOfTest\Employee) {
$this->assertEquals('bar', $r->getName());
} else {