Lib_Test_Enterprise_AggregateResultTest

The Gravity Forms Salesforce Add-On Lib Test Enterprise AggregateResultTest class.

Defined (1)

The class is defined in the following location(s).

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Enterprise/AggregateResultTest.php  
  1. class Lib_Test_Enterprise_AggregateResultTest extends Lib_Test_TestAbstractEnterprise 
  2. public function getTestName() 
  3. return 'AggregateResult'; 
  4.  
  5. protected function _run() 
  6. $query = 'Select Count(Id) IndustryCount, Avg(NumberOfEmployees) AvgEmployees, Industry From Account Group By Industry Limit 2'; 
  7. $response = $this->_mySforceConnection->query($query); 
  8. $response = new QueryResult($response); 
  9.  
  10. echo "\n***** ".$this->getTestName()." *****\n"; 
  11. print_r($response); 
  12.  
  13. echo "\n***** ".$this->getTestName()." response records: *****\n"; 
  14. if (isset($response->records) && !empty($response->records)) { 
  15. foreach ($response->records as $key=>$record) { 
  16. echo "\n***** $key *****\n"; 
  17. if (isset($record->fields)) { 
  18. print_r($record->fields); 
  19.