@@ 379-399 (lines=21) @@ | ||
376 | } |
|
377 | } |
|
378 | ||
379 | public function testAssignmentRuleHeaderId() { |
|
380 | echo "testAssignmentRuleHeaderId\r\n"; |
|
381 | $header = new AssignmentRuleHeader('01Q300000005lDgEAI', NULL); |
|
382 | $createFields = array ( |
|
383 | 'FirstName' => 'DELETE_ME', |
|
384 | 'LastName' => 'DELETE_ME', |
|
385 | 'Email' => '[email protected]', |
|
386 | 'Company' => 'DELETE_ME Company', |
|
387 | 'LeadSource' => 'PHPUnit2', |
|
388 | 'City' => 'San Diego', |
|
389 | 'State' => 'CA' |
|
390 | ); |
|
391 | $sObject1 = new SObject(); |
|
392 | $sObject1->fields = $createFields; |
|
393 | $sObject1->type = 'Lead'; |
|
394 | try { |
|
395 | $createResponse = $this->mySforceConnection->create(array ($sObject1), $header, NULL); |
|
396 | } catch (SoapFault $fault) { |
|
397 | $this->fail($fault->faultstring); |
|
398 | } |
|
399 | } |
|
400 | ||
401 | public function testAssignmentRuleHeaderFlag() { |
|
402 | echo "testAssignmentRuleHeaderFlag\r\n"; |
@@ 9-29 (lines=21) @@ | ||
6 | return 'AssigmentRuleHeader'; |
|
7 | } |
|
8 | ||
9 | protected function _run() |
|
10 | { |
|
11 | $header = new AssignmentRuleHeader('01Q300000005lDg', false); |
|
12 | $this->_mySforceConnection->setAssignmentRuleHeader($header); |
|
13 | ||
14 | $createFields = array ( |
|
15 | 'FirstName' => 'John', |
|
16 | 'LastName' => 'Doe', |
|
17 | 'Email' => '[email protected]', |
|
18 | 'Company' => 'Some Company', |
|
19 | 'LeadSource' => 'PHPUnit2', |
|
20 | 'City' => 'Tokyo', |
|
21 | 'Country' => 'Japan' |
|
22 | ); |
|
23 | $sObject1 = new SObject(); |
|
24 | $sObject1->fields = $createFields; |
|
25 | $sObject1->type = 'Lead'; |
|
26 | ||
27 | $createResponse = $this->_mySforceConnection->create(array($sObject1)); |
|
28 | print_r($createResponse); |
|
29 | } |
|
30 | } |