Skip to content

Commit

Permalink
fix: resolve base path delimater
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyPradana committed May 28, 2024
1 parent 04b022b commit e262841
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/System/Integrate/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public function appPath()
*/
public function getApplicationCachePath()
{
return $this->basePath() . 'bootsrap' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR;
return rtrim($this->basePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'bootstrap' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Integrate/Bootstrap/ConfigProvidersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ConfigProvidersTest extends TestCase
*/
public function itCanLoadConfigFromDefault()
{
$app = new Application(__DIR__);
$app = new Application('/');

(new ConfigProviders())->bootstrap($app);
/** @var Config */
Expand Down Expand Up @@ -49,7 +49,7 @@ public function itCanLoadConfigFromFile()
*/
public function itCanLoadConfigFromCache()
{
$app = new Application(__DIR__ . DIRECTORY_SEPARATOR);
$app = new Application(__DIR__);

$app->setConfigPath(DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR);
(new ConfigProviders())->bootstrap($app);
Expand Down
4 changes: 2 additions & 2 deletions tests/Integrate/Commands/ConfigCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected function tearDown(): void
*/
public function itCanCreateConfigFile()
{
$app = new Application(dirname(__DIR__) . DIRECTORY_SEPARATOR);
$app = new Application(dirname(__DIR__));

$app->setConfigPath(DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR);

Expand All @@ -44,7 +44,7 @@ public function itCanCreateConfigFile()
*/
public function itCanRemoveConfigFile()
{
$app = new Application(dirname(__DIR__) . DIRECTORY_SEPARATOR);
$app = new Application(dirname(__DIR__));

$app->setConfigPath(DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR);

Expand Down

0 comments on commit e262841

Please sign in to comment.