Esempio n. 1
0
 protected function setUp()
 {
     $this->request = new TransportRequest('Leads');
     $this->transport = new MockTransport();
     $this->request->setTransport($this->transport);
     $this->insertRecords = new Request\InsertRecords($this->request);
 }
Esempio n. 2
0
 /**
  * @throws UnexpectedValueException
  * @return Record[]|Field[]
  */
 public function request()
 {
     try {
         return $this->request->request();
     } catch (NoDataException $e) {
         return array();
     }
 }
Esempio n. 3
0
 public function testId()
 {
     $this->getRecordById->id('abc123');
     $this->assertEquals('abc123', $this->request->getParam('id'));
 }
Esempio n. 4
0
 public function testInitial()
 {
     $this->assertEquals('getFields', $this->request->getMethod());
 }
Esempio n. 5
0
 /**
  * @return \Christiaan\ZohoCRMClient\Transport\TransportRequest
  */
 protected function request()
 {
     $request = new Transport\TransportRequest($this->module);
     $request->setTransport($this->transport);
     return $request;
 }
Esempio n. 6
0
 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'));
 }
Esempio n. 7
0
 public function testRequireApproval()
 {
     $this->updateRecords->requireApproval();
     $this->assertEquals('true', $this->request->getParam('isApproval'));
 }