Tests
This commit is contained in:
parent
5298cd73b3
commit
c0c70427f3
1 changed files with 4 additions and 1 deletions
|
@ -39,6 +39,7 @@ class ReportTest extends MockedTest
|
||||||
'cid' => 13,
|
'cid' => 13,
|
||||||
'comment' => '',
|
'comment' => '',
|
||||||
'category' => null,
|
'category' => null,
|
||||||
|
'rules' => '',
|
||||||
'forward' => false,
|
'forward' => false,
|
||||||
'created' => null
|
'created' => null
|
||||||
],
|
],
|
||||||
|
@ -96,6 +97,7 @@ class ReportTest extends MockedTest
|
||||||
self::assertEquals($assertion->cid, $report->cid);
|
self::assertEquals($assertion->cid, $report->cid);
|
||||||
self::assertEquals($assertion->comment, $report->comment);
|
self::assertEquals($assertion->comment, $report->comment);
|
||||||
self::assertEquals($assertion->category, $report->category);
|
self::assertEquals($assertion->category, $report->category);
|
||||||
|
self::assertEquals($assertion->rules, $report->rules);
|
||||||
self::assertEquals($assertion->forward, $report->forward);
|
self::assertEquals($assertion->forward, $report->forward);
|
||||||
// No way to test "now" at the moment
|
// No way to test "now" at the moment
|
||||||
//self::assertEquals($assertion->created, $report->created);
|
//self::assertEquals($assertion->created, $report->created);
|
||||||
|
@ -142,6 +144,7 @@ class ReportTest extends MockedTest
|
||||||
'cid' => 13,
|
'cid' => 13,
|
||||||
'comment' => 'Report',
|
'comment' => 'Report',
|
||||||
'category' => 'violation',
|
'category' => 'violation',
|
||||||
|
'rules' => 'Rules',
|
||||||
'forward' => true,
|
'forward' => true,
|
||||||
'postUriIds' => [89, 90],
|
'postUriIds' => [89, 90],
|
||||||
'uid' => 12,
|
'uid' => 12,
|
||||||
|
@ -164,7 +167,7 @@ class ReportTest extends MockedTest
|
||||||
/**
|
/**
|
||||||
* @dataProvider dataCreateFromReportsRequest
|
* @dataProvider dataCreateFromReportsRequest
|
||||||
*/
|
*/
|
||||||
public function testCreateFromReportsRequest(int $reporter, int $cid, string $comment, string $category = null, string $rules = null, bool $forward, array $postUriIds, int $uid, Entity\Report $assertion)
|
public function testCreateFromReportsRequest(int $reporter, int $cid, string $comment, string $category = null, string $rules = '', bool $forward, array $postUriIds, int $uid, Entity\Report $assertion)
|
||||||
{
|
{
|
||||||
$factory = new Factory\Report(new NullLogger());
|
$factory = new Factory\Report(new NullLogger());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue