Skip to content

Commit

Permalink
test: refactor by rector
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Feb 16, 2024
1 parent e4c3107 commit 76024a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/feature/BasicPagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use CodeIgniter\Test\DatabaseTestTrait;
use CodeIgniter\Test\FeatureTestTrait;
use Config\Services;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Psr7\Request;
use Tests\Support\ProjectTestCase;

/**
Expand Down Expand Up @@ -32,9 +34,9 @@ public function testCanViewHomeWhenConnectException()
->onlyMethods(['getRepos'])
->getMock();
$github->method('getRepos')->willThrowException(
new GuzzleHttp\Exception\ConnectException(
new ConnectException(
'cURL error 6: Could not resolve host: api.github.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.github.com/repos/bcit-ci/CodeIgniter',
new GuzzleHttp\Psr7\Request(
new Request(
'GET',
'https://api.github.com/repos/bcit-ci/CodeIgniter'
)
Expand Down

0 comments on commit 76024a7

Please sign in to comment.