[FOLLOWUP] Revert "[BUGFIX] Draft usergroup access rights are now respected" 48/44648/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 9 Nov 2015 22:00:05 +0000 (23:00 +0100)
committerNicole Cordes <typo3@cordes.co>
Mon, 9 Nov 2015 22:15:03 +0000 (23:15 +0100)
Fix Unit tests.

Resolves: #71437
Releases: master
Change-Id: I57084daa13fcea9684e5e74d9454ef2e3c2f7b1f
Reviewed-on: https://review.typo3.org/44648
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/frontend/Tests/Unit/Page/PageRepositoryTest.php

index 960ec4e..8c623a2 100644 (file)
@@ -48,7 +48,7 @@ class PageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
      */
     protected function setUp()
     {
-        $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array('sql_fetch_assoc', 'sql_free_result', 'exec_SELECTgetSingleRow'));
+        $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, array('exec_SELECTquery', 'sql_fetch_assoc', 'sql_free_result', 'exec_SELECTgetSingleRow'));
         $this->pageSelectObject = $this->getAccessibleMock(\TYPO3\CMS\Frontend\Page\PageRepository::class, array('getMultipleGroupsWhereClause'));
         $this->pageSelectObject->expects($this->any())->method('getMultipleGroupsWhereClause')->will($this->returnValue(' AND 1=1'));
     }
@@ -213,7 +213,7 @@ class PageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $this->pageSelectObject->init(false);
 
         // check SQL created by \TYPO3\CMS\Frontend\Page\PageRepository->getPage()
-        $GLOBALS['TYPO3_DB']->expects($this->at(2))
+        $GLOBALS['TYPO3_DB']->expects($this->once())
             ->method('exec_SELECTgetSingleRow')
             ->with(
             '*',
@@ -246,7 +246,7 @@ class PageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $this->pageSelectObject->init(false);
 
         // check SQL created by \TYPO3\CMS\Frontend\Page\PageRepository->getPage()
-        $GLOBALS['TYPO3_DB']->expects($this->at(2))
+        $GLOBALS['TYPO3_DB']->expects($this->once())
             ->method('exec_SELECTgetSingleRow')
             ->with(
             '*',