mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-05-06 07:33:14 +02:00
update tests to use phpunit 9.5
This commit is contained in:
parent
843b3d0c9b
commit
da45d3c76d
|
@ -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\\": ""
|
||||
|
|
|
@ -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();
|
||||
}
|
|
@ -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('<p>That\'s some text with a footnote.<sup id="fnref:1"><a href="#fn:1"', $actualHtml);
|
||||
$this->assertContains('<div class="footnotes"', $actualHtml);
|
||||
$this->assertContains('<li id="fn:1"', $actualHtml);
|
||||
$this->assertContains('<p>And that\'s the footnote. <a href="#fnref:1" class="footnote-backref"', $actualHtml);
|
||||
$this->assertStringContainsString('<p>That\'s some text with a footnote.<sup id="fnref:1"><a href="#fn:1"', $actualHtml);
|
||||
$this->assertStringContainsString('<div class="footnotes"', $actualHtml);
|
||||
$this->assertStringContainsString('<li id="fn:1"', $actualHtml);
|
||||
$this->assertStringContainsString('<p>And that\'s the footnote. <a href="#fnref:1" class="footnote-backref"', $actualHtml);
|
||||
}
|
||||
|
||||
/**
|
|
@ -4,14 +4,16 @@ namespace Knp\Bundle\MarkdownBundle\Tests;
|
|||
|
||||
use Knp\Bundle\MarkdownBundle\KnpMarkdownBundle;
|
||||
use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
use Symfony\Component\Routing\RouteCollectionBuilder;
|
||||
|
||||
class IntegrationTest extends \PHPUnit_Framework_TestCase
|
||||
class IntegrationTest extends TestCase
|
||||
{
|
||||
public function testServicesAvailable()
|
||||
{
|
||||
|
@ -37,13 +39,17 @@ class IntegrationKernel extends Kernel
|
|||
];
|
||||
}
|
||||
|
||||
protected function configureRoutes(RouteCollectionBuilder $routes)
|
||||
protected function configureRoutes(RoutingConfigurator $routes)
|
||||
{
|
||||
}
|
||||
|
||||
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
|
||||
{
|
||||
$c->setParameter('kernel.secret', '1234');
|
||||
|
||||
$c->loadFromExtension('framework', [
|
||||
'secret' => 'F00',
|
||||
'router' => ['utf8' => true]
|
||||
]);
|
||||
}
|
||||
|
||||
public function getCacheDir()
|
|
@ -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()
|
||||
{
|
|
@ -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()
|
||||
{
|
Loading…
Reference in a new issue