-
Notifications
You must be signed in to change notification settings - Fork 1
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 (#63)
- Loading branch information
1 parent
90e9fe9
commit 519420a
Showing
9 changed files
with
149 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: 'Install Composer dependencies' | ||
description: 'Set Composer root version from branch alias and install dependencies' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
version=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) | ||
echo "version=$version" >> $GITHUB_ENV | ||
shell: bash | ||
- uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: "highest" | ||
env: | ||
COMPOSER_ROOT_VERSION: ${{ env.version }} |
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\ContentForms\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
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\ContentForms\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,30 @@ | ||
<?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\ContentForms; | ||
|
||
use Ibexa\Bundle\ContentForms\IbexaContentFormsBundle; | ||
use Ibexa\Contracts\Test\Core\IbexaTestKernel; | ||
use Symfony\Component\Config\Loader\LoaderInterface; | ||
|
||
final class Kernel extends IbexaTestKernel | ||
{ | ||
public function registerBundles(): iterable | ||
{ | ||
yield from parent::registerBundles(); | ||
|
||
yield new IbexaContentFormsBundle(); | ||
} | ||
|
||
public function registerContainerConfiguration(LoaderInterface $loader): void | ||
{ | ||
parent::registerContainerConfiguration($loader); | ||
|
||
$loader->load(__DIR__ . '/Resources/config.yaml'); | ||
} | ||
} |
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 @@ | ||
parameters: | ||
locale_fallback: en |
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\ContentForms; | ||
|
||
use Ibexa\Contracts\Test\Core\Translation\AbstractTranslationCase; | ||
|
||
final class TranslationTest extends AbstractTranslationCase | ||
{ | ||
public static function provideConfigNamesForTranslation(): iterable | ||
{ | ||
yield ['ibexa_content_forms']; | ||
} | ||
} |