/** * @param int|null $id * @return Request\GetRecordById */ public function getRecordById($id = null) { $request = new Request\GetRecordById($this->request()); if ($id !== null) { $request->id($id); } return $request; }
public function testId() { $this->getRecordById->id('abc123'); $this->assertEquals('abc123', $this->request->getParam('id')); }