[BUGFIX] Test regression from patch for #47192 76/22576/2
authorAndreas Wolf <andreas.wolf@typo3.org>
Sat, 20 Jul 2013 21:14:22 +0000 (23:14 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 25 Jul 2013 21:32:15 +0000 (23:32 +0200)
This fixes a unit test regression introduced with the solution for
 #47192.

Change-Id: I0e70b916f24fada7f76e7fd835d31e54ca41a402
Related: #47192
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/22576
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php

index bad00e3..080f51a 100644 (file)
@@ -472,7 +472,9 @@ class Typo3DbBackendTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                        'uid' => '43',
                        'pid' => '-1'
                );
-               $languageUid = 2;
+               $querySettings = new \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings();
+               $querySettings->initializeObject();
+
                $workspaceUid = 2;
                $sourceMock = new \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Selector('tx_foo', 'Tx_Foo');
                /** @var $pageRepositoryMock \TYPO3\CMS\Frontend\Page\PageRepository|\PHPUnit_Framework_MockObject_MockObject */
@@ -481,7 +483,7 @@ class Typo3DbBackendTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $pageRepositoryMock->expects($this->once())->method('getWorkspaceVersionOfRecord')->with($workspaceUid, 'tx_foo', '42')->will($this->returnValue($workspaceVersion));
                $mockTypo3DbBackend = $this->getAccessibleMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbBackend', array('dummy'), array(), '', FALSE);
                $mockTypo3DbBackend->_set('pageRepository', $pageRepositoryMock);
-               $this->assertSame(array($comparisonRow), $mockTypo3DbBackend->_call('doLanguageAndWorkspaceOverlay', $sourceMock, array($row), $languageUid, $workspaceUid));
+               $this->assertSame(array($comparisonRow), $mockTypo3DbBackend->_call('doLanguageAndWorkspaceOverlay', $sourceMock, array($row), $querySettings, $workspaceUid));
        }
 
        /**
@@ -609,4 +611,4 @@ class Typo3DbBackendTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
 
 }
 
-?>
\ No newline at end of file
+?>