public function test_getCurrentStock() { /** === Test Data === */ $CUST_ID = 2; /** === Call and asserts === */ $req = new Request\GetCurrentStock(); $req->setCustomerId($CUST_ID); $res = $this->obj->getCurrentStock($req); $this->assertNotNull($res); }
public function test_getCurrentStock_isCustomer_isLink() { /** === Test Data === */ $CUST_ID = 21; $STOCK_ID = 32; $LINK = new \Praxigento\Warehouse\Data\Entity\Customer(); $LINK->setStockRef($STOCK_ID); /** === Setup Mocks === */ // $link = $this->_repoCustomer->getById($custId); $this->mRepoCustomer->shouldReceive('getById')->once()->andReturn($LINK); /** === Call and asserts === */ $req = new Request\GetCurrentStock(); $req->setCustomerId($CUST_ID); $resp = $this->obj->getCurrentStock($req); $this->assertTrue($resp->isSucceed()); $this->assertEquals($STOCK_ID, $resp->getStockId()); }