From fc58cbd0757c2e9ae93cf6f8f271590dd33808d0 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Mar 2020 18:24:11 +0200 Subject: [PATCH] fix unit tests for collection/media tests --- tests/Controller/Api/ApiControllerCollectionTrait.php | 2 +- tests/Controller/Api/testFile1.txt | 1 + tests/Controller/Api/testFile2.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 tests/Controller/Api/testFile1.txt create mode 100644 tests/Controller/Api/testFile2.txt diff --git a/tests/Controller/Api/ApiControllerCollectionTrait.php b/tests/Controller/Api/ApiControllerCollectionTrait.php index 6176791..dc860b1 100644 --- a/tests/Controller/Api/ApiControllerCollectionTrait.php +++ b/tests/Controller/Api/ApiControllerCollectionTrait.php @@ -83,7 +83,7 @@ trait ApiControllerCollectionTrait $this->module->apiCollectionCreate($request, $response); $collection = $response->get('')['response']; - self::assertEquals('Test Collection', $collection); + self::assertEquals('Test Collection', $collection->getName()); self::assertCount(2, $collection->getSources()); } } diff --git a/tests/Controller/Api/testFile1.txt b/tests/Controller/Api/testFile1.txt new file mode 100644 index 0000000..2329317 --- /dev/null +++ b/tests/Controller/Api/testFile1.txt @@ -0,0 +1 @@ +Media/Collection Test 1 \ No newline at end of file diff --git a/tests/Controller/Api/testFile2.txt b/tests/Controller/Api/testFile2.txt new file mode 100644 index 0000000..55afc44 --- /dev/null +++ b/tests/Controller/Api/testFile2.txt @@ -0,0 +1 @@ +Media/Collection Test 2 \ No newline at end of file