Release 2.38.0 (#5563)
This commit is contained in:
42
tests/Utils/ParsedownExtensionTest.php
Normal file
42
tests/Utils/ParsedownExtensionTest.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Utils;
|
||||
|
||||
use App\Utils\ParsedownExtension;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Utils\Parsedown
|
||||
* @covers \App\Utils\ParsedownExtension
|
||||
*/
|
||||
class ParsedownExtensionTest extends TestCase
|
||||
{
|
||||
public function testTableContainsCssClasses(): void
|
||||
{
|
||||
$sut = new ParsedownExtension();
|
||||
$html = $sut->parse('
|
||||
| Item | Price |
|
||||
|---|---|
|
||||
| Something | $ 472,78 |
|
||||
| Another entry | € 111 |
|
||||
| | |
|
||||
| Total | A lot |');
|
||||
self::assertStringStartsWith('<table class="table">', $html);
|
||||
}
|
||||
|
||||
public function testHeaderIsNotConverted(): void
|
||||
{
|
||||
$sut = new ParsedownExtension();
|
||||
$html = $sut->parse('
|
||||
# Foo
|
||||
');
|
||||
self::assertEquals('<p># Foo</p>', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user