Commits

Maru Newby  committed e6c6cee

Added test for xml response.

  • Participants
  • Parent commits 11d89a8

Comments (0)

Files changed (1)

File php/RepustateTest.php

         return new Repustate(self::key);
     }
 
-    function makeCall()
-    {
-
-    }
-
     function checkCall()
     {
         $accessor = $this->getAccessor();
         $methodArgs = $args[1];
         $result = $accessor->{$method}($methodArgs);
         $this->assertInternalType('object', $result, 'Invalid result');
-        $this->assertEquals($result->status, 'OK', $result->status);
+        $status = (string) $result->status;
+        $this->assertEquals($status, 'OK', $status);
     }
 
     public function textUrlProvider()
         $this->checkCall('sentiment', $args);
     }
 
+    public function testSentimentForXml()
+    {
+        $args = array(
+            'text' => 'iPad',
+            'responseType' => 'xml',
+        );
+        $this->checkCall('sentiment', $args);
+    }
+
     public function testBulkSentiment()
     {
         $this->checkCall('bulkSentiment', array('I love candy'));