Skip to content

Commit

Permalink
Fix ListItemRendererTest
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanzweifel committed Nov 18, 2023
1 parent 40eb2bc commit 3771c08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Renderer/Block/ListItemRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Wnx\CommonmarkMarkdownRenderer\Tests\Renderer\Block;

use League\CommonMark\Extension\CommonMark\Node\Block\ListBlock;
use League\CommonMark\Extension\CommonMark\Node\Block\ListData;
use League\CommonMark\Extension\CommonMark\Node\Block\ListItem;
use PHPUnit\Framework\Attributes\Test;
Expand All @@ -23,13 +24,16 @@ protected function setUp(): void
#[Test]
public function it_renders_unordered_list(): void
{
$block = new ListItem(new ListData());
$data = new ListData();
$data->type = ListBlock::TYPE_BULLET;

$block = new ListItem($data);
$block->data->set('attributes/id', 'foo');
$fakeRenderer = new FakeChildNodeRenderer();
$fakeRenderer->pretendChildrenExist();

$result = $this->renderer->render($block, $fakeRenderer);

$this->assertEquals('::children::', $result);
$this->assertEquals(' ::children::', $result);
}
}

0 comments on commit 3771c08

Please sign in to comment.