private function _checkBalancesCurrent() { $req = new AccountGetRequest(); $req->setAccountId($this->acc1[Account::ATTR_ID]); $resp = $this->_callAccount->get($req); $this->assertTrue($resp->isSucceed()); $this->assertEquals(0 - $this->_amount, $resp->getData(Account::ATTR_BALANCE)); $req->setAccountId($this->acc2[Account::ATTR_ID]); $resp = $this->_callAccount->get($req); $this->assertTrue($resp->isSucceed()); $this->assertEquals(0 + $this->_amount, $resp->getData(Account::ATTR_BALANCE)); $this->_logger->debug("Current balance (in 'accounts' table) is checked."); }
public function test_get_byAccountId() { /** === Test Data === */ $accId = '34'; $data = [Account::ATTR_ID => $accId]; /** === Setup Mocks === */ // $data = $this->_repoAccount->getById($accountId); $this->mRepoAccount->shouldReceive('getById')->once()->andReturn(new Account($data)); /** === Call and asserts === */ $req = new Request\Get(); $req->setAccountId($accId); $resp = $this->obj->get($req); $this->assertTrue($resp->isSucceed()); }