-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for translation extraction (#40)
- Loading branch information
1 parent
47c09b0
commit d04450b
Showing
8 changed files
with
200 additions
and
9 deletions.
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
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
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,17 @@ | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" | ||
bootstrap="tests/bootstrap.php" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
failOnWarning="true" | ||
verbose="true"> | ||
<php> | ||
<env name="KERNEL_CLASS" value="Ibexa\Tests\Integration\FieldTypeMatrix\Kernel" /> | ||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=4&max[direct]=0&verbose=0"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="integration"> | ||
<directory>tests/integration</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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,22 @@ | ||
<?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); | ||
|
||
use Ibexa\Tests\Integration\FieldTypeMatrix\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
|
||
require_once dirname(__DIR__) . '/vendor/autoload.php'; | ||
|
||
chdir(dirname(__DIR__)); | ||
|
||
$kernel = new Kernel('test', true); | ||
$kernel->boot(); | ||
|
||
$application = new Application($kernel); | ||
$application->setAutoExit(false); | ||
|
||
$kernel->shutdown(); |
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,70 @@ | ||
<?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\FieldTypeMatrix; | ||
|
||
use Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle; | ||
use Ibexa\Bundle\AdminUi\IbexaAdminUiBundle; | ||
use Ibexa\Bundle\ContentForms\IbexaContentFormsBundle; | ||
use Ibexa\Bundle\DesignEngine\IbexaDesignEngineBundle; | ||
use Ibexa\Bundle\FieldTypeMatrix\IbexaFieldTypeMatrixBundle; | ||
use Ibexa\Bundle\GraphQL\IbexaGraphQLBundle; | ||
use Ibexa\Bundle\Notifications\IbexaNotificationsBundle; | ||
use Ibexa\Bundle\Rest\IbexaRestBundle; | ||
use Ibexa\Bundle\Search\IbexaSearchBundle; | ||
use Ibexa\Bundle\User\IbexaUserBundle; | ||
use Ibexa\Contracts\Test\Core\IbexaTestKernel; | ||
use Knp\Bundle\MenuBundle\KnpMenuBundle; | ||
use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle; | ||
use Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle; | ||
use Symfony\Component\Config\Loader\LoaderInterface; | ||
use Symfony\Component\Config\Resource\FileResource; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\WebpackEncoreBundle\WebpackEncoreBundle; | ||
|
||
final class Kernel extends IbexaTestKernel | ||
{ | ||
public function registerBundles(): iterable | ||
{ | ||
yield from parent::registerBundles(); | ||
|
||
yield new LexikJWTAuthenticationBundle(); | ||
yield new HautelookTemplatedUriBundle(); | ||
yield new WebpackEncoreBundle(); | ||
yield new SwiftmailerBundle(); | ||
yield new KnpMenuBundle(); | ||
|
||
yield new IbexaRestBundle(); | ||
yield new IbexaContentFormsBundle(); | ||
yield new IbexaSearchBundle(); | ||
yield new IbexaUserBundle(); | ||
yield new IbexaDesignEngineBundle(); | ||
yield new IbexaAdminUiBundle(); | ||
yield new IbexaNotificationsBundle(); | ||
yield new IbexaGraphQLBundle(); | ||
|
||
yield new IbexaFieldTypeMatrixBundle(); | ||
} | ||
|
||
public function registerContainerConfiguration(LoaderInterface $loader): void | ||
{ | ||
parent::registerContainerConfiguration($loader); | ||
|
||
$loader->load(__DIR__ . '/Resources/config.yaml'); | ||
$loader->load(static function (ContainerBuilder $container): void { | ||
$resource = new FileResource(__DIR__ . '/Resources/routing.yaml'); | ||
$container->addResource($resource); | ||
$container->setParameter('form.type_extension.csrf.enabled', false); | ||
$container->loadFromExtension('framework', [ | ||
'router' => [ | ||
'resource' => $resource->getResource(), | ||
], | ||
]); | ||
}); | ||
} | ||
} |
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,23 @@ | ||
parameters: | ||
locale_fallback: en | ||
|
||
webpack_encore: | ||
# The path where Encore is building the assets - i.e. Encore.setOutputPath() | ||
output_path: '%kernel.project_dir%/public/build' | ||
|
||
lexik_jwt_authentication: | ||
secret_key: 'foo' | ||
|
||
ibexa: | ||
repositories: | ||
default: | ||
search: | ||
engine: '%env(SEARCH_ENGINE)%' | ||
connection: default | ||
|
||
system: | ||
default: | ||
languages: | ||
- eng-US | ||
- eng-GB | ||
- ger-DE |
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,2 @@ | ||
ibexa.user.default_profile_image.initials: | ||
path: /user/default_profile_image/initials.svg |
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,19 @@ | ||
<?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\FieldTypeMatrix; | ||
|
||
use Ibexa\Contracts\Test\Core\Translation\AbstractTranslationCase; | ||
|
||
final class TranslationTest extends AbstractTranslationCase | ||
{ | ||
public static function provideConfigNamesForTranslation(): iterable | ||
{ | ||
yield ['ibexa_fieldtype_matrix']; | ||
} | ||
} |