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

Add extra assertions to test to ensure that flush actually succeeded in saving all items

This commit is contained in:
Darien Hager 2015-09-29 18:35:57 -07:00 committed by Marco Pivetta
parent 997000352a
commit 92dc39bfb9
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -48,6 +48,11 @@ class DDC2922Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->_em->flush();
// Verify the flush succeeded
$this->assertEquals($email, $this->_em->find(get_class($email),$email->id));
$this->assertEquals($address, $this->_em->find(get_class($address),$address->id));
$this->assertEquals($user, $this->_em->find(get_class($user),$user->id));
}
/**
@ -101,5 +106,11 @@ class DDC2922Test extends \Doctrine\Tests\OrmFunctionalTestCase
}
throw $e;
}
// Verify the flushes succeeded
$this->assertEquals($email, $this->_em->find(get_class($email),$email->id));
$this->assertEquals($address, $this->_em->find(get_class($address),$address->id));
$this->assertEquals($user, $this->_em->find(get_class($user),$user->id));
}
}