-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NGSTACK-489: added dedicated services config for regression tests
- Loading branch information
Showing
3 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
tests/lib/Integration/Resources/config/regression_services.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
services: | ||
netgen_test.search.solr.subdocument_mapper.content: | ||
class: Netgen\EzPlatformSearchExtra\Tests\Integration\Implementation\Solr\SubdocumentMapper\TestContentSubdocumentMapper | ||
tags: | ||
- {name: netgen.search.solr.subdocument_mapper.content} | ||
|
||
netgen_test.search.solr.subdocument_mapper.content_translation: | ||
class: Netgen\EzPlatformSearchExtra\Tests\Integration\Implementation\Solr\SubdocumentMapper\TestContentTranslationSubdocumentMapper | ||
tags: | ||
- {name: netgen.search.solr.subdocument_mapper.content_translation} | ||
|
||
netgen_test.search.solr.subdocument_mapper.content.sort: | ||
class: Netgen\EzPlatformSearchExtra\Tests\Integration\Implementation\Solr\SubdocumentMapper\TestSortContentSubdocumentMapper | ||
tags: | ||
- {name: netgen.search.solr.subdocument_mapper.content} | ||
|
||
# netgen_test.search.solr.slot.subdocument_publish_version: | ||
# parent: ezpublish.search.solr.slot | ||
# class: '%ezpublish.search.solr.slot.publish_version.class%' | ||
# tags: | ||
# - {name: ezpublish.search.solr.slot, signal: ContentService\PublishVersionSignal} | ||
|
||
netgen_test.search.solr.event_subscriber.child_updates_parent: | ||
class: Netgen\EzPlatformSearchExtra\Tests\Integration\Implementation\Common\EventSubscriber\TestChildUpdatesParent | ||
arguments: | ||
- '@ezpublish.spi.search' | ||
- '@ezpublish.api.persistence_handler' | ||
tags: | ||
- { name: kernel.event_subscriber } | ||
|
||
# Disabled for regression tests | ||
# Symfony\Component\EventDispatcher\EventDispatcher: | ||
# calls: | ||
# - ['addSubscriber', ['@netgen_test.search.solr.event_subscriber.child_updates_parent']] | ||
|
||
netgen_test.search.solr.field_mapper.content: | ||
class: Netgen\EzPlatformSearchExtra\Tests\Integration\Implementation\Solr\FieldMapper\TestContentFieldMapper | ||
arguments: | ||
- '@ezpublish.spi.persistence.content_handler' | ||
- '@ezpublish.spi.persistence.content_type_handler' | ||
- '@ezpublish.spi.search.legacy' | ||
tags: | ||
- { name: ezpublish.search.solr.field_mapper.content } | ||
|
||
netgen_test.search.solr.field_mapper.location: | ||
class: Netgen\EzPlatformSearchExtra\Tests\Integration\Implementation\Solr\FieldMapper\TestLocationFieldMapper | ||
arguments: | ||
- '@ezpublish.spi.persistence.content_handler' | ||
- '@ezpublish.spi.persistence.content_type_handler' | ||
- '@ezpublish.spi.search.legacy' | ||
tags: | ||
- { name: ezpublish.search.solr.field_mapper.location } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Netgen\EzPlatformSearchExtra\Tests\Integration\SetupFactory; | ||
|
||
use EzSystems\EzPlatformSolrSearchEngine\Tests\SetupFactory\LegacySetupFactory as CoreSolrSetupFactory; | ||
use Netgen\EzPlatformSearchExtra\Container\Compiler; | ||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
|
||
class RegressionSolr extends CoreSolrSetupFactory | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* @throws \Exception | ||
*/ | ||
protected function externalBuildContainer(ContainerBuilder $containerBuilder) | ||
{ | ||
parent::externalBuildContainer($containerBuilder); | ||
|
||
$configPath = __DIR__ . '/../../../../lib/Resources/config/'; | ||
$loader = new YamlFileLoader($containerBuilder, new FileLocator($configPath)); | ||
$loader->load('search/common.yml'); | ||
$loader->load('search/solr.yml'); | ||
|
||
$testConfigPath = __DIR__ . '/../Resources/config/'; | ||
$loader = new YamlFileLoader($containerBuilder, new FileLocator($testConfigPath)); | ||
$loader->load('regression_services.yml'); | ||
|
||
// Needs to be added first because other passes depend on it | ||
$containerBuilder->addCompilerPass(new Compiler\TagSubdocumentCriterionVisitorsPass()); | ||
$containerBuilder->addCompilerPass(new Compiler\AggregateContentSubdocumentMapperPass()); | ||
$containerBuilder->addCompilerPass(new Compiler\AggregateContentTranslationSubdocumentMapperPass()); | ||
$containerBuilder->addCompilerPass(new Compiler\AggregateSubdocumentQueryCriterionVisitorPass()); | ||
$containerBuilder->addCompilerPass(new Compiler\RawFacetBuilderDomainVisitorPass()); | ||
$containerBuilder->addCompilerPass(new Compiler\FieldTypeRegistryPass()); | ||
} | ||
} |