@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @method buildBasePayload |
| 30 | 30 | * @author PA |
| 31 | 31 | * @date 2017-01-09 |
| 32 | - * @return SimpleXMLElement XML Envelope with necessary credential parameters |
|
| 32 | + * @return \SimpleXMLElement XML Envelope with necessary credential parameters |
|
| 33 | 33 | */ |
| 34 | 34 | public function buildBasePayload() : \SimpleXMLElement |
| 35 | 35 | { |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | * @method sxmlAppend |
| 108 | 108 | * @author PA |
| 109 | 109 | * @date 2017-01-09 |
| 110 | - * @param SimpleXMLElement $to |
|
| 111 | - * @param SimpleXMLElement $from |
|
| 110 | + * @param \SimpleXMLElement $to |
|
| 111 | + * @param \SimpleXMLElement $from |
|
| 112 | 112 | */ |
| 113 | 113 | private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from) { |
| 114 | 114 | $toDom = dom_import_simplexml($to); |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | |
| 69 | 69 | $call = new \SimpleXMLElement('<Call></Call>'); |
| 70 | - $call->addAttribute('method',$method); |
|
| 70 | + $call->addAttribute('method', $method); |
|
| 71 | 71 | |
| 72 | 72 | foreach ($arguments as $key => $value) { |
| 73 | - $call->addChild($key,$value); |
|
| 73 | + $call->addChild($key, $value); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $call; |
@@ -79,9 +79,9 @@ discard block |
||
| 79 | 79 | public function buildXMLPayload(string $method, array $arguments) : \SimpleXMLElement |
| 80 | 80 | { |
| 81 | 81 | $xml = $this->buildBasePayload(); |
| 82 | - $callPayload = $this->createCallPayload($method,$arguments); |
|
| 82 | + $callPayload = $this->createCallPayload($method, $arguments); |
|
| 83 | 83 | |
| 84 | - $this->sxmlAppend($xml,$callPayload); |
|
| 84 | + $this->sxmlAppend($xml, $callPayload); |
|
| 85 | 85 | |
| 86 | 86 | return $xml; |
| 87 | 87 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @param SimpleXMLElement $to |
| 111 | 111 | * @param SimpleXMLElement $from |
| 112 | 112 | */ |
| 113 | - private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from) { |
|
| 113 | + private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from) { |
|
| 114 | 114 | $toDom = dom_import_simplexml($to); |
| 115 | 115 | $fromDom = dom_import_simplexml($from); |
| 116 | 116 | $toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true)); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | protected function _before() |
| 13 | 13 | { |
| 14 | - require_once (__DIR__ . '/../../../vendor/autoload.php'); // Autoload files using Composer autoload |
|
| 14 | + require_once (__DIR__.'/../../../vendor/autoload.php'); // Autoload files using Composer autoload |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | protected function _after() |
@@ -22,14 +22,14 @@ discard block |
||
| 22 | 22 | public function testBuildBasePayload() { |
| 23 | 23 | |
| 24 | 24 | $apiKey = 'A'; |
| 25 | - $saPasscode ='B'; |
|
| 25 | + $saPasscode = 'B'; |
|
| 26 | 26 | $request = new Request($apiKey, $saPasscode); |
| 27 | 27 | |
| 28 | - $xml = $request->buildBasePayload(); |
|
| 28 | + $xml = $request->buildBasePayload(); |
|
| 29 | 29 | |
| 30 | 30 | $this->assertEquals(Request::$API_VERSION, $xml->Version, 'Versions Do Not Match'); |
| 31 | 31 | $this->assertEquals($apiKey, $xml->ApiKey, 'API Key Does not Match'); |
| 32 | - $this->assertEquals($saPasscode, $xml->SaPasscode,'Sa Passcode Does not match'); |
|
| 32 | + $this->assertEquals($saPasscode, $xml->SaPasscode, 'Sa Passcode Does not match'); |
|
| 33 | 33 | $this->assertEquals('1', $xml->CallID, 'Call ID does not match'); |
| 34 | 34 | |
| 35 | 35 | codecept_debug($xml->asXML()); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | { |
| 41 | 41 | //Setup |
| 42 | 42 | $apiKey = 'A'; |
| 43 | - $saPasscode ='B'; |
|
| 43 | + $saPasscode = 'B'; |
|
| 44 | 44 | $method = 'testMethod'; |
| 45 | 45 | $arguments = ['arg1' => 'value1', 'arg2' => 'value2']; |
| 46 | 46 | $request = new Request($apiKey, $saPasscode); |
@@ -67,17 +67,17 @@ discard block |
||
| 67 | 67 | public function testBuildXMLPayload() { |
| 68 | 68 | |
| 69 | 69 | $apiKey = 'A'; |
| 70 | - $saPasscode ='B'; |
|
| 70 | + $saPasscode = 'B'; |
|
| 71 | 71 | $method = 'testMethod'; |
| 72 | 72 | $arguments = ['arg1' => 'value1', 'arg2' => 'value2']; |
| 73 | 73 | $request = new Request($apiKey, $saPasscode); |
| 74 | 74 | |
| 75 | - $xml = $request->buildXMLPayload($method,$arguments); |
|
| 75 | + $xml = $request->buildXMLPayload($method, $arguments); |
|
| 76 | 76 | codecept_debug($xml->asXML()); |
| 77 | 77 | //Verify |
| 78 | 78 | $this->assertEquals(Request::$API_VERSION, $xml->Version, 'Versions Do Not Match'); |
| 79 | 79 | $this->assertEquals($apiKey, $xml->ApiKey, 'API Key Does not Match'); |
| 80 | - $this->assertEquals($saPasscode, $xml->SaPasscode,'Sa Passcode Does not match'); |
|
| 80 | + $this->assertEquals($saPasscode, $xml->SaPasscode, 'Sa Passcode Does not match'); |
|
| 81 | 81 | $this->assertEquals('1', $xml->CallID, 'Call ID does not match'); |
| 82 | 82 | |
| 83 | 83 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | use _generated\FunctionalTesterActions; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Define custom actions here |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * Define custom actions here |
|
| 25 | + */ |
|
| 26 | 26 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | use _generated\AcceptanceTesterActions; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Define custom actions here |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * Define custom actions here |
|
| 25 | + */ |
|
| 26 | 26 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | use _generated\UnitTesterActions; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Define custom actions here |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * Define custom actions here |
|
| 25 | + */ |
|
| 26 | 26 | } |