Skip to content

Commit

Permalink
Add additional tests for proof
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 21, 2023
1 parent bd4e9cf commit 2eeb4c5
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,40 @@ public function test_can_compile_page_with_atx_headers()
MARKDOWN
);

$this->page->save();
$this->cleanUpWhenDone($this->page->getSourcePath());

$this->inspectHtml([
'Adventures in Wonderland',
'<h2>CHAPTER I. DOWN THE RABBIT-HOLE.<a id="chapter-i-down-the-rabbit-hole" href="#chapter-i-down-the-rabbit-hole" class="heading-permalink" aria-hidden="true" title="Permalink">#</a></h2>',
'<p>So she was considering in her own mind, as well as she could',
]);
}

public function test_can_compile_page_to_root_output_directory_with_atx_headers()
{
DocumentationPage::setOutputDirectory('');

$this->page = DocumentationPage::make('test-page', markdown: <<<'MARKDOWN'
# Adventures in Wonderland
## CHAPTER I. DOWN THE RABBIT-HOLE.
So she was considering in her own mind, as well as she could, for the hot day made her feel very sleepy and stupid.

MARKDOWN
);

$this->page->save();
$this->cleanUpWhenDone($this->page->getSourcePath());

$this->inspectHtml([
'Adventures in Wonderland',
'<h2>CHAPTER I. DOWN THE RABBIT-HOLE.<a id="chapter-i-down-the-rabbit-hole" href="#chapter-i-down-the-rabbit-hole" class="heading-permalink" aria-hidden="true" title="Permalink">#</a></h2>',
'<p>So she was considering in her own mind, as well as she could',
], '_site/test-page.html');
}

public function test_can_compile_page_with_setext_headers()
{
$this->page = DocumentationPage::make('test-page', markdown: <<<'MARKDOWN'
Expand Down

0 comments on commit 2eeb4c5

Please sign in to comment.