Skip to content

Commit

Permalink
Revert "Changes required after renaming app/ to src/ diractory at ton…
Browse files Browse the repository at this point in the history
…ik/theme (#8)"

This reverts commit 71d55c2.
  • Loading branch information
jedrzejchalubek committed Mar 13, 2018
1 parent 71d55c2 commit fe5f678
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Gin/Foundation/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ public function getPath($file)
*/
public function getRelativePath($file)
{
return $this->config['directories']['src'] . '/' . $file;
return $this->config['directories']['app'] . '/' . $file;
}
}
10 changes: 5 additions & 5 deletions tests/Gin/Foundation/AutoloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function test_relative_path_getter()
$config = $this->getConfig();
$autoloader = $this->getAutoloader($config);

$this->assertEquals($autoloader->getRelativePath('file/to/load.php'), 'src/file/to/load.php');
$this->assertEquals($autoloader->getRelativePath('file/to/load.php'), 'app/file/to/load.php');
}

/**
Expand All @@ -27,7 +27,7 @@ public function test_path_getter()
$config = $this->getConfig();
$autoloader = $this->getAutoloader($config);

$this->assertEquals($autoloader->getPath('file/to/load.php'), 'abs/path/src/file/to/load.php');
$this->assertEquals($autoloader->getPath('file/to/load.php'), 'abs/path/app/file/to/load.php');
}

/**
Expand All @@ -40,7 +40,7 @@ public function it_should_throw_if_no_file()

Functions::expect('locate_template')
->once()
->with('src/file/to/load.php', true, true)
->with('app/file/to/load.php', true, true)
->andReturn(false);

$this->expectException(FileNotFoundException::class);
Expand All @@ -61,7 +61,7 @@ public function it_should_return_true_on_successfully_autoloading()

Functions::expect('locate_template')
->once()
->with('src/file/to/load.php', true, true)
->with('app/file/to/load.php', true, true)
->andReturn(true);

$autoloader->register();
Expand All @@ -74,7 +74,7 @@ public function getConfig()
'directory' => 'abs/path',
],
'directories' => [
'src' => 'src'
'app' => 'app'
],
'autoload' => [
'file/to/load.php',
Expand Down

0 comments on commit fe5f678

Please sign in to comment.