Fix as per review
This commit is contained in:
parent
7d98135084
commit
04acde667a
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user