Skip to content
Snippets Groups Projects
Unverified Commit e48d6ee3 authored by Kevin Wenger's avatar Kevin Wenger Committed by GitHub
Browse files

Merge pull request #23 from antistatique/8.x-2.x--ci-update

parents d6d96144 f3eb0cc0
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 44 deletions
name: Continuous integration name: Continuous integration
on: [pull_request] on:
push:
pull_request:
schedule:
- cron: '0 0 * * THU'
jobs: jobs:
tests: tests:
...@@ -9,11 +13,11 @@ jobs: ...@@ -9,11 +13,11 @@ jobs:
strategy: strategy:
matrix: matrix:
drupal_version: ['8.8', '8.9', '9.0'] drupal_version: [ '8.8', '8.9', '9.0', '9.1', '9.2' ]
module: ['potion'] module: ['potion']
experimental: [ false ] experimental: [ false ]
include: include:
- drupal_version: '9.1' - drupal_version: '9.3'
module: 'potion' module: 'potion'
experimental: true experimental: true
......
...@@ -17,7 +17,7 @@ class AnnotationExtractorTest extends KernelTestBase { ...@@ -17,7 +17,7 @@ class AnnotationExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'potion', 'potion',
...@@ -51,7 +51,7 @@ class AnnotationExtractorTest extends KernelTestBase { ...@@ -51,7 +51,7 @@ class AnnotationExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var string $extractionPath */ /** @var string $extractionPath */
......
...@@ -17,7 +17,7 @@ class PhpExtractorTest extends KernelTestBase { ...@@ -17,7 +17,7 @@ class PhpExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'potion', 'potion',
...@@ -51,7 +51,7 @@ class PhpExtractorTest extends KernelTestBase { ...@@ -51,7 +51,7 @@ class PhpExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var string $extractionPath */ /** @var string $extractionPath */
......
...@@ -18,7 +18,7 @@ class TwigExtractorTest extends KernelTestBase { ...@@ -18,7 +18,7 @@ class TwigExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'potion', 'potion',
...@@ -52,7 +52,7 @@ class TwigExtractorTest extends KernelTestBase { ...@@ -52,7 +52,7 @@ class TwigExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var \Twig_Environment $twig */ /** @var \Twig_Environment $twig */
......
...@@ -17,7 +17,7 @@ class YamlExtractorTest extends KernelTestBase { ...@@ -17,7 +17,7 @@ class YamlExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'potion', 'potion',
...@@ -51,7 +51,7 @@ class YamlExtractorTest extends KernelTestBase { ...@@ -51,7 +51,7 @@ class YamlExtractorTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var string $extractionPath */ /** @var string $extractionPath */
......
...@@ -24,7 +24,7 @@ class MessageCatalogueTest extends KernelTestBase { ...@@ -24,7 +24,7 @@ class MessageCatalogueTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
$this->catalogue = new MessageCatalogue(); $this->catalogue = new MessageCatalogue();
......
...@@ -30,7 +30,7 @@ class TranslationsExportTest extends TranslationsTestsBase { ...@@ -30,7 +30,7 @@ class TranslationsExportTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'system', 'system',
...@@ -40,7 +40,7 @@ class TranslationsExportTest extends TranslationsTestsBase { ...@@ -40,7 +40,7 @@ class TranslationsExportTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var \Drupal\potion\TranslationsExport $translationExport */ /** @var \Drupal\potion\TranslationsExport $translationExport */
......
...@@ -31,7 +31,7 @@ class TranslationsExtractorTest extends TranslationsTestsBase { ...@@ -31,7 +31,7 @@ class TranslationsExtractorTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'system', 'system',
...@@ -49,7 +49,7 @@ class TranslationsExtractorTest extends TranslationsTestsBase { ...@@ -49,7 +49,7 @@ class TranslationsExtractorTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var \Drupal\potion\TranslationsExtractor $translationExtractor */ /** @var \Drupal\potion\TranslationsExtractor $translationExtractor */
......
...@@ -30,7 +30,7 @@ class TranslationsFillTest extends TranslationsTestsBase { ...@@ -30,7 +30,7 @@ class TranslationsFillTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'system', 'system',
'locale', 'locale',
'language', 'language',
...@@ -41,7 +41,7 @@ class TranslationsFillTest extends TranslationsTestsBase { ...@@ -41,7 +41,7 @@ class TranslationsFillTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var \Drupal\potion\TranslationsImport $translationsImport */ /** @var \Drupal\potion\TranslationsImport $translationsImport */
......
...@@ -30,7 +30,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -30,7 +30,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'file', 'file',
...@@ -40,7 +40,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -40,7 +40,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var \Drupal\potion\TranslationsImport $translationsImport */ /** @var \Drupal\potion\TranslationsImport $translationsImport */
...@@ -73,7 +73,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -73,7 +73,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'l’année dernière'); $this->assertNotEquals($string->translation, 'l’année dernière');
// Assert unexisting source w/ context is imported as "customized". // Assert unexisting source w/ context is imported as "customized".
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -94,7 +94,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -94,7 +94,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Juil.'); $this->assertNotEquals($string->translation, 'Juil.');
// Existing "customized" trans w/o context has not been overrided. // Existing "customized" trans w/o context has not been overrided.
$source = $this->localStorage->findString(['source' => 'Jan']); $source = $this->localStorage->findString(['source' => 'Jan']);
...@@ -103,7 +103,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -103,7 +103,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Janv.'); $this->assertNotEquals($string->translation, 'Janv.');
// Assert strings with vars are imported as "customized". // Assert strings with vars are imported as "customized".
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -137,7 +137,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -137,7 +137,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Mars'); $this->assertNotEquals($string->translation, 'Mars');
// Existing "customized" translations w/ context has not been overrided. // Existing "customized" translations w/ context has not been overrided.
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -149,7 +149,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -149,7 +149,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'April'); $this->assertNotEquals($string->translation, 'April');
} }
/** /**
...@@ -177,7 +177,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -177,7 +177,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'l’année dernière'); $this->assertNotEquals($string->translation, 'l’année dernière');
// Assert unexisting source w/ context is imported as "customized". // Assert unexisting source w/ context is imported as "customized".
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -198,7 +198,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -198,7 +198,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Juil.'); $this->assertNotEquals($string->translation, 'Juil.');
// Existing "customized" trans w/o context has not been overrided. // Existing "customized" trans w/o context has not been overrided.
$source = $this->localStorage->findString(['source' => 'Jan']); $source = $this->localStorage->findString(['source' => 'Jan']);
...@@ -207,7 +207,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -207,7 +207,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Janv.'); $this->assertNotEquals($string->translation, 'Janv.');
// Assert strings with vars are imported as "non-customized". // Assert strings with vars are imported as "non-customized".
$source = $this->localStorage->findString(['source' => 'I love @color car']); $source = $this->localStorage->findString(['source' => 'I love @color car']);
...@@ -237,7 +237,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -237,7 +237,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Mars'); $this->assertNotEquals($string->translation, 'Mars');
// Existing "customized" translations w/ context has not been overrided. // Existing "customized" translations w/ context has not been overrided.
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -249,7 +249,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -249,7 +249,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'April'); $this->assertNotEquals($string->translation, 'April');
} }
/** /**
...@@ -275,7 +275,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -275,7 +275,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'l’année dernière'); $this->assertNotEquals($string->translation, 'l’année dernière');
// Assert unexisting source w/ context is imported as "customized". // Assert unexisting source w/ context is imported as "customized".
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -296,7 +296,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -296,7 +296,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Juil.'); $this->assertNotEquals($string->translation, 'Juil.');
// Existing "customized" trans w/o context has not been overrided. // Existing "customized" trans w/o context has not been overrided.
$source = $this->localStorage->findString(['source' => 'Jan']); $source = $this->localStorage->findString(['source' => 'Jan']);
...@@ -305,7 +305,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -305,7 +305,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Janv.'); $this->assertNotEquals($string->translation, 'Janv.');
// Assert strings with vars are imported as "customized". // Assert strings with vars are imported as "customized".
$source = $this->localStorage->findString(['source' => 'I love @color car']); $source = $this->localStorage->findString(['source' => 'I love @color car']);
...@@ -337,7 +337,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -337,7 +337,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Mars'); $this->assertNotEquals($string->translation, 'Mars');
// Existing "customized" translations w/ context has been overrided. // Existing "customized" translations w/ context has been overrided.
$source = $this->localStorage->findString([ $source = $this->localStorage->findString([
...@@ -392,7 +392,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -392,7 +392,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_NOT_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Juil.'); $this->assertNotEquals($string->translation, 'Juil.');
// Existing "customized" trans w/o context has not been overrided. // Existing "customized" trans w/o context has not been overrided.
$source = $this->localStorage->findString(['source' => 'Jan']); $source = $this->localStorage->findString(['source' => 'Jan']);
...@@ -401,7 +401,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -401,7 +401,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'Janv.'); $this->assertNotEquals($string->translation, 'Janv.');
// Assert strings with vars are imported as "non-customized". // Assert strings with vars are imported as "non-customized".
$source = $this->localStorage->findString(['source' => 'I love @color car']); $source = $this->localStorage->findString(['source' => 'I love @color car']);
...@@ -445,7 +445,7 @@ class TranslationsImportTest extends TranslationsTestsBase { ...@@ -445,7 +445,7 @@ class TranslationsImportTest extends TranslationsTestsBase {
'lid' => $source->lid, 'lid' => $source->lid,
]); ]);
$this->assertEquals($string->customized, LOCALE_CUSTOMIZED); $this->assertEquals($string->customized, LOCALE_CUSTOMIZED);
$this->assertNotEqual($string->translation, 'April'); $this->assertNotEquals($string->translation, 'April');
} }
/** /**
......
...@@ -21,7 +21,7 @@ class TranslationsTest extends TranslationsTestsBase { ...@@ -21,7 +21,7 @@ class TranslationsTest extends TranslationsTestsBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'file', 'file',
......
...@@ -27,7 +27,7 @@ abstract class TranslationsTestsBase extends KernelTestBase { ...@@ -27,7 +27,7 @@ abstract class TranslationsTestsBase extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
$this->installSchema('locale', [ $this->installSchema('locale', [
......
...@@ -23,7 +23,7 @@ class UtilityTest extends KernelTestBase { ...@@ -23,7 +23,7 @@ class UtilityTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public static $modules = [ protected static $modules = [
'locale', 'locale',
'language', 'language',
'file', 'file',
...@@ -33,7 +33,7 @@ class UtilityTest extends KernelTestBase { ...@@ -33,7 +33,7 @@ class UtilityTest extends KernelTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
/** @var \Drupal\potion\Utility $utility */ /** @var \Drupal\potion\Utility $utility */
......
...@@ -13,7 +13,7 @@ class UtilityBackupTest extends UtilityTestBase { ...@@ -13,7 +13,7 @@ class UtilityBackupTest extends UtilityTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
$dir = '/var/tmp/'; $dir = '/var/tmp/';
...@@ -25,7 +25,7 @@ class UtilityBackupTest extends UtilityTestBase { ...@@ -25,7 +25,7 @@ class UtilityBackupTest extends UtilityTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function tearDown() { protected function tearDown(): void {
$dir = '/var/tmp/'; $dir = '/var/tmp/';
@unlink($dir . 'fr.po'); @unlink($dir . 'fr.po');
@unlink($dir . 'fr.po.~1~'); @unlink($dir . 'fr.po.~1~');
......
...@@ -26,7 +26,7 @@ abstract class UtilityTestBase extends UnitTestCase { ...@@ -26,7 +26,7 @@ abstract class UtilityTestBase extends UnitTestCase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function setUp() { protected function setUp(): void {
parent::setUp(); parent::setUp();
$en = new Language([ $en = new Language([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment