diff --git a/src/Bootstrap/BaseLoadConfiguration.php b/src/Bootstrap/BaseLoadConfiguration.php index 80fe914e..7789ffe6 100644 --- a/src/Bootstrap/BaseLoadConfiguration.php +++ b/src/Bootstrap/BaseLoadConfiguration.php @@ -13,6 +13,7 @@ namespace LaravelZero\Framework\Bootstrap; +use ReflectionClass; use Illuminate\Contracts\Foundation\Application as ApplicationContract; use Illuminate\Foundation\Bootstrap\LoadConfiguration; use Symfony\Component\Finder\Finder; @@ -48,4 +49,25 @@ protected function getConfigurationFiles(ApplicationContract $app): array return $files; } + + /** + * Get the base configuration files. + * + * @return array + */ + protected function getBaseConfiguration() + { + $config = []; + + $reflector = new ReflectionClass($this); + $declaringClass = $reflector->getParentClass(); + $dir = dirname($declaringClass->getFilename()); + + foreach (Finder::create()->files()->name('*.php')->in($dir.'/../../../../config') as $file) { + $config[basename($file->getRelativePathname(), '.php')] = require ($file->getPath() . '/' . $file->getFilename()); + } + + return $config; + } } + diff --git a/tests/Components/HttpComponentTest.php b/tests/Components/HttpComponentTest.php index 12247c6b..305879a0 100644 --- a/tests/Components/HttpComponentTest.php +++ b/tests/Components/HttpComponentTest.php @@ -9,7 +9,7 @@ it('installs the required packages', function () { $composerMock = $this->createMock(ComposerContract::class); - $composerMock->expects($this->exactly(2)) + $composerMock->expects($this->exactly(1)) ->method('require'); $this->app->instance(ComposerContract::class, $composerMock); diff --git a/tests/Components/LogInstallTest.php b/tests/Components/LogInstallTest.php index 7de48936..f9d8f33e 100755 --- a/tests/Components/LogInstallTest.php +++ b/tests/Components/LogInstallTest.php @@ -15,7 +15,7 @@ $composerMock->expects($this->once()) ->method('require') - ->with('illuminate/log "^10.0"'); + ->with('illuminate/log "^11.5"'); $this->app->instance(ComposerContract::class, $composerMock); diff --git a/tests/Components/LogoProviderTest.php b/tests/Components/LogoProviderTest.php deleted file mode 100644 index 20362e2e..00000000 --- a/tests/Components/LogoProviderTest.php +++ /dev/null @@ -1,25 +0,0 @@ -toEqual($logo); -}); diff --git a/tests/Components/MenuComponentTest.php b/tests/Components/MenuComponentTest.php index c49d5e9a..5d5a35e6 100644 --- a/tests/Components/MenuComponentTest.php +++ b/tests/Components/MenuComponentTest.php @@ -10,7 +10,7 @@ $composerMock->expects($this->once()) ->method('require') - ->with('nunomaduro/laravel-console-menu "^3.4"'); + ->with('nunomaduro/laravel-console-menu "^3.5"'); $this->app->instance(ComposerContract::class, $composerMock); diff --git a/tests/Components/RedisInstallTest.php b/tests/Components/RedisInstallTest.php index 0de94e0e..73682e07 100755 --- a/tests/Components/RedisInstallTest.php +++ b/tests/Components/RedisInstallTest.php @@ -10,7 +10,7 @@ $composerMock->expects($this->once()) ->method('require') - ->with('illuminate/redis "^10.0"', false); + ->with('illuminate/redis "^11.5"', false); $this->app->instance(ComposerContract::class, $composerMock); diff --git a/tests/Components/UpdaterInstallTest.php b/tests/Components/UpdaterInstallTest.php index d58e9562..8fde27a8 100644 --- a/tests/Components/UpdaterInstallTest.php +++ b/tests/Components/UpdaterInstallTest.php @@ -8,7 +8,7 @@ it('installs the required packages', function () { $composerMock = $this->createMock(ComposerContract::class); - $composerMock->expects($this->once())->method('require')->with('laravel-zero/phar-updater "^1.3"'); + $composerMock->expects($this->once())->method('require')->with('laravel-zero/phar-updater "^1.4"'); $this->app->instance(ComposerContract::class, $composerMock);