TYPO3 CMS  TYPO3_6-2
BackendUserGroupRepositoryTest.php
Go to the documentation of this file.
1 <?php
3 
21 
26  $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
27  $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository($objectManager);
28  $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
29  $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
30  $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
31  $fixture->initializeObject();
32  }
33 
37  public function initializeObjectSetsDefaultQuerySettings() {
38  $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
40  $fixture = $this->getMock('TYPO3\\CMS\\Extbase\\Domain\\Repository\\BackendUserGroupRepository', array('setDefaultQuerySettings'), array($objectManager));
41  $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
42  $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
43  $fixture->expects($this->once())->method('setDefaultQuerySettings')->with($querySettings);
44  $fixture->initializeObject();
45  }
46 }