Skip to content

Commit

Permalink
IBX-3451: Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Jul 28, 2022
1 parent ca2cfca commit 06f4d5b
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\Content;
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension;
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\ServiceTags;
use eZ\Bundle\EzPublishCoreBundle\Features\Context\QueryControllerContext;
use eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\Filter\CustomCriterionQueryBuilder;
use eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\Filter\CustomSortClauseQueryBuilder;
use eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\QueryTypeBundle\QueryType\TestQueryType;
Expand Down Expand Up @@ -853,6 +854,19 @@ public function getFilteringQueryBuilderData(): iterable
];
}

public function testDoesNotLoadTestServicesByDefault(): void
{
$this->load();
$this->assertContainerBuilderNotHasService(QueryControllerContext::class);
}

public function testLoadsTestServicesWhenParameterIsSpecified(): void
{
$this->container->setParameter('ibexa.testing.browser.enabled', true);
$this->load();
$this->assertContainerBuilderHasService(QueryControllerContext::class);
}

/**
* Prepare Core Container for compilation by mocking required parameters and compile it.
*/
Expand Down

0 comments on commit 06f4d5b

Please sign in to comment.