eZ\Publish\Core\Base\Tests\Container\Compiler\Search\Legacy\SortClauseConverterPassTest::testAddLocationAndContentHandlers PHP Method

testAddLocationAndContentHandlers() public method

    public function testAddLocationAndContentHandlers()
    {
        $this->setDefinition('ezpublish.search.legacy.gateway.sort_clause_converter.content', new Definition());
        $this->setDefinition('ezpublish.search.legacy.gateway.sort_clause_converter.location', new Definition());
        $commonServiceId = 'common_service_id';
        $def = new Definition();
        $def->addTag('ezpublish.search.legacy.gateway.sort_clause_handler.content');
        $def->addTag('ezpublish.search.legacy.gateway.sort_clause_handler.location');
        $this->setDefinition($commonServiceId, $def);
        $this->compile();
        $this->assertContainerBuilderHasServiceDefinitionWithMethodCall('ezpublish.search.legacy.gateway.sort_clause_converter.content', 'addHandler', array(new Reference($commonServiceId)));
        $this->assertContainerBuilderHasServiceDefinitionWithMethodCall('ezpublish.search.legacy.gateway.sort_clause_converter.location', 'addHandler', array(new Reference($commonServiceId)));
    }