mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Expand public API of Components
Ref: https://github.com/erusev/parsedown/issues/694
This commit is contained in:
27
tests/src/Components/Inlines/EmphasisTest.php
Normal file
27
tests/src/Components/Inlines/EmphasisTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Erusev\Parsedown\Tests\Components\Inlines;
|
||||
|
||||
use Erusev\Parsedown\Components\Inlines\Emphasis;
|
||||
use Erusev\Parsedown\Parsing\Excerpt;
|
||||
use Erusev\Parsedown\State;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class EmphasisTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
* @throws \PHPUnit\Framework\ExpectationFailedException
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function testEmphasisAPI()
|
||||
{
|
||||
$Emphasis = Emphasis::build(new Excerpt('*foo*', 0), new State);
|
||||
|
||||
$this->assertSame('foo', $Emphasis->text());
|
||||
|
||||
$Emphasis = Emphasis::build(new Excerpt('**foo**', 0), new State);
|
||||
|
||||
$this->assertSame('foo', $Emphasis->text());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user