I have an extbase-extension (typo3 4.5) with
$test = $this->testRepository->findAll();
$this->view->assign('test',
array_merge(
array('0' => 'select'),
$test->toArray()
)
);
it works very well, but i want to test the code and mock the findAll-method of my testrepository. I dont know which type i must return to have the toArray-method
...
$method->will($this->returnValue(array($testModelObject)));
...
Of course my unittest throws an error: "Call to a member function toArray() on a non-object"