Skip to content

Commit e16fba4

Browse files
author
Mohamed Khaled
committed
Update exception tests for new hierarchy structure
1 parent 2867cbc commit e16fba4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/unit/Exceptions/ExceptionsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
use WordPress\AiClient\Common\Contracts\AiClientExceptionInterface;
99
use WordPress\AiClient\Common\Exception\InvalidArgumentException;
1010
use WordPress\AiClient\Common\Exception\RuntimeException;
11+
use WordPress\AiClient\Providers\Http\Exception\ClientException;
1112
use WordPress\AiClient\Providers\Http\Exception\NetworkException;
12-
use WordPress\AiClient\Providers\Http\Exception\RequestException;
1313

1414
/**
1515
* Tests for AI Client exceptions.
@@ -19,7 +19,7 @@
1919
* @covers \WordPress\AiClient\Common\Exception\RuntimeException
2020
* @covers \WordPress\AiClient\Common\Contracts\AiClientExceptionInterface
2121
* @covers \WordPress\AiClient\Providers\Http\Exception\NetworkException
22-
* @covers \WordPress\AiClient\Providers\Http\Exception\RequestException
22+
* @covers \WordPress\AiClient\Providers\Http\Exception\ClientException
2323
*/
2424
class ExceptionsTest extends TestCase
2525
{
@@ -29,7 +29,7 @@ public function testAllExceptionsImplementAiClientExceptionInterface(): void
2929
new InvalidArgumentException('test'),
3030
new RuntimeException('test'),
3131
new NetworkException('test'),
32-
new RequestException('test'),
32+
new ClientException('test'),
3333
];
3434

3535
foreach ($exceptions as $exception) {
@@ -43,7 +43,7 @@ public function testCatchAllFunctionality(): void
4343
new InvalidArgumentException('invalid error'),
4444
new RuntimeException('runtime error'),
4545
new NetworkException('network error'),
46-
new RequestException('request error'),
46+
new ClientException('client error'),
4747
];
4848

4949
foreach ($exceptions as $exception) {

0 commit comments

Comments
 (0)