]> git.mxchange.org Git - friendica.git/commitdiff
Tests
authorMichael <heluecht@pirati.ca>
Sun, 25 Dec 2022 10:52:47 +0000 (10:52 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 25 Dec 2022 10:52:47 +0000 (10:52 +0000)
tests/src/Moderation/Factory/ReportTest.php

index 8d1e8131ee96643e3fe7118027c7b8f8c5e789ad..7ce6ab0f09b7ca90c963fe8df9a03f83e1e2a8d2 100644 (file)
@@ -39,6 +39,7 @@ class ReportTest extends MockedTest
                                        'cid'         => 13,
                                        'comment'     => '',
                                        'category'    => null,
+                                       'rules'       => '',
                                        'forward'     => false,
                                        'created'     => null
                                ],
@@ -96,6 +97,7 @@ class ReportTest extends MockedTest
                self::assertEquals($assertion->cid, $report->cid);
                self::assertEquals($assertion->comment, $report->comment);
                self::assertEquals($assertion->category, $report->category);
+               self::assertEquals($assertion->rules, $report->rules);
                self::assertEquals($assertion->forward, $report->forward);
                // No way to test "now" at the moment
                //self::assertEquals($assertion->created, $report->created);
@@ -142,6 +144,7 @@ class ReportTest extends MockedTest
                                'cid'         => 13,
                                'comment'     => 'Report',
                                'category'    => 'violation',
+                               'rules'       => 'Rules',
                                'forward'     => true,
                                'postUriIds'  => [89, 90],
                                'uid'         => 12,
@@ -164,7 +167,7 @@ class ReportTest extends MockedTest
        /**
         * @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());