mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update test
This commit is contained in:
parent
d67fcffb02
commit
222dc3a192
1 changed files with 0 additions and 48 deletions
|
@ -53,22 +53,6 @@ class AnnounceTest extends TestCase
|
||||||
'object' => 'https://example.org/p/bob/100000000000000',
|
'object' => 'https://example.org/p/bob/100000000000000',
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->invalidDate = [
|
|
||||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
|
||||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
|
||||||
'type' => 'Announce',
|
|
||||||
'actor' => 'https://example.org/users/alice',
|
|
||||||
'published' => '2018-12-31T23:59:59ZEZE',
|
|
||||||
'to' => [
|
|
||||||
'https://www.w3.org/ns/activitystreams#Public'
|
|
||||||
],
|
|
||||||
'cc' => [
|
|
||||||
'https://example.org/users/bob',
|
|
||||||
'https://example.org/users/alice/followers'
|
|
||||||
],
|
|
||||||
'object' => 'https://example.org/p/bob/100000000000000',
|
|
||||||
];
|
|
||||||
|
|
||||||
$this->contextMissing = [
|
$this->contextMissing = [
|
||||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||||
'type' => 'Announce',
|
'type' => 'Announce',
|
||||||
|
@ -84,25 +68,6 @@ class AnnounceTest extends TestCase
|
||||||
'object' => 'https://example.org/p/bob/100000000000000',
|
'object' => 'https://example.org/p/bob/100000000000000',
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->audienceMissing = [
|
|
||||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
|
||||||
'type' => 'Announce',
|
|
||||||
'actor' => 'https://example.org/users/alice',
|
|
||||||
'published' => '2018-12-31T23:59:59Z',
|
|
||||||
'object' => 'https://example.org/p/bob/100000000000000',
|
|
||||||
];
|
|
||||||
|
|
||||||
$this->audienceMissing2 = [
|
|
||||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
|
||||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
|
||||||
'type' => 'Announce',
|
|
||||||
'actor' => 'https://example.org/users/alice',
|
|
||||||
'published' => '2018-12-31T23:59:59Z',
|
|
||||||
'to' => null,
|
|
||||||
'cc' => null,
|
|
||||||
'object' => 'https://example.org/p/bob/100000000000000',
|
|
||||||
];
|
|
||||||
|
|
||||||
$this->invalidActor = [
|
$this->invalidActor = [
|
||||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||||
|
@ -185,25 +150,12 @@ class AnnounceTest extends TestCase
|
||||||
$this->assertFalse(Announce::validate($this->invalidAnnounce));
|
$this->assertFalse(Announce::validate($this->invalidAnnounce));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
|
||||||
public function invalid_date()
|
|
||||||
{
|
|
||||||
$this->assertFalse(Announce::validate($this->invalidDate));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
public function context_missing()
|
public function context_missing()
|
||||||
{
|
{
|
||||||
$this->assertFalse(Announce::validate($this->contextMissing));
|
$this->assertFalse(Announce::validate($this->contextMissing));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
|
||||||
public function audience_missing()
|
|
||||||
{
|
|
||||||
$this->assertFalse(Announce::validate($this->audienceMissing));
|
|
||||||
$this->assertFalse(Announce::validate($this->audienceMissing2));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
public function invalid_actor()
|
public function invalid_actor()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue