diff --git a/Build/Test/bootstrap.sh b/Build/Test/bootstrap.sh index f341661061..43fe6ec321 100755 --- a/Build/Test/bootstrap.sh +++ b/Build/Test/bootstrap.sh @@ -54,7 +54,21 @@ echo "Using package path $TYPO3_PATH_PACKAGES" echo "Using web path $TYPO3_PATH_WEB" # Install TYPO3 sources -composer require --dev typo3/cms="$TYPO3_VERSION" +if [[ $TYPO3_VERSION = *"9."* ]]; then + composer require --dev typo3/cms-backend="$TYPO3_VERSION" + composer require --dev typo3/cms-core="$TYPO3_VERSION" + composer require --dev typo3/cms-fluid="$TYPO3_VERSION" + composer require --dev typo3/cms-frontend="$TYPO3_VERSION" + composer require --dev typo3/cms-lang="$TYPO3_VERSION" + composer require --dev typo3/cms-extbase="$TYPO3_VERSION" + composer require --dev typo3/cms-install="$TYPO3_VERSION" + composer require --dev typo3/cms-extbase="$TYPO3_VERSION" + composer require --dev typo3/cms-reports="$TYPO3_VERSION" + composer require --dev typo3/cms-scheduler="$TYPO3_VERSION" + composer require --dev typo3/cms-tstemplate="$TYPO3_VERSION" +else + composer require --dev typo3/cms="$TYPO3_VERSION" +fi # Restore composer.json git checkout composer.json diff --git a/Classes/Domain/Search/Query/QueryBuilder.php b/Classes/Domain/Search/Query/QueryBuilder.php index 0422757201..2c6f29581e 100644 --- a/Classes/Domain/Search/Query/QueryBuilder.php +++ b/Classes/Domain/Search/Query/QueryBuilder.php @@ -688,7 +688,7 @@ public function useFiltersFromTypoScript(): QueryBuilder $searchQueryFilters = $this->typoScriptConfiguration->getSearchQueryFilterConfiguration(); - if (count($searchQueryFilters) <= 0) { + if (!is_array($searchQueryFilters) || count($searchQueryFilters) <= 0) { return $this; } @@ -844,7 +844,7 @@ public function getAdditionalFilters() : array } $searchQueryFilters = $this->typoScriptConfiguration->getSearchQueryFilterConfiguration(); - if (count($searchQueryFilters) <= 0) { + if (!is_array($searchQueryFilters) || count($searchQueryFilters) <= 0) { return []; } diff --git a/Tests/Unit/Domain/Search/ResultSet/Facets/FacetRegistryTest.php b/Tests/Unit/Domain/Search/ResultSet/Facets/FacetRegistryTest.php index e6214c338d..92d5083eeb 100644 --- a/Tests/Unit/Domain/Search/ResultSet/Facets/FacetRegistryTest.php +++ b/Tests/Unit/Domain/Search/ResultSet/Facets/FacetRegistryTest.php @@ -14,10 +14,10 @@ * The TYPO3 project - inspiring people to share! */ +use ApacheSolrForTypo3\Solr\Tests\Unit\UnitTest; use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\FacetRegistry; use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\OptionBased\Options\OptionsPackage; use ApacheSolrForTypo3\Solr\Tests\Unit\Domain\Search\ResultSet\Facets\TestPackage\TestPackage; -use TYPO3\CMS\Core\Tests\UnitTestCase; use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; @@ -27,7 +27,7 @@ * @author Frans Saris * @author Timo Hund */ -class FacetRegistryTest extends UnitTestCase +class FacetRegistryTest extends UnitTest { /** * @var ObjectManagerInterface diff --git a/Tests/Unit/Domain/Search/ResultSet/SearchResultSetTest.php b/Tests/Unit/Domain/Search/ResultSet/SearchResultSetTest.php index 1a9cf83301..3e2996a930 100644 --- a/Tests/Unit/Domain/Search/ResultSet/SearchResultSetTest.php +++ b/Tests/Unit/Domain/Search/ResultSet/SearchResultSetTest.php @@ -244,7 +244,8 @@ public function testAdditionalFiltersGetPassedToTheQuery() $resultSet = $this->searchResultSetService->search($fakeRequest); $this->assertSame($resultSet->getResponse(), $fakeResponse, 'Did not get the expected fakeResponse'); - $this->assertSame(count($resultSet->getUsedQuery()->getFilters()), 1, 'There should be one registered filter in the query'); + + $this->assertSame(count($resultSet->getUsedQuery()->getFilters()->getValues()), 1, 'There should be one registered filter in the query'); } /** diff --git a/composer.json b/composer.json index a6602383c8..996696de10 100644 --- a/composer.json +++ b/composer.json @@ -24,8 +24,8 @@ "typo3/cms-core": "^8.7.0 || ^9.0" }, "require-dev": { - "phpunit/phpunit": "^5.6", - "nimut/testing-framework": "^2.0" + "phpunit/phpunit": "^6.0", + "nimut/testing-framework": "^3.0" }, "replace": { "solr": "self.version",