From 4c0276feaf4997591d6caef1d149d5c950bed2e8 Mon Sep 17 00:00:00 2001 From: Michael Slowik Date: Fri, 29 Nov 2024 13:47:01 -0500 Subject: [PATCH] php84 + phpunit 11 --- .github/workflows/ci.yml | 6 +++--- tests/FirevelGeneratorManagerTest.php | 19 +++++++++---------- workbench/bootstrap/app.php | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 workbench/bootstrap/app.php diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15f7ede..1a9a6f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ jobs: - name: Installing dependencies uses: php-actions/composer@v6 with: - php_version: 8.1 + php_version: 8.4 - name: Running unit test uses: php-actions/phpunit@v3 with: - version: 9.6 - php_version: 8.1 \ No newline at end of file + version: 11.0 + php_version: 8.4 \ No newline at end of file diff --git a/tests/FirevelGeneratorManagerTest.php b/tests/FirevelGeneratorManagerTest.php index e269474..b970616 100644 --- a/tests/FirevelGeneratorManagerTest.php +++ b/tests/FirevelGeneratorManagerTest.php @@ -15,16 +15,15 @@ protected function setUp(): void $this->manager = new FirevelGeneratorManager(); - Config::shouldReceive('get') - ->with('generator.pipelines', []) - ->andReturn([ - 'api-resource' => [ - 'model' => \Firevel\Generator\Generators\ApiResource\ModelGenerator::class, - ], - 'app.yaml' => [ - 'yaml' => \Firevel\Generator\Generators\App\YamlGenerator::class, - ], - ]); + $config = [ + 'api-resource' => [ + 'model' => \Firevel\Generator\Generators\ApiResource\ModelGenerator::class, + ], + 'app.yaml' => [ + 'yaml' => \Firevel\Generator\Generators\App\YamlGenerator::class, + ], + ]; + Config::set('generator.pipelines', $config); } public function testExtendRegistersPipeline() diff --git a/workbench/bootstrap/app.php b/workbench/bootstrap/app.php new file mode 100644 index 0000000..6ead72a --- /dev/null +++ b/workbench/bootstrap/app.php @@ -0,0 +1,19 @@ +withRouting( + web: __DIR__.'/../routes/web.php', + commands: __DIR__.'/../routes/console.php', + ) + ->withMiddleware(function (Middleware $middleware) { + // + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create();