Update test

This commit is contained in:
Daniel Supernault 2023-01-31 02:33:50 -07:00
parent d67fcffb02
commit 222dc3a192
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -53,22 +53,6 @@ class AnnounceTest extends TestCase
'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 = [
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
'type' => 'Announce',
@ -84,25 +68,6 @@ class AnnounceTest extends TestCase
'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 = [
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
@ -185,25 +150,12 @@ class AnnounceTest extends TestCase
$this->assertFalse(Announce::validate($this->invalidAnnounce));
}
/** @test */
public function invalid_date()
{
$this->assertFalse(Announce::validate($this->invalidDate));
}
/** @test */
public function context_missing()
{
$this->assertFalse(Announce::validate($this->contextMissing));
}
/** @test */
public function audience_missing()
{
$this->assertFalse(Announce::validate($this->audienceMissing));
$this->assertFalse(Announce::validate($this->audienceMissing2));
}
/** @test */
public function invalid_actor()
{