Skip to content

Commit

Permalink
Fixed translation test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed May 28, 2024
1 parent 8e426a8 commit d8e8c91
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/integration/IbexaTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Symfony\Component\Notifier\NotifierInterface;
use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;

final class IbexaTestKernel extends BaseIbexaTestKernel
class IbexaTestKernel extends BaseIbexaTestKernel
{
public function registerBundles(): iterable
{
Expand Down Expand Up @@ -72,11 +72,19 @@ protected static function getExposedServicesById(): iterable
yield 'ibexa.cache_pool' => TagAwareAdapterInterface::class;
}

protected function skipOverridingCustomTagConfig(): bool
{
return false;
}

public function registerContainerConfiguration(LoaderInterface $loader): void
{
parent::registerContainerConfiguration($loader);

$loader->load(__DIR__ . '/../lib/_settings/common.yaml');
if (!$this->skipOverridingCustomTagConfig()) {
$loader->load(__DIR__ . '/../lib/_settings/common.yaml');
}

$loader->load(__DIR__ . '/Resources/config.yaml');
$loader->load(static function (ContainerBuilder $container): void {
$container->setDefinition(
Expand Down
18 changes: 18 additions & 0 deletions tests/integration/IbexaTestKernelForTranslationTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace Ibexa\Tests\Integration\FieldTypeRichText;

final class IbexaTestKernelForTranslationTest extends IbexaTestKernel
{
protected function skipOverridingCustomTagConfig(): bool
{
// Loading custom tag configuration for tests cause extraction test failure
return true;
}
}
5 changes: 5 additions & 0 deletions tests/integration/TranslationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ public static function provideConfigNamesForTranslation(): iterable
{
yield ['ibexa_fieldtype_richtext'];
}

protected static function getKernelClass(): string
{
return IbexaTestKernelForTranslationTest::class;
}
}

0 comments on commit d8e8c91

Please sign in to comment.