Skip to content

Commit

Permalink
Fix test file generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerkretzmar committed Jul 28, 2023
1 parent 95e8dc3 commit e06c5be
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/CommonMarkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ public function parse(string $text)

private function withContent(string|array $content)
{
return $this->setupSource(array_merge([
'_layouts' => [
'master.blade.php' => "<div>@yield('content')</div>",
return $this->setupSource(array_merge(
[
'_layouts' => [
'master.blade.php' => "<div>@yield('content')</div>",
],
],
is_string($content) ? ['test.md' => $this->withFrontMatter($content)] : $content,
]));
));
}

private function withFrontMatter(string $content): string
Expand Down

0 comments on commit e06c5be

Please sign in to comment.