diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/ar.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/cs.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/da.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/el.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/es.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/fi.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/fr.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/hu.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/it.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/ja.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/ko.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/no.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/pl.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/pt.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/ru.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/sv.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/th.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/tr.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/uk.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php deleted file mode 100755 index d21c173..0000000 --- a/Theme/Backend/Lang/zh.lang.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'Archive' => '', - 'Back' => '', - 'Date' => '', - 'Description' => '', - 'Kanban' => '', - 'Name' => '', - 'Status' => '', - 'Tags' => '', - 'Title' => '', -]]; diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index f5dbfdd..d107d0e 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -175,39 +175,6 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } - /** - * @covers Modules\Kanban\Controller\ApiController - * @group module - */ - public function testCreateCommentCard() : void - { - $response = new HttpResponse(); - $request = new HttpRequest(); - - $request->header->account = 1; - $request->setData('plain', 'Controller Test Description'); - $request->setData('card', '1'); - - if (!\is_file(__DIR__ . '/test_tmp.md')) { - \copy(__DIR__ . '/test.md', __DIR__ . '/test_tmp.md'); - } - - TestUtils::setMember($request, 'files', [ - 'file1' => [ - 'name' => 'test.md', - 'type' => MimeType::M_TXT, - 'tmp_name' => __DIR__ . '/test_tmp.md', - 'error' => \UPLOAD_ERR_OK, - 'size' => \filesize(__DIR__ . '/test_tmp.md'), - ], - ]); - - $request->setData('media', \json_encode([1])); - - $this->module->apiKanbanCardCommentCreate($request, $response); - self::assertGreaterThan(0, $response->getDataArray('')['response']->id); - } - /** * @covers Modules\Kanban\Controller\ApiController * @group module @@ -255,20 +222,4 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->module->apiKanbanCardCreate($request, $response); self::assertEquals(RequestStatusCode::R_400, $response->header->status); } - - /** - * @covers Modules\Kanban\Controller\ApiController - * @group module - */ - public function testApiKanbanCardCommentCreateInvalidData() : void - { - $response = new HttpResponse(); - $request = new HttpRequest(); - - $request->header->account = 1; - $request->setData('invalid', '1'); - - $this->module->apiKanbanCardCommentCreate($request, $response); - self::assertEquals(RequestStatusCode::R_400, $response->header->status); - } } diff --git a/tests/Models/KanbanCardCommentTest.php b/tests/Models/KanbanCardCommentTest.php deleted file mode 100755 index 6c4c816..0000000 --- a/tests/Models/KanbanCardCommentTest.php +++ /dev/null @@ -1,73 +0,0 @@ -comment = new KanbanCardComment(); - } - - /** - * @covers Modules\Kanban\Models\KanbanCardComment - * @group module - */ - public function testDefault() : void - { - self::assertEquals(0, $this->comment->id); - self::assertEquals(0, $this->comment->card); - self::assertEquals('', $this->comment->description); - self::assertEquals(0, $this->comment->createdBy->id); - self::assertInstanceOf('\DateTimeImmutable', $this->comment->createdAt); - self::assertEquals([], $this->comment->files); - } - - /** - * @covers Modules\Kanban\Models\KanbanCardComment - * @group module - */ - public function testSerialize() : void - { - $this->comment->description = 'Description'; - $this->comment->descriptionRaw = 'DescriptionRaw'; - $this->comment->card = 2; - - $serialized = $this->comment->jsonSerialize(); - unset($serialized['createdBy']); - unset($serialized['createdAt']); - - self::assertEquals( - [ - 'id' => 0, - 'description' => 'Description', - 'descriptionRaw' => 'DescriptionRaw', - 'card' => 2, - 'media' => [], - ], - $serialized - ); - } -} diff --git a/tests/Models/KanbanCardTest.php b/tests/Models/KanbanCardTest.php index 526f42c..66b07a0 100755 --- a/tests/Models/KanbanCardTest.php +++ b/tests/Models/KanbanCardTest.php @@ -50,7 +50,6 @@ final class KanbanCardTest extends \PHPUnit\Framework\TestCase self::assertEquals(0, $this->card->order); self::assertEquals(0, $this->card->createdBy->id); self::assertInstanceOf('\DateTimeImmutable', $this->card->createdAt); - self::assertEquals([], $this->card->getComments()); self::assertEquals([], $this->card->tags); self::assertEquals([], $this->card->files); } @@ -65,30 +64,6 @@ final class KanbanCardTest extends \PHPUnit\Framework\TestCase self::assertEquals(1, $this->card->column); } - /** - * @covers Modules\Kanban\Models\KanbanCard - * @group module - */ - public function testCommentInputOutput() : void - { - $this->card->addComment($card = new NullKanbanCardComment(5)); - self::assertEquals([$card], $this->card->getComments()); - self::assertEquals(1, $this->card->getCommentCount()); - } - - /** - * @covers Modules\Kanban\Models\KanbanCard - * @group module - */ - public function testCommentRemove() : void - { - $this->card->addComment($comment = new NullKanbanCardComment(5)); - self::assertCount(1, $this->card->getComments()); - self::assertTrue($this->card->removeComment(0)); - self::assertCount(0, $this->card->getComments()); - self::assertFalse($this->card->removeComment(0)); - } - /** * @covers Modules\Kanban\Models\KanbanCard * @group module @@ -127,7 +102,7 @@ final class KanbanCardTest extends \PHPUnit\Framework\TestCase 'column' => 2, 'order' => 3, 'ref' => 0, - 'comments' => [], + 'comments' => null, 'media' => [], ], $serialized diff --git a/tests/Models/NullKanbanCardCommentTest.php b/tests/Models/NullKanbanCardCommentTest.php deleted file mode 100755 index a59ebd4..0000000 --- a/tests/Models/NullKanbanCardCommentTest.php +++ /dev/null @@ -1,52 +0,0 @@ -id); - } - - /** - * @covers Modules\Kanban\Models\NullKanbanCardComment - * @group module - */ - public function testJsonSerialize() : void - { - $null = new NullKanbanCardComment(2); - self::assertEquals(['id' => 2], $null->jsonSerialize()); - } -}