eZ\Publish\Core\Search\Legacy\Tests\Content\Location\HandlerLocationTest::getContentSearchHandler PHP Method

getContentSearchHandler() protected method

This method returns a fully functional search handler to perform tests on.
protected getContentSearchHandler ( array $fullTextSearchConfiguration = [] ) : Handler
$fullTextSearchConfiguration array
return eZ\Publish\Core\Search\Legacy\Content\Handler
    protected function getContentSearchHandler(array $fullTextSearchConfiguration = array())
    {
        $transformationProcessor = new Persistence\TransformationProcessor\DefinitionBased(new Persistence\TransformationProcessor\DefinitionBased\Parser(), new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()), glob(__DIR__ . '/../../../../Persistence/Tests/TransformationProcessor/_fixtures/transformations/*.tr'));
        $commaSeparatedCollectionValueHandler = new CommonCriterionHandler\FieldValue\Handler\Collection($this->getDatabaseHandler(), $transformationProcessor, ',');
        $hyphenSeparatedCollectionValueHandler = new CommonCriterionHandler\FieldValue\Handler\Collection($this->getDatabaseHandler(), $transformationProcessor, '-');
        $simpleValueHandler = new CommonCriterionHandler\FieldValue\Handler\Simple($this->getDatabaseHandler(), $transformationProcessor);
        $compositeValueHandler = new CommonCriterionHandler\FieldValue\Handler\Composite($this->getDatabaseHandler(), $transformationProcessor);
        return new Content\Handler($this->getMock('eZ\\Publish\\Core\\Search\\Legacy\\Content\\Gateway'), new Content\Location\Gateway\DoctrineDatabase($this->getDatabaseHandler(), new CriteriaConverter(array(new LocationCriterionHandler\LocationId($this->getDatabaseHandler()), new LocationCriterionHandler\ParentLocationId($this->getDatabaseHandler()), new LocationCriterionHandler\LocationRemoteId($this->getDatabaseHandler()), new LocationCriterionHandler\Subtree($this->getDatabaseHandler()), new LocationCriterionHandler\Visibility($this->getDatabaseHandler()), new LocationCriterionHandler\Location\Depth($this->getDatabaseHandler()), new LocationCriterionHandler\Location\Priority($this->getDatabaseHandler()), new LocationCriterionHandler\Location\IsMainLocation($this->getDatabaseHandler()), new CommonCriterionHandler\ContentId($this->getDatabaseHandler()), new CommonCriterionHandler\ContentTypeGroupId($this->getDatabaseHandler()), new CommonCriterionHandler\ContentTypeId($this->getDatabaseHandler()), new CommonCriterionHandler\ContentTypeIdentifier($this->getDatabaseHandler(), $this->getContentTypeHandler()), new CommonCriterionHandler\DateMetadata($this->getDatabaseHandler()), new CommonCriterionHandler\Field($this->getDatabaseHandler(), $this->getContentTypeHandler(), $this->getLanguageHandler(), $this->getConverterRegistry(), new CommonCriterionHandler\FieldValue\Converter(new CommonCriterionHandler\FieldValue\HandlerRegistry(array('ezboolean' => $simpleValueHandler, 'ezcountry' => $commaSeparatedCollectionValueHandler, 'ezdate' => $simpleValueHandler, 'ezdatetime' => $simpleValueHandler, 'ezemail' => $simpleValueHandler, 'ezinteger' => $simpleValueHandler, 'ezobjectrelation' => $simpleValueHandler, 'ezobjectrelationlist' => $commaSeparatedCollectionValueHandler, 'ezselection' => $hyphenSeparatedCollectionValueHandler, 'eztime' => $simpleValueHandler)), $compositeValueHandler), $transformationProcessor), new CommonCriterionHandler\FullText($this->getDatabaseHandler(), $transformationProcessor, $fullTextSearchConfiguration), new CommonCriterionHandler\LanguageCode($this->getDatabaseHandler(), $this->getLanguageMaskGenerator()), new CommonCriterionHandler\LogicalAnd($this->getDatabaseHandler()), new CommonCriterionHandler\LogicalNot($this->getDatabaseHandler()), new CommonCriterionHandler\LogicalOr($this->getDatabaseHandler()), new CommonCriterionHandler\MapLocationDistance($this->getDatabaseHandler(), $this->getContentTypeHandler(), $this->getLanguageHandler()), new CommonCriterionHandler\MatchAll($this->getDatabaseHandler()), new CommonCriterionHandler\ObjectStateId($this->getDatabaseHandler()), new CommonCriterionHandler\FieldRelation($this->getDatabaseHandler(), $this->getContentTypeHandler(), $this->getLanguageHandler()), new CommonCriterionHandler\RemoteId($this->getDatabaseHandler()), new CommonCriterionHandler\SectionId($this->getDatabaseHandler()), new CommonCriterionHandler\UserMetadata($this->getDatabaseHandler()))), new SortClauseConverter(array(new LocationSortClauseHandler\Location\Id($this->getDatabaseHandler()), new CommonSortClauseHandler\ContentId($this->getDatabaseHandler()))), $this->getLanguageHandler()), new Content\WordIndexer\Gateway\DoctrineDatabase($this->getDatabaseHandler(), $this->getContentTypeHandler(), $transformationProcessor, new Content\WordIndexer\Repository\SearchIndex($this->getDatabaseHandler()), $this->getFullTextSearchConfiguration()), $this->getMockBuilder('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Mapper')->disableOriginalConstructor()->getMock(), $this->getLocationMapperMock(), $this->getLanguageHandler(), $this->getFullTextMapper($this->getContentTypeHandler()));
    }
HandlerLocationTest