我有这个测试:
public function testSubscribe()
{
$this->subscriberFactoryMock->expects($this->any())
->method('create')
->will($this->returnValue($this->subscriberMock));
$this->subscriberMock->expects($this->any())
->method('loadByEmail')
->will($this->returnValue(1));
$this->subscriberMock->expects($this->any())
->method('getId')
->will($this->returnValue(10));
$this->subscriberMock->expects($this->any())
->method('subscribe')
->with('piotr.gazda@monogo.pl');
$this->resultMock->expects($this->any())
->method('setData')
->with('result',1);
$this->resultMock->setData('result',1);
$this->newsletterRequestManager->subscribe(1,'piotr.gazda@monogo.pl');
}
$ resultMock 是Mock * Magento \ Framework \ DataObject *
如何从DataObject中获取结果值