Skip to content

Commit a8d614d

Browse files
author
Chris Smith
committed
Fixed breaking tests post GuzzleHttp\Guzzle update
1 parent f51af3e commit a8d614d

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

tests/Unit/Clients/Concerns/HandlesExceptions/HandleExceptionTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Mockery;
88
use RuntimeException;
99
use Tests\Unit\Clients\Concerns\HandlesExceptions\Stub;
10+
use Tests\Unit\Clients\Concerns\HandlesExceptions\StubException;
1011
use Tests\Unit\TestCase;
1112
use Xedi\SendGrid\Contracts\Exception as ExceptionContract;
1213
use Xedi\SendGrid\Exceptions\Clients\UnknownException;
@@ -43,16 +44,11 @@ public function handlesClientException()
4344
*/
4445
public function handlesUnknownException()
4546
{
46-
$mock_exception = Mockery::mock(
47-
GuzzleException::class,
48-
RuntimeException::class,
49-
['its not important']
50-
)
51-
->makePartial();
47+
$stub_exception = new StubException('it doesn\'t matter');
5248

5349
$this->assertInstanceOf(
5450
UnknownException::class,
55-
(new Stub())->handleException($mock_exception)
51+
(new Stub())->handleException($stub_exception)
5652
);
5753
}
5854
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Tests\Unit\Clients\Concerns\HandlesExceptions;
4+
5+
use GuzzleHttp\Exception\GuzzleException;
6+
use RuntimeException;
7+
8+
class StubException extends RuntimeException implements GuzzleException
9+
{
10+
}

0 commit comments

Comments
 (0)