From 054e4825d83212a6e820b11ca86959fd3a4948dc Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Fri, 24 Dec 2021 22:33:02 +0200 Subject: [PATCH] Suppress PHPUnit 9 deprecation notices --- tests/phpunit/Integration/I18nJsonFileIntegrityTest.php | 3 +++ tests/phpunit/Unit/Formats/GalleryTest.php | 3 +++ tests/phpunit/Unit/Formats/ValueRankTest.php | 3 +++ tests/phpunit/Unit/Outline/ListTreeBuilderTest.php | 3 +++ tests/phpunit/Unit/Outline/TemplateBuilderTest.php | 3 +++ tests/phpunit/Unit/ResourceFormatterTest.php | 3 +++ 6 files changed, 18 insertions(+) diff --git a/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php b/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php index a676f6b70..303b6deaa 100644 --- a/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php +++ b/tests/phpunit/Integration/I18nJsonFileIntegrityTest.php @@ -2,6 +2,7 @@ namespace SRF\Tests\Integration; +use SMW\Tests\PHPUnitCompat; use SMW\Tests\Utils\UtilityFactory; /** @@ -15,6 +16,8 @@ */ class I18nJsonFileIntegrityTest extends \PHPUnit_Framework_TestCase { + use PHPUnitCompat; + /** * @dataProvider i18nFileProvider */ diff --git a/tests/phpunit/Unit/Formats/GalleryTest.php b/tests/phpunit/Unit/Formats/GalleryTest.php index 4425b23ef..98623336f 100644 --- a/tests/phpunit/Unit/Formats/GalleryTest.php +++ b/tests/phpunit/Unit/Formats/GalleryTest.php @@ -6,6 +6,7 @@ use TraditionalImageGallery; use Title; use SMW\Test\QueryPrinterRegistryTestCase; +use SMW\Tests\PHPUnitCompat; /** * Tests for the SRF\Gallery class. @@ -25,6 +26,8 @@ */ class GalleryTest extends QueryPrinterRegistryTestCase { + use PHPUnitCompat; + private $queryResult; private $title; diff --git a/tests/phpunit/Unit/Formats/ValueRankTest.php b/tests/phpunit/Unit/Formats/ValueRankTest.php index 628eea9a2..98c843745 100644 --- a/tests/phpunit/Unit/Formats/ValueRankTest.php +++ b/tests/phpunit/Unit/Formats/ValueRankTest.php @@ -3,6 +3,7 @@ namespace SRF\Tests\Unit\Formats; use SMW\Test\QueryPrinterRegistryTestCase; +use SMW\Tests\PHPUnitCompat; use SRFValueRank; /** @@ -23,6 +24,8 @@ */ class ValueRankTest extends QueryPrinterRegistryTestCase { + use PHPUnitCompat; + /** * @see QueryPrinterRegistryTestCase::getFormats * diff --git a/tests/phpunit/Unit/Outline/ListTreeBuilderTest.php b/tests/phpunit/Unit/Outline/ListTreeBuilderTest.php index 80679e90f..cce761bdd 100644 --- a/tests/phpunit/Unit/Outline/ListTreeBuilderTest.php +++ b/tests/phpunit/Unit/Outline/ListTreeBuilderTest.php @@ -2,6 +2,7 @@ namespace SRF\Tests\Outline; +use SMW\Tests\PHPUnitCompat; use SRF\Outline\ListTreeBuilder; use SRF\Outline\OutlineTree; @@ -16,6 +17,8 @@ */ class ListTreeBuilderTest extends \PHPUnit_Framework_TestCase { + use PHPUnitCompat; + public function testCanConstruct() { $this->assertInstanceOf( diff --git a/tests/phpunit/Unit/Outline/TemplateBuilderTest.php b/tests/phpunit/Unit/Outline/TemplateBuilderTest.php index fd58fdf1d..d84b70eda 100644 --- a/tests/phpunit/Unit/Outline/TemplateBuilderTest.php +++ b/tests/phpunit/Unit/Outline/TemplateBuilderTest.php @@ -2,6 +2,7 @@ namespace SRF\Tests\Outline; +use SMW\Tests\PHPUnitCompat; use SRF\Outline\TemplateBuilder; use SRF\Outline\OutlineTree; @@ -16,6 +17,8 @@ */ class TemplateBuilderTest extends \PHPUnit_Framework_TestCase { + use PHPUnitCompat; + public function testCanConstruct() { $this->assertInstanceOf( diff --git a/tests/phpunit/Unit/ResourceFormatterTest.php b/tests/phpunit/Unit/ResourceFormatterTest.php index 9443b94ab..655a6db4d 100644 --- a/tests/phpunit/Unit/ResourceFormatterTest.php +++ b/tests/phpunit/Unit/ResourceFormatterTest.php @@ -2,6 +2,7 @@ namespace SRF\Tests; +use SMW\Tests\PHPUnitCompat; use SRF\ResourceFormatter; /** @@ -15,6 +16,8 @@ */ class ResourceFormatterTest extends \PHPUnit_Framework_TestCase { + use PHPUnitCompat; + public function testSession() { $this->assertContains(