From 7d7b98f01af5c89a67436d9795734500260b0d26 Mon Sep 17 00:00:00 2001 From: Marko991 <92681403+marko220991@users.noreply.github.com> Date: Mon, 26 Feb 2024 13:31:36 +0100 Subject: [PATCH] Bug fix - failing CI test (#104) - Instead of `assertContains` use `assertStringContainsStringIgnoringCase` - Instead of `assertInternalType` use `assertIsArray` --- .github/workflows/ci.yml | 4 ++-- tests/phpunit/Integration/I18nJsonFileIntegrityTest.php | 3 +-- tests/phpunit/Unit/MermaidParserFunctionTest.php | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d89d3e7..3ba620d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,9 @@ jobs: database_type: mysql database_image: "mariadb:latest" coverage: false - experimental: true + experimental: false - mediawiki_version: '1.40' - smw_version: dev-master + smw_version: 'dev-master' php_version: 8.1 database_type: mysql database_image: "mariadb:latest" diff --git a/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php b/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php index 1bc49fb..6b52e02 100644 --- a/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php +++ b/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php @@ -20,8 +20,7 @@ public function testI18NJsonDecodeEncode( $file ) { $contents = file_get_contents( $file ); - $this->assertInternalType( - 'array', + $this->assertIsArray( json_decode( $contents, true ), 'Failed with ' . $this->getDescriptiveJsonError( json_last_error() ) . ' in ' . $file ); diff --git a/tests/phpunit/Unit/MermaidParserFunctionTest.php b/tests/phpunit/Unit/MermaidParserFunctionTest.php index 99c5501..fe87469 100644 --- a/tests/phpunit/Unit/MermaidParserFunctionTest.php +++ b/tests/phpunit/Unit/MermaidParserFunctionTest.php @@ -66,7 +66,7 @@ public function testParse($text, $expected) $mockExtractor ); - $this->assertContains( + $this->assertStringContainsStringIgnoringCase( $expected, $instance->parse($text) );