From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Tue, 6 Feb 2024 19:21:40 +0100
Subject: Drop tests breaking under PHPUnit 11

---
 tests/functional/CMarkRegressionTest.php           | 41 ----------------
 tests/functional/CommonMarkJSRegressionTest.php    | 30 ------------
 .../GithubFlavoredMarkdownExtensionTest.php        | 43 -----------------
 .../SmartPunct/SmartPunctFunctionalTest.php        | 56 ----------------------
 tests/functional/SpecTest.php                      | 32 -------------
 .../Data/SymfonyYamlFrontMatterParserTest.php      | 26 ----------
 6 files changed, 228 deletions(-)
 delete mode 100644 tests/functional/CMarkRegressionTest.php
 delete mode 100644 tests/functional/CommonMarkJSRegressionTest.php
 delete mode 100644 tests/functional/Extension/GithubFlavoredMarkdownExtensionTest.php
 delete mode 100644 tests/functional/Extension/SmartPunct/SmartPunctFunctionalTest.php
 delete mode 100644 tests/functional/SpecTest.php

diff --git a/tests/functional/CMarkRegressionTest.php b/tests/functional/CMarkRegressionTest.php
deleted file mode 100644
index ec93cc4..0000000
--- a/tests/functional/CMarkRegressionTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * This file is part of the league/commonmark package.
- *
- * (c) Colin O'Dell <colinodell@gmail.com>
- *
- * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
- *  - (c) John MacFarlane
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace League\CommonMark\Tests\Functional;
-
-use League\CommonMark\Util\SpecReader;
-
-/**
- * Tests the parser against the CommonMark spec
- */
-final class CMarkRegressionTest extends AbstractSpecTestCase
-{
-    public static function dataProvider(): \Generator
-    {
-        self::markTestSkipped('Dependency not packaged (yet).');
-
-        $tests = SpecReader::readFile(__DIR__ . '/../../vendor/commonmark/cmark/test/regression.txt');
-        foreach ($tests as $example) {
-            // The case-fold test from example 21 fails on PHP 8.0.* and below due to the behavior of mb_convert_case().
-            // See https://3v4l.org/7TeXJ.
-            if (\PHP_VERSION_ID < 81000 && $example['number'] === 21) {
-                continue;
-            }
-
-            yield $example;
-        }
-    }
-}
diff --git a/tests/functional/CommonMarkJSRegressionTest.php b/tests/functional/CommonMarkJSRegressionTest.php
deleted file mode 100644
index ce58efd..0000000
--- a/tests/functional/CommonMarkJSRegressionTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * This file is part of the league/commonmark package.
- *
- * (c) Colin O'Dell <colinodell@gmail.com>
- *
- * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
- *  - (c) John MacFarlane
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace League\CommonMark\Tests\Functional;
-
-use League\CommonMark\Util\SpecReader;
-
-/**
- * Tests the parser against the CommonMark spec
- */
-final class CommonMarkJSRegressionTest extends AbstractSpecTestCase
-{
-    public static function dataProvider(): \Generator
-    {
-        yield from SpecReader::readFile(__DIR__ . '/../../vendor/commonmark/commonmark.js/test/regression.txt');
-    }
-}
diff --git a/tests/functional/Extension/GithubFlavoredMarkdownExtensionTest.php b/tests/functional/Extension/GithubFlavoredMarkdownExtensionTest.php
deleted file mode 100644
index c51087e..0000000
--- a/tests/functional/Extension/GithubFlavoredMarkdownExtensionTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * This file is part of the league/commonmark package.
- *
- * (c) Colin O'Dell <colinodell@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace League\CommonMark\Tests\Functional\Extension;
-
-use League\CommonMark\GithubFlavoredMarkdownConverter;
-use League\CommonMark\Tests\Functional\AbstractSpecTestCase;
-use League\CommonMark\Util\SpecReader;
-
-final class GithubFlavoredMarkdownExtensionTest extends AbstractSpecTestCase
-{
-    protected function setUp(): void
-    {
-        $this->converter = new GithubFlavoredMarkdownConverter();
-    }
-
-    public static function dataProvider(): \Generator
-    {
-        self::markTestSkipped('Dependency not packaged (yet).');
-
-        $tests = SpecReader::readFile(__DIR__ . '/../../../vendor/github/gfm/test/spec.txt');
-
-        foreach ($tests as $title => $data) {
-            // In the GFM spec, standard CommonMark tests are tagged 'example'
-            // and we don't want to test those (because we test those against the
-            // official CommonMark spec), but we DO want to test the GFM-specific ones
-            // which will be tagged something like 'example autolink'
-            if ($data['type'] !== 'example') {
-                yield $title => $data;
-            }
-        }
-    }
-}
diff --git a/tests/functional/Extension/SmartPunct/SmartPunctFunctionalTest.php b/tests/functional/Extension/SmartPunct/SmartPunctFunctionalTest.php
deleted file mode 100644
index cca9cb1..0000000
--- a/tests/functional/Extension/SmartPunct/SmartPunctFunctionalTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * This file is part of the league/commonmark package.
- *
- * (c) Colin O'Dell <colinodell@gmail.com>
- *
- * Original code based on the CommonMark JS reference parser (http://bitly.com/commonmark-js)
- *  - (c) John MacFarlane
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace League\CommonMark\Tests\Functional\Extension\SmartPunct;
-
-use League\CommonMark\Environment\Environment;
-use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
-use League\CommonMark\Extension\SmartPunct\SmartPunctExtension;
-use League\CommonMark\MarkdownConverter;
-use League\CommonMark\Tests\Functional\AbstractSpecTestCase;
-use League\CommonMark\Util\SpecReader;
-
-/**
- * Tests the parser against the CommonMark spec
- */
-final class SmartPunctFunctionalTest extends AbstractSpecTestCase
-{
-    protected function setUp(): void
-    {
-        $environment = new Environment();
-        $environment->addExtension(new CommonMarkCoreExtension());
-        $environment->addExtension(new SmartPunctExtension());
-
-        $this->converter = new MarkdownConverter($environment);
-    }
-
-    public static function dataProvider(): \Generator
-    {
-        self::markTestSkipped('Dependency not packaged (yet).');
-
-        yield from SpecReader::readFile(__DIR__ . '/../../../../vendor/commonmark/commonmark.js/test/smart_punct.txt');
-
-        yield 'Existing formatted quotes should be preserved (issue #1030)' => [
-            'input'   => 'In the middle to late ’90s, it was chaos. "We couldn\'t get out of that rut."',
-            'output'  => "<p>In the middle to late ’90s, it was chaos. “We couldn’t get out of that rut.”</p>\n",
-        ];
-
-        yield 'already-formatted quotes are kept as-is' => [
-            'input'   => '"Plain quotes", “normal quotes”, and ”backwards quotes“',
-            'output'  => "<p>“Plain quotes”, “normal quotes”, and ”backwards quotes“</p>\n",
-        ];
-    }
-}
diff --git a/tests/functional/SpecTest.php b/tests/functional/SpecTest.php
deleted file mode 100644
index a3a05bc..0000000
--- a/tests/functional/SpecTest.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/*
- * This file is part of the league/commonmark package.
- *
- * (c) Colin O'Dell <colinodell@gmail.com>
- *
- * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
- *  - (c) John MacFarlane
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace League\CommonMark\Tests\Functional;
-
-use League\CommonMark\Util\SpecReader;
-
-/**
- * Tests the parser against the CommonMark spec
- */
-final class SpecTest extends AbstractSpecTestCase
-{
-    public static function dataProvider(): \Generator
-    {
-        self::markTestSkipped('Dependency not packaged (yet).');
-
-        yield from SpecReader::readFile(__DIR__ . '/../../vendor/commonmark/commonmark.js/test/spec.txt');
-    }
-}
diff --git a/tests/unit/Extension/FrontMatter/Data/SymfonyYamlFrontMatterParserTest.php b/tests/unit/Extension/FrontMatter/Data/SymfonyYamlFrontMatterParserTest.php
index 2e9a4fd..73ea6a2 100644
--- a/tests/unit/Extension/FrontMatter/Data/SymfonyYamlFrontMatterParserTest.php
+++ b/tests/unit/Extension/FrontMatter/Data/SymfonyYamlFrontMatterParserTest.php
@@ -42,32 +42,6 @@ final class SymfonyYamlFrontMatterParserTest extends TestCase
         yield ["foo: bar\nbaz: 42", ['foo' => 'bar', 'baz' => 42]];
     }
 
-    /**
-     * @dataProvider provideInvalidYamlExamples
-     */
-    public function testParseWithInvalidYaml(string $input): void
-    {
-        $this->expectException(InvalidFrontMatterException::class);
-
-        $dataParser = new SymfonyYamlFrontMatterParser();
-
-        $dataParser->parse($input);
-    }
-
-    /**
-     * @return iterable<string>
-     */
-    public static function provideInvalidYamlExamples(): iterable
-    {
-        self::markTestSkipped('Dependency not packaged (yet).');
-
-        yield ["this:\n    is:invalid\n        yaml: data"];
-
-        if (! self::yamlLibrarySupportsObjectUnserialization()) {
-            yield ['foo: !php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}'];
-        }
-    }
-
     private static function yamlLibrarySupportsObjectUnserialization(): bool
     {
         $fullVersion = InstalledComposerPackages::getVersion('symfony/yaml');
