Skip to content

Commit

Permalink
Cleanup formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jun 26, 2024
1 parent 4868497 commit a9e9881
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/framework/tests/Unit/IncludesFacadeUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ public function testHtmlReturnsDefaultValueWhenNotFound()

public function testHtmlWithAndWithoutExtension()
{

$this->mockFilesystem(function ($filesystem) {
$filename = 'foo.html';
$content = '<h1>foo bar</h1>';

$filesystem->shouldReceive('exists')->with(Hyde::path('resources/includes/'.$filename))->andReturn(true);
$filesystem->shouldReceive('get')->with(Hyde::path('resources/includes/'.$filename))->andReturn($content);
});
Expand All @@ -117,6 +117,7 @@ public function testMarkdownReturnsRenderedPartial()

$this->mockFilesystem(function ($filesystem) use ($filename) {
$content = '# foo bar';

$filesystem->shouldReceive('exists')->with(Hyde::path('resources/includes/'.$filename))->andReturn(true);
$filesystem->shouldReceive('get')->with(Hyde::path('resources/includes/'.$filename))->andReturn($content);
});
Expand Down Expand Up @@ -145,6 +146,7 @@ public function testMarkdownWithAndWithoutExtension()
$this->mockFilesystem(function ($filesystem) {
$content = '# foo bar';
$filename = 'foo.md';

$filesystem->shouldReceive('exists')->with(Hyde::path('resources/includes/'.$filename))->andReturn(true);
$filesystem->shouldReceive('get')->with(Hyde::path('resources/includes/'.$filename))->andReturn($content);
});
Expand All @@ -161,6 +163,7 @@ public function testBladeReturnsRenderedPartial()

$this->mockFilesystem(function ($filesystem) use ($expected, $filename) {
$content = '{{ "foo bar" }}';

$filesystem->shouldReceive('exists')->with(Hyde::path('resources/includes/'.$filename))->andReturn(true);
$filesystem->shouldReceive('get')->with(Hyde::path('resources/includes/'.$filename))->andReturn($content);

Expand All @@ -177,6 +180,7 @@ public function testBladeWithAndWithoutExtension()
$expected = 'foo bar';
$content = '{{ "foo bar" }}';
$filename = 'foo.blade.php';

$filesystem->shouldReceive('exists')->with(Hyde::path('resources/includes/'.$filename))->andReturn(true);
$filesystem->shouldReceive('get')->with(Hyde::path('resources/includes/'.$filename))->andReturn($content);

Expand All @@ -194,6 +198,7 @@ public function testBladeReturnsDefaultValueWhenNotFound()

$this->mockFilesystem(function ($filesystem) use ($default, $expected, $filename) {
$filesystem->shouldReceive('exists')->with(Hyde::path('resources/includes/'.$filename))->andReturn(false);

Blade::shouldReceive('render')->with($default)->andReturn($expected);
});

Expand Down

0 comments on commit a9e9881

Please sign in to comment.