Example #1
0
 public function testQuery()
 {
     $soapClient = $this->getSoapClient(array('query'));
     $result = $this->getResultMock(new Result\QueryResult(), array('size' => 1, 'done' => true, 'records' => array((object) array('Id' => '001M0000008tWTFIA2', 'Name' => 'Company'))));
     $soapClient->expects($this->any())->method('query')->will($this->returnValue($result));
     $client = new Client($soapClient, 'username', 'password', 'token');
     $result = $client->query('Select Name from Account Limit 1');
     $this->assertInstanceOf('Phpforce\\SoapClient\\Result\\RecordIterator', $result);
     $this->assertEquals(1, $result->count());
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function query($query)
 {
     $res = parent::query($query);
     $res->setSfToPhpConverter($this->getSfToPhpConverter());
     return $res;
 }