diff --git a/composer.json b/composer.json index 961801c..8c6a04e 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,15 @@ ], "require": { - "php": "^7.1.3|^8.0", - "symfony/framework-bundle": "~3.4|^4.0|^5.0", - "symfony/dependency-injection": "~3.4|^4.0|^5.0", + "php": ">= 7.4", + "symfony/framework-bundle": "^4.0|^5.0|^6.0", + "symfony/dependency-injection": "^4.0|^5.0|^6.0", "michelf/php-markdown": "~1.4" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4.0 || ^5.0", - "symfony/templating": "~3.4|^4.0|^5.0" + "symfony/phpunit-bridge": "^4.4.0 || ^5.0 || ^6.0", + "symfony/templating": "^4.0|^5.0|^6.0", + "phpunit/phpunit": "^9.5" }, "suggest": { "symfony/twig-bundle": "to use the Twig markdown filter", @@ -38,6 +39,12 @@ } }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, + "autoload": { "psr-4": { "Knp\\Bundle\\MarkdownBundle\\": "" diff --git a/Tests/EscapingTest.php b/tests/EscapingTest.php similarity index 89% rename from Tests/EscapingTest.php rename to tests/EscapingTest.php index a2d396f..92f49b0 100644 --- a/Tests/EscapingTest.php +++ b/tests/EscapingTest.php @@ -2,13 +2,15 @@ namespace Knp\Bundle\MarkdownBundle\Tests; +use PHPUnit\Framework\TestCase; + use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser; -class EscapingTest extends \PHPUnit_Framework_TestCase +class EscapingTest extends TestCase { protected $parser; - public function setUp() + public function setUp(): void { $this->parser = new Parser(); } diff --git a/Tests/FeatureTest.php b/tests/FeatureTest.php similarity index 97% rename from Tests/FeatureTest.php rename to tests/FeatureTest.php index 7c0d099..a2291d7 100644 --- a/Tests/FeatureTest.php +++ b/tests/FeatureTest.php @@ -3,8 +3,9 @@ namespace Knp\Bundle\MarkdownBundle\Tests; use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser; +use PHPUnit\Framework\TestCase; -class FeatureTest extends \PHPUnit_Framework_TestCase +class FeatureTest extends TestCase { public function testParser() { @@ -754,10 +755,10 @@ EOF; // asserting a few things instead of comparing full final HTML // because a few minor things have changed over versions of Michelf // With assertContains(), tests will pass across all versions - $this->assertContains('

That\'s some text with a footnote.assertContains('

assertContains('
  • assertContains('

    And that\'s the footnote. assertStringContainsString('

    That\'s some text with a footnote.assertStringContainsString('

  • assertStringContainsString('

    And that\'s the footnote. setParameter('kernel.secret', '1234'); + + $c->loadFromExtension('framework', [ + 'secret' => 'F00', + 'router' => ['utf8' => true] + ]); } public function getCacheDir() diff --git a/Tests/Parser/ParserManagerTest.php b/tests/Parser/ParserManagerTest.php similarity index 92% rename from Tests/Parser/ParserManagerTest.php rename to tests/Parser/ParserManagerTest.php index 9285ea8..7357c1e 100644 --- a/Tests/Parser/ParserManagerTest.php +++ b/tests/Parser/ParserManagerTest.php @@ -5,8 +5,9 @@ namespace Knp\Bundle\MarkdownBundle\Tests\Parser; use Knp\Bundle\MarkdownBundle\Helper\MarkdownHelper; use Knp\Bundle\MarkdownBundle\Tests\fixtures\app\TestKernel; use Knp\Bundle\MarkdownBundle\Parser\ParserManager; +use PHPUnit\Framework\TestCase; -class ParserManagerTest extends \PHPUnit_Framework_TestCase +class ParserManagerTest extends TestCase { public function testIntegration() { diff --git a/Tests/Performance/.htaccess b/tests/Performance/.htaccess similarity index 100% rename from Tests/Performance/.htaccess rename to tests/Performance/.htaccess diff --git a/Tests/Performance/Base.php b/tests/Performance/Base.php similarity index 100% rename from Tests/Performance/Base.php rename to tests/Performance/Base.php diff --git a/Tests/Performance/Light.php b/tests/Performance/Light.php similarity index 100% rename from Tests/Performance/Light.php rename to tests/Performance/Light.php diff --git a/Tests/Performance/Max.php b/tests/Performance/Max.php similarity index 100% rename from Tests/Performance/Max.php rename to tests/Performance/Max.php diff --git a/Tests/Performance/Medium.php b/tests/Performance/Medium.php similarity index 100% rename from Tests/Performance/Medium.php rename to tests/Performance/Medium.php diff --git a/Tests/Performance/Min.php b/tests/Performance/Min.php similarity index 100% rename from Tests/Performance/Min.php rename to tests/Performance/Min.php diff --git a/Tests/Performance/index.php b/tests/Performance/index.php similarity index 100% rename from Tests/Performance/index.php rename to tests/Performance/index.php diff --git a/Tests/Performance/run b/tests/Performance/run similarity index 100% rename from Tests/Performance/run rename to tests/Performance/run diff --git a/Tests/PresetTest.php b/tests/PresetTest.php similarity index 94% rename from Tests/PresetTest.php rename to tests/PresetTest.php index cc7aaf0..224cb31 100644 --- a/Tests/PresetTest.php +++ b/tests/PresetTest.php @@ -3,8 +3,9 @@ namespace Knp\Bundle\MarkdownBundle\Tests; use Knp\Bundle\MarkdownBundle\Parser\Preset as Preset; +use PHPUnit\Framework\TestCase; -class PresetTest extends \PHPUnit_Framework_TestCase +class PresetTest extends TestCase { public function testMax() { diff --git a/Tests/fixtures/app/TestKernel.php b/tests/fixtures/app/TestKernel.php similarity index 100% rename from Tests/fixtures/app/TestKernel.php rename to tests/fixtures/app/TestKernel.php diff --git a/Tests/fixtures/big_text.html b/tests/fixtures/big_text.html similarity index 100% rename from Tests/fixtures/big_text.html rename to tests/fixtures/big_text.html diff --git a/Tests/fixtures/big_text.markdown b/tests/fixtures/big_text.markdown similarity index 100% rename from Tests/fixtures/big_text.markdown rename to tests/fixtures/big_text.markdown