1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
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');
|