本文整理汇总了PHP中Call::getCurrentStock方法的典型用法代码示例。如果您正苦于以下问题:PHP Call::getCurrentStock方法的具体用法?PHP Call::getCurrentStock怎么用?PHP Call::getCurrentStock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Call
的用法示例。
在下文中一共展示了Call::getCurrentStock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_getCurrentStock_noCustomer_noLink
public function test_getCurrentStock_noCustomer_noLink()
{
/** === Test Data === */
$CUST_ID = 21;
$STOCK_ID = 32;
$LINK = new \Praxigento\Warehouse\Data\Entity\Customer();
$LINK->setStockRef($STOCK_ID);
/** === Setup Mocks === */
// $custId = $this->_session->getCustomerId();
$this->mSession->shouldReceive('getCustomerId')->once()->andReturn($CUST_ID);
// $link = $this->_repoCustomer->getById($custId);
$this->mRepoCustomer->shouldReceive('getById')->once()->andReturn(null);
// $stockId = $this->_subRepo->getStockId();
$this->mSubRepo->shouldReceive('getStockId')->once()->andReturn($STOCK_ID);
// $this->_repoCustomer->create($data);
$this->mRepoCustomer->shouldReceive('create')->once();
/** === Call and asserts === */
$req = new Request\GetCurrentStock();
$resp = $this->obj->getCurrentStock($req);
$this->assertTrue($resp->isSucceed());
$this->assertEquals($STOCK_ID, $resp->getStockId());
}