/** * @SuppressWarnings(PHPMD.ShortVariable) */ public function test_byId() { /** === Test Data === */ $asId = 'id'; $asOther = 'other'; $id = 23; $other = 'any data'; $data = [[$asId => $id, $asOther => $other]]; /** === Setup Mocks === */ /** === Call and asserts === */ $req = new Request\ById(); $req->setAsId($asId); $req->setDataToMap($data); $resp = $this->obj->byId($req); $this->assertTrue($resp->isSucceed()); $mapped = $resp->getMapped(); $this->assertTrue(is_array($mapped)); $this->assertEquals($other, $mapped[$id][$asOther]); }