|
From: Robert S. <rob...@gm...> - 2010-04-08 23:01:09
|
I'm getting the following error my guess is that I am causing an infinite
(or nearly so) loop, but am unable to determine the fix:
*Fatal error*: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 39 bytes) in *simpletest\compatibility.php* on line *92*
*
*
Here's the offending code:
*
*
*
Mock::generate('IRepository', 'MockRepository');
class TestCategory extends InMemoryDoctrineModelTestCase{
function TestCategory(){
$this->InMemoryDoctrineModelTestCase('Category model class tests');
}
public function testGetEvents(){
$category = $this->createCategory();
$category->repository->expectOnce('getInstancesOf', array('Event',
array('where' => array('category' => $category) ,'limit' => 10)));
$category->getEvents(10);
}
private function createCategory(){
$category = new Category();
$category->name = "category";
$category->save();
$category->repository = new MockRepository();
return $category;
}
}
The offending line seems to be:
$category->repository->expectOnce('getInstancesOf', array('Event',
array('where' => array('category' => $category) ,'limit' => 10)));
*
The error has something to do with the nested arrays.
The code is crashing in the _isArrayOfIdenticalTypes function in
compatibility.php.
Any help would be greatly appreciated.
Thanks,
Robert
|