1
0
mirror of synced 2025-02-09 08:49:26 +03:00

#6613 #6614 #6616 adding void return type to newly introduced test methods

This commit is contained in:
Marco Pivetta 2017-08-11 21:28:18 +02:00
parent c2dd274c42
commit 352b3ba6f6
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -3,7 +3,6 @@
namespace Doctrine\Tests\ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\PersistentCollection;
use Doctrine\ORM\UnitOfWork;
use Doctrine\Tests\Mocks\ConnectionMock;
@ -150,7 +149,7 @@ class PersistentCollectionTest extends OrmTestCase
* @group 6614
* @group 6616
*/
public function testWillKeepNewItemsInDirtyCollectionAfterInitialization()
public function testWillKeepNewItemsInDirtyCollectionAfterInitialization() : void
{
/* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */
$unitOfWork = $this->createMock(UnitOfWork::class);
@ -169,7 +168,7 @@ class PersistentCollectionTest extends OrmTestCase
->expects(self::once())
->method('loadCollection')
->with($this->collection)
->willReturnCallback(function (PersistentCollection $persistentCollection) use ($persistedElement) {
->willReturnCallback(function (PersistentCollection $persistentCollection) use ($persistedElement) : void {
$persistentCollection->unwrap()->add($persistedElement);
});
@ -185,7 +184,7 @@ class PersistentCollectionTest extends OrmTestCase
* @group 6614
* @group 6616
*/
public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization()
public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization() : void
{
/* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */
$unitOfWork = $this->createMock(UnitOfWork::class);
@ -209,7 +208,7 @@ class PersistentCollectionTest extends OrmTestCase
->willReturnCallback(function (PersistentCollection $persistentCollection) use (
$persistedElement,
$newElementThatIsAlsoPersisted
) {
) : void {
$persistentCollection->unwrap()->add($newElementThatIsAlsoPersisted);
$persistentCollection->unwrap()->add($persistedElement);
});
@ -229,7 +228,7 @@ class PersistentCollectionTest extends OrmTestCase
* @group 6614
* @group 6616
*/
public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded()
public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded() : void
{
/* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */
$unitOfWork = $this->createMock(UnitOfWork::class);
@ -251,7 +250,7 @@ class PersistentCollectionTest extends OrmTestCase
->willReturnCallback(function (PersistentCollection $persistentCollection) use (
$persistedElement,
$newElementThatIsAlsoPersisted
) {
) : void {
$persistentCollection->unwrap()->add($newElementThatIsAlsoPersisted);
$persistentCollection->unwrap()->add($persistedElement);
});