function testSetReturnReferenceGivesOriginal()
 {
     $mock = new TestDummy();
     $object = 99;
     $mock->setReturnReferenceAt(0, 'aReferenceMethod', $object, array(3));
     $this->assertReference($mock->aReferenceMethod(3), $object);
 }
Esempio n. 2
0
 function testReferences()
 {
     $mock = new TestDummy();
     $object = new Dummy();
     $mock->setReturnReferenceAt(0, 'anotherMethod', $object, array(3));
     $this->assertReference($zref =& $mock->anotherMethod(3), $object);
 }