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

testAddLocationAndContentHandlers() public method

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