diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php index 37ccb87e5cc0a5ade7d792ae4fd35fbfeaf7288e..9f97391793ddd102ae45393548ea3344d739e0d6 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php @@ -90,7 +90,6 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface */ public function factory($response) { - if (!is_array($response)) { throw new InvalidArgumentException( sprintf( diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php index 068987a61a0531916dfe84179e55374f44dbb05e..a9664e223722a69dd0a2b9168cfdb28d59b15f44 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/BrowZine/Response/RecordCollectionFactoryTest.php @@ -49,7 +49,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase */ public function testFactory() { - $resp = ['data' => [[], [], []]]; + $resp = ['data' => [['id' => 1], ['id' => 2], ['id' => 3]]]; $fact = new RecordCollectionFactory(); $coll = $fact->factory($resp); $this->assertEquals(3, count($coll));