[BUGFIX] Failures in em unit tests due to phpunit update 10/22610/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Jul 2013 19:30:43 +0000 (21:30 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Jul 2013 20:41:19 +0000 (22:41 +0200)
Young phpunit versions seem to handle clones a bit differently,
resulting in test failures in extension manager tests. The tests
are adapted a bit to fix this.

Change-Id: If70561743f68a62167e41ee4c23ae96b56f83ab9
Resolves: #50478
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/22604
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
(cherry picked from commit eab10d590ceacc7d256a8ea195a2e562099fb52d)
Reviewed-on: https://review.typo3.org/22610
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extensionmanager/Tests/Unit/Service/ExtensionManagementServiceTest.php

index 968e9ed..a8dcf43 100644 (file)
@@ -99,7 +99,7 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseT
                );
                $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
                $downloadUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DownloadUtility', array('download'));
-               $downloadUtilityMock->expects($this->once())->method('download')->with(clone $extensionModelMock);
+               $downloadUtilityMock->expects($this->once())->method('download')->with($extensionModelMock);
                $managementMock->_set('downloadUtility', $downloadUtilityMock);
                $managementMock->_set('downloadQueue', $downloadQueueMock);
                $managementMock->_call('downloadDependencies', $downloadQueue);
@@ -121,7 +121,7 @@ class ExtensionManagementServiceTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseT
                );
                $downloadQueueMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\DownloadQueue', array('removeExtensionFromQueue', 'addExtensionToInstallQueue'));
                $downloadUtilityMock = $this->getAccessibleMock('TYPO3\\CMS\\Extensionmanager\\Utility\\DownloadUtility', array('download'));
-               $downloadQueueMock->expects($this->once())->method('removeExtensionFromQueue')->with(clone $extensionModelMock);
+               $downloadQueueMock->expects($this->once())->method('removeExtensionFromQueue')->with($extensionModelMock);
                $managementMock->_set('downloadUtility', $downloadUtilityMock);
                $managementMock->_set('downloadQueue', $downloadQueueMock);
                $managementMock->_call('downloadDependencies', $downloadQueue);