From 1825df994ed8b944ddb74d5909a139eb2d333804 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 31 Jul 2015 15:26:19 +0300 Subject: Updated carry-in repair test --- runtests.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/runtests.php b/runtests.php index fa87c70..3075690 100644 --- a/runtests.php +++ b/runtests.php @@ -3,6 +3,7 @@ require_once('simpletest/autorun.php'); require_once('gsxlib.php'); + class GsxlibTest extends UnitTestCase { function setUp() { @@ -23,10 +24,13 @@ class GsxlibTest extends UnitTestCase function testCreateCarryInRepair() { $symptom = $this->gsx->fetchSymptomIssue($this->sn)->symptoms[0]; + $symptom_code = $symptom->reportedSymptomCode; + $issue = $this->gsx->fetchSymptomIssue(array('reportedSymptomCode' => $symptom_code)); + $issue_code = $issue->issues[0]->reportedIssueCode; $repairData = array( - 'shipTo' => '6191', 'serialNumber' => $this->sn, + 'shipTo' => $_ENV['GSX_SHIPTO'], 'diagnosedByTechId' => 'USA022SN', 'symptom' => 'Sample symptom', 'diagnosis' => 'Sample diagnosis', @@ -34,12 +38,12 @@ class GsxlibTest extends UnitTestCase 'unitReceivedTime' => '12:40 PM', 'notes' => 'A sample notes', 'poNumber' => '11223344', - 'popFaxed' => false, + 'popFaxed' => FALSE, 'orderLines' => array( - 'partNumber' => '076-1080', + 'partNumber' => '661-6049', 'comptiaCode' => '660', 'comptiaModifier' => 'A', - 'abused' => false + 'abused' => FALSE ), 'customerAddress' => array( 'addressLine1' => 'Address line 1', @@ -55,8 +59,8 @@ class GsxlibTest extends UnitTestCase 'lastName' => 'Customer lastname', 'primaryPhone' => '4088887766' ), - 'reportedSymptomCode' => $symptom->reportedSymptomCode, - 'reportedIssueCode' => 'IP025', + 'reportedSymptomCode' => $symptom_code, + 'reportedIssueCode' => $issue_code, ); $this->gsx->createCarryinRepair($repairData); -- cgit v1.2.3