Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
fix nesting order of folders
Browse files Browse the repository at this point in the history
  • Loading branch information
svenluijten committed Apr 14, 2016
1 parent 15cf226 commit 571ddb8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Shared/FileInteractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function createFolders($folders)
return;
}

$path = $this->addToPath(array_pop($folders));
$path = $this->addToPath(array_shift($folders));

if ( ! is_dir($path)) {
mkdir($path);
Expand Down
10 changes: 10 additions & 0 deletions tests/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ public function it_creates_a_view_in_a_subfolder()
);
}

/** @test */
public function it_creates_a_view_multiple_levels_deep()
{
$this->view->create('foo.bar.baz');

$this->assertTrue(
file_exists(__DIR__.'/assets/foo/bar/baz.blade.php')
);
}

/** @test */
public function it_adds_a_file_to_existing_subfolder()
{
Expand Down

0 comments on commit 571ddb8

Please sign in to comment.