Skip to content

Commit

Permalink
#6613 #6614 #6616 adding void return type to newly introduced test …
Browse files Browse the repository at this point in the history
…methods
  • Loading branch information
Ocramius committed Aug 11, 2017
1 parent c2dd274 commit 352b3ba
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/Doctrine/Tests/ORM/PersistentCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -150,7 +149,7 @@ public function testClearWillAlsoResetKeyPositions()
* @group 6614
* @group 6616
*/
public function testWillKeepNewItemsInDirtyCollectionAfterInitialization()
public function testWillKeepNewItemsInDirtyCollectionAfterInitialization() : void
{
/* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */
$unitOfWork = $this->createMock(UnitOfWork::class);
Expand All @@ -169,7 +168,7 @@ public function testWillKeepNewItemsInDirtyCollectionAfterInitialization()
->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);
});

Expand All @@ -185,7 +184,7 @@ public function testWillKeepNewItemsInDirtyCollectionAfterInitialization()
* @group 6614
* @group 6616
*/
public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization()
public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization() : void
{
/* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */
$unitOfWork = $this->createMock(UnitOfWork::class);
Expand All @@ -209,7 +208,7 @@ public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCol
->willReturnCallback(function (PersistentCollection $persistentCollection) use (
$persistedElement,
$newElementThatIsAlsoPersisted
) {
) : void {
$persistentCollection->unwrap()->add($newElementThatIsAlsoPersisted);
$persistentCollection->unwrap()->add($persistedElement);
});
Expand All @@ -229,7 +228,7 @@ public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCol
* @group 6614
* @group 6616
*/
public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded()
public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded() : void
{
/* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */
$unitOfWork = $this->createMock(UnitOfWork::class);
Expand All @@ -251,7 +250,7 @@ public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsW
->willReturnCallback(function (PersistentCollection $persistentCollection) use (
$persistedElement,
$newElementThatIsAlsoPersisted
) {
) : void {
$persistentCollection->unwrap()->add($newElementThatIsAlsoPersisted);
$persistentCollection->unwrap()->add($persistedElement);
});
Expand Down

0 comments on commit 352b3ba

Please sign in to comment.