From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 18 May 2024 08:56:38 +0200
Subject: Exclude tests failing with recent PHPUnit (11)

Bug-Debian: https://bugs.debian.org/1070582
---
 tests/CommonMarkTest.php       | 3 +++
 tests/CommonMarkTestStrict.php | 2 ++
 tests/CommonMarkTestWeak.php   | 2 ++
 tests/ParsedownTest.php        | 2 ++
 4 files changed, 9 insertions(+)

diff --git a/tests/CommonMarkTest.php b/tests/CommonMarkTest.php
index 3d3e492..f9794f3 100644
--- a/tests/CommonMarkTest.php
+++ b/tests/CommonMarkTest.php
@@ -2,6 +2,8 @@
 
 namespace Erusev\Parsedown\Tests;
 
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
+
 /**
  * Test Parsedown against cached expect-to-pass CommonMark spec examples
  *
@@ -77,6 +79,7 @@ class CommonMarkTest extends CommonMarkTestStrict
      * @throws \PHPUnit\Framework\AssertionFailedError
      * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
      */
+    #[RequiresPhpunit('< 11')]
     public function testUpdateDatabase($id, $section, $markdown, $expectedHtml)
     {
         parent::testExample($id, $section, $markdown, $expectedHtml);
diff --git a/tests/CommonMarkTestStrict.php b/tests/CommonMarkTestStrict.php
index dd64c21..fb0fa05 100644
--- a/tests/CommonMarkTestStrict.php
+++ b/tests/CommonMarkTestStrict.php
@@ -7,6 +7,7 @@ use Erusev\Parsedown\Configurables\InlineTypes;
 use Erusev\Parsedown\Configurables\StrictMode;
 use Erusev\Parsedown\Parsedown;
 use Erusev\Parsedown\State;
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use PHPUnit\Framework\TestCase;
 
 /**
@@ -48,6 +49,7 @@ class CommonMarkTestStrict extends TestCase
      * @throws \PHPUnit\Framework\AssertionFailedError
      * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
      */
+    #[RequiresPhpunit('< 11')]
     public function testExample($_, $__, $markdown, $expectedHtml)
     {
         $actualHtml = $this->Parsedown->toHtml($markdown);
diff --git a/tests/CommonMarkTestWeak.php b/tests/CommonMarkTestWeak.php
index 9293de9..85d4d5e 100644
--- a/tests/CommonMarkTestWeak.php
+++ b/tests/CommonMarkTestWeak.php
@@ -3,6 +3,7 @@
 namespace Erusev\Parsedown\Tests;
 
 use Erusev\Parsedown\Html\Renderables\Element;
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 
 /**
  * Test Parsedown against the CommonMark spec, but less aggressive
@@ -50,6 +51,7 @@ class CommonMarkTestWeak extends CommonMarkTestStrict
      * @throws \PHPUnit\Framework\AssertionFailedError
      * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
      */
+    #[RequiresPhpunit('< 11')]
     public function testExample($_, $__, $markdown, $expectedHtml)
     {
         $expectedHtml = $this->cleanupHtml($expectedHtml);
diff --git a/tests/ParsedownTest.php b/tests/ParsedownTest.php
index 1f302b4..e7cb075 100755
--- a/tests/ParsedownTest.php
+++ b/tests/ParsedownTest.php
@@ -13,6 +13,7 @@ use Erusev\Parsedown\Configurables\StrictMode;
 use Erusev\Parsedown\Parsedown;
 use Erusev\Parsedown\State;
 use Erusev\Parsedown\StateBearer;
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use PHPUnit\Framework\TestCase;
 
 class ParsedownTest extends TestCase
@@ -58,6 +59,7 @@ class ParsedownTest extends TestCase
      * @throws \PHPUnit\Framework\ExpectationFailedException
      * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
      */
+    #[RequiresPhpunit('< 11')]
     public function test_($test, $dir)
     {
         $markdown = \file_get_contents($dir . $test . '.md');
