We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 63c95484 authored by Brion Vibber's avatar Brion Vibber

Update ActivityCreationTests for our switch away from the obsolete <activity:actor>

parent c91b080a
...@@ -194,7 +194,7 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase ...@@ -194,7 +194,7 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
$actor = ActivityUtils::child($element, 'actor', Activity::SPEC); $actor = ActivityUtils::child($element, 'actor', Activity::SPEC);
$this->assertFalse(is_null($author)); $this->assertFalse(is_null($author));
$this->assertFalse(is_null($actor)); $this->assertTrue(is_null($actor)); // <activity:actor> is obsolete, no longer added
} }
public function testAuthorContent() public function testAuthorContent()
...@@ -213,6 +213,9 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase ...@@ -213,6 +213,9 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
$this->assertEquals($this->author1->uri, ActivityUtils::childContent($author, 'uri')); $this->assertEquals($this->author1->uri, ActivityUtils::childContent($author, 'uri'));
} }
/**
* We no longer create <activity:actor> entries, they have merged to <atom:author>
*/
public function testActorContent() public function testActorContent()
{ {
$notice = $this->_fakeNotice(); $notice = $this->_fakeNotice();
...@@ -225,8 +228,7 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase ...@@ -225,8 +228,7 @@ class ActivityGenerationTests extends PHPUnit_Framework_TestCase
$actor = ActivityUtils::child($element, 'actor', Activity::SPEC); $actor = ActivityUtils::child($element, 'actor', Activity::SPEC);
$this->assertEquals($this->author1->uri, ActivityUtils::childContent($actor, 'id')); $this->assertEquals($actor, null);
$this->assertEquals($this->author1->nickname, ActivityUtils::childContent($actor, 'title'));
} }
public function testReplyLink() public function testReplyLink()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment