mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
Category added
This commit is contained in:
parent
bf4d321aa3
commit
8a7d08ae28
9 changed files with 35 additions and 20 deletions
|
@ -48,6 +48,7 @@ class ReportTest extends MockedTest
|
|||
13,
|
||||
new \DateTime('now', new \DateTimeZone('UTC')),
|
||||
'',
|
||||
null,
|
||||
false,
|
||||
[],
|
||||
11,
|
||||
|
@ -70,6 +71,7 @@ class ReportTest extends MockedTest
|
|||
13,
|
||||
new \DateTime('2021-10-12 12:23:00', new \DateTimeZone('UTC')),
|
||||
'Report',
|
||||
'violation',
|
||||
true,
|
||||
[89, 90],
|
||||
11
|
||||
|
@ -88,6 +90,7 @@ class ReportTest extends MockedTest
|
|||
self::assertEquals($assertion->reporterId, $report->reporterId);
|
||||
self::assertEquals($assertion->cid, $report->cid);
|
||||
self::assertEquals($assertion->comment, $report->comment);
|
||||
self::assertEquals($assertion->category, $report->category);
|
||||
self::assertEquals($assertion->forward, $report->forward);
|
||||
// No way to test "now" at the moment
|
||||
//self::assertEquals($assertion->created, $report->created);
|
||||
|
@ -120,6 +123,7 @@ class ReportTest extends MockedTest
|
|||
13,
|
||||
new \DateTime('now', new \DateTimeZone('UTC')),
|
||||
'',
|
||||
null,
|
||||
false,
|
||||
[],
|
||||
null
|
||||
|
@ -138,6 +142,7 @@ class ReportTest extends MockedTest
|
|||
13,
|
||||
new \DateTime('now', new \DateTimeZone('UTC')),
|
||||
'Report',
|
||||
'violation',
|
||||
true,
|
||||
[89, 90],
|
||||
null
|
||||
|
@ -149,10 +154,10 @@ class ReportTest extends MockedTest
|
|||
/**
|
||||
* @dataProvider dataCreateFromReportsRequest
|
||||
*/
|
||||
public function testCreateFromReportsRequest(int $uid, int $reporter, int $cid, string $comment, bool $forward, array $postUriIds, Entity\Report $assertion)
|
||||
public function testCreateFromReportsRequest(int $uid, int $reporter, int $cid, string $comment, string $category = null, bool $forward, array $postUriIds, Entity\Report $assertion)
|
||||
{
|
||||
$factory = new Factory\Report(new NullLogger());
|
||||
|
||||
$this->assertReport($factory->createFromReportsRequest($uid, $reporter, $cid, $comment, $forward, $postUriIds), $assertion);
|
||||
$this->assertReport($factory->createFromReportsRequest($uid, $reporter, $cid, $comment, $category, $forward, $postUriIds), $assertion);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue