protected function setUp() { $this->request = new TransportRequest('Leads'); $this->transport = new MockTransport(); $this->request->setTransport($this->transport); $this->insertRecords = new Request\InsertRecords($this->request); }
/** * @throws UnexpectedValueException * @return Record[]|Field[] */ public function request() { try { return $this->request->request(); } catch (NoDataException $e) { return array(); } }
public function testId() { $this->getRecordById->id('abc123'); $this->assertEquals('abc123', $this->request->getParam('id')); }
public function testInitial() { $this->assertEquals('getFields', $this->request->getMethod()); }
/** * @return \Christiaan\ZohoCRMClient\Transport\TransportRequest */ protected function request() { $request = new Transport\TransportRequest($this->module); $request->setTransport($this->transport); return $request; }
public function testSince() { $this->getRecords->since(new \DateTime('16-05-1986 13:37:59')); $this->assertEquals('1986-05-16 13:37:59', $this->request->getParam('lastModifiedTime')); }
public function testRequireApproval() { $this->updateRecords->requireApproval(); $this->assertEquals('true', $this->request->getParam('isApproval')); }