]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/UserFeedParseTest.php
Don't trust local HTML either
[quix0rs-gnu-social.git] / tests / UserFeedParseTest.php
index b3f9a64171f2a8d30972c983c31a832792d1e02b..6306adb7729078f925afcf5593b0818aae00bc52 100644 (file)
@@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
 }
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
+define('GNUSOCIAL', true);
+define('STATUSNET', true);  // compatibility
 
 require_once INSTALLDIR . '/lib/common.php';
 
@@ -66,11 +67,11 @@ class UserFeedParseTests extends PHPUnit_Framework_TestCase
         // test the post
 
         //var_export($act1);
-        $this->assertEquals($act1->object->type, 'http://activitystrea.ms/schema/1.0/note');
-        $this->assertEquals($act1->object->title, 'And now for something completely insane...');
+        $this->assertEquals($act1->objects[0]->type, 'http://activitystrea.ms/schema/1.0/note');
+        $this->assertEquals($act1->objects[0]->title, 'And now for something completely insane...');
 
-        $this->assertEquals($act1->object->content, 'And now for something completely insane...');
-        $this->assertEquals($act1->object->id, 'http://localhost/statusnet/notice/3');
+        $this->assertEquals($act1->objects[0]->content, 'And now for something completely insane...');
+        $this->assertEquals($act1->objects[0]->id, 'http://localhost/statusnet/notice/3');
 
     }