Lib_Test_Partner_DescribeDataCategoryGroupStructuresTest

Retrieves available category groups along with their data category structure for objects specified in the request.

Defined (1)

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

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Partner/DescribeDataCategoryGroupStructuresTest.php  
  1. class Lib_Test_Partner_DescribeDataCategoryGroupStructuresTest extends Lib_Test_TestAbstractPartner 
  2. public function getTestName() 
  3. return 'DescribeDataCategoryGroupStructure'; 
  4.  
  5. protected function _run() 
  6. /** 
  7. Get info only about top categories 
  8. */ 
  9. $pairs = array(); 
  10.  
  11. $pair = new stdClass; 
  12. $pair->sobject = new SoapVar('Question', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); 
  13. $pair->dataCategoryGroupName = new SoapVar('Products', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); 
  14.  
  15. $pairs[] = new SoapVar($pair, SOAP_ENC_OBJECT, 'DataCategoryGroupSobjectTypePair', SforcePartnerClient::PARTNER_NAMESPACE); 
  16. $response = $this->_mySforceConnection->describeDataCategoryGroupStructures($pairs, true); 
  17.  
  18. echo "***** ".$this->getTestName()." Get information only about top categories *****\n"; 
  19. print_r($response); 
  20.  
  21. /** 
  22. Get info about two categories 
  23. */ 
  24. $pairs = array(); 
  25.  
  26. // First category 
  27. $pair = new stdClass; 
  28. $pair->sobject = new SoapVar('Question', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); 
  29. $pair->dataCategoryGroupName = new SoapVar('Products', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); 
  30.  
  31. // Second category 
  32. $pair = new stdClass; 
  33. $pair->sobject = new SoapVar('Question', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); 
  34. $pair->dataCategoryGroupName = new SoapVar('Products', XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); 
  35.  
  36. $pairs[] = new SoapVar($pair, SOAP_ENC_OBJECT, 'DataCategoryGroupSobjectTypePair', SforcePartnerClient::PARTNER_NAMESPACE); 
  37. $response = $this->_mySforceConnection->describeDataCategoryGroupStructures($pairs, false); 
  38.  
  39. echo "\n\n***** ".$this->getTestName()." Get information about two categories *****\n"; 
  40. print_r($response);