diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ed868c8..f1fe1a2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,10 +10,10 @@ jobs: test: runs-on: ${{ matrix.os }} strategy: - fail-fast: true + fail-fast: false matrix: os: [ubuntu-latest] - php: [8.3] + php: [8.3, 8.4, 8.5] laravel: [11.*] include: - laravel: 11.* diff --git a/composer.json b/composer.json index 1e68a04..13c42ee 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "~8.3.1|~8.4.1", + "php": "~8.3.1|~8.4.1|~8.5.0", "always-open/laravel-request-logger": "^3.0", "illuminate/contracts": "~10.0||~11.0||~12.0", "spatie/laravel-data": "~4.16", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3a9e4f1..d8fd46c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,5 +8,3 @@ parameters: tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true - ignoreErrors: - - '#Call to an undefined method Illuminate\\Http\\Client\\Response::getStatusCode\(\)#' \ No newline at end of file diff --git a/tests/BaseTest.php b/tests/BaseTest.php index a2940ac..08d7fee 100644 --- a/tests/BaseTest.php +++ b/tests/BaseTest.php @@ -17,9 +17,11 @@ protected function setUp(): void '--tag' => 'config', ]); - Http::preventStrayRequests(); - $this->refreshApplication(); + + // After refreshApplication(): it builds a new app, which drops a fake + // registered earlier and lets an unmatched request reach the real API. + Http::preventStrayRequests(); } protected function getFixtureJsonContent(string $name): string diff --git a/tests/Feature/BwtApiClientTest.php b/tests/Feature/BwtApiClientTest.php index c5b2163..8fe7117 100644 --- a/tests/Feature/BwtApiClientTest.php +++ b/tests/Feature/BwtApiClientTest.php @@ -11,7 +11,7 @@ class BwtApiClientTest extends BaseTest public function test_amazon_response() { Http::fake([ - 'https://bwt.com/api/123/results?limit=1&offset=0' => Http::response($this->getFixtureJsonContent('job_results.json'), 200), + 'https://bwt.com/api/123/results?limit=1000&offset=0' => Http::response($this->getFixtureJsonContent('job_results.json'), 200), ]); $client = new BwtApiClient;