Ejemplo n.º 1
0
 /**
  * replaces a model resource collection
  * @param $classAlias
  * @param $dataValues
  * @return PHPUnit_Framework_MockObject_MockObject
  */
 public function getResourceCollectionModelMock($classAlias, $dataValues)
 {
     $mockPage1 = $this->getObjectMockGetData($dataValues[0]);
     $mockPage2 = $this->getObjectMockGetData($dataValues[1]);
     $iteratorValues = array($mockPage1, $mockPage2);
     $resourceCmsPageCollection = $this->testCase->getResourceModelMock($classAlias, array(), FALSE, array(), '', FALSE);
     $resourceCmsPageCollection->expects($this->testCase->any())->method('getIterator')->will($this->testCase->returnValue(new ArrayIterator($iteratorValues)));
     return $resourceCmsPageCollection;
 }