diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-23 18:44:54 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-23 18:44:54 -0700 |
commit | 9380eed794e1bd419a4af4dcbbcd176f164112fc (patch) | |
tree | dfaf2eab5736f0f68e9554655d69b84f53361062 | |
parent | 13d59e0c76b887a2bfd2e5cfcc2e0fedf728bc07 (diff) |
add a general PuSHed post and an @-reply back to a subscribee by name to OStatus remote test cases
-rw-r--r-- | plugins/OStatus/tests/remote-tests.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/OStatus/tests/remote-tests.php b/plugins/OStatus/tests/remote-tests.php index b06411491..a27ecb854 100644 --- a/plugins/OStatus/tests/remote-tests.php +++ b/plugins/OStatus/tests/remote-tests.php @@ -78,6 +78,8 @@ class OStatusTester extends TestBase $this->testLocalPost(); $this->testMentionUrl(); $this->testSubscribe(); + $this->testPush(); + $this->testMentionSubscribee(); $this->testUnsubscribe(); $this->log("DONE!"); @@ -126,6 +128,26 @@ class OStatusTester extends TestBase $this->assertTrue($this->pub->hasSubscriber($this->sub->getProfileUri())); } + function testPush() + { + $this->assertTrue($this->sub->hasSubscription($this->pub->getProfileUri())); + $this->assertTrue($this->pub->hasSubscriber($this->sub->getProfileUri())); + + $name = $this->sub->username; + $post = $this->pub->post("Regular post, which $name should get via PuSH"); + $this->sub->assertReceived($post); + } + + function testMentionSubscribee() + { + $this->assertTrue($this->sub->hasSubscription($this->pub->getProfileUri())); + $this->assertFalse($this->pub->hasSubscription($this->sub->getProfileUri())); + + $name = $this->pub->username; + $post = $this->sub->post("Just a quick note back to my remote subscribee @$name"); + $this->pub->assertReceived($post); + } + function testUnsubscribe() { $this->assertTrue($this->sub->hasSubscription($this->pub->getProfileUri())); |