Code:
$mockObject = $this->getMock('ORM_User');
$mockObject->expects($this->at(0))
->method('xxx')
->with($this->equalTo('a'))
->will($this->returnValue('aaa'));
$mockObject->expects($this->at(1))
->method('xxx')
->with($this->equalTo('b'))
->will($this->returnValue('bbb'));
var_dump("-".$mockObject->xxx('a'));
var_dump($mockObject->xxx('b'));
$tmp = new ORM_User();
var_dump($tmp->xxx('a'));
var_dump($tmp->xxx('b'));
Output:
string(4) "-aaa" string(3) "bbb" NULL NULL