Skip to content

Commit

Permalink
Upgrade breaking change from byjg\webrequest and byjg\jwt-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Sep 16, 2024
1 parent 25cbc26 commit 30190f2
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions docs/mock-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class MyTest extends ApiTestCase
{
public function testExpectOK()
{
$expectedResponse = \ByJG\Util\Psr7\Response::getInstance(200)
->withBody(new \ByJG\Util\Psr7\MemoryStream(json_encode([
$expectedResponse = \ByJG\WebRequest\Psr7\Response::getInstance(200)
->withBody(new \ByJG\WebRequest\Psr7\MemoryStream(json_encode([
"id" => 1,
"name" => "Spike",
"photoUrls" => []
Expand All @@ -39,7 +39,7 @@ e.g.
```php
<?php

$psr7Request = \ByJG\Util\Psr7\Request::getInstance(new Uri("/method_to_be_tested?param1=value1"))
$psr7Request = \ByJG\WebRequest\Psr7\Request::getInstance(new Uri("/method_to_be_tested?param1=value1"))
->withMethod("GET")
->withBody('{"foo":"bar"}');

Expand Down
8 changes: 4 additions & 4 deletions src/AbstractRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
use ByJG\ApiTools\Exception\PathNotFoundException;
use ByJG\ApiTools\Exception\RequiredArgumentNotFound;
use ByJG\ApiTools\Exception\StatusCodeNotMatchedException;
use ByJG\Util\Exception\MessageException;
use ByJG\Util\Exception\RequestException;
use ByJG\Util\Psr7\Request;
use ByJG\WebRequest\Exception\MessageException;
use ByJG\WebRequest\Exception\RequestException;
use ByJG\WebRequest\Psr7\Request;
use ByJG\Util\Uri;
use ByJG\Util\Psr7\MemoryStream;
use ByJG\WebRequest\Psr7\MemoryStream;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

Expand Down
8 changes: 4 additions & 4 deletions src/ApiRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace ByJG\ApiTools;

use ByJG\Util\Exception\MessageException;
use ByJG\Util\Exception\NetworkException;
use ByJG\Util\Exception\RequestException;
use ByJG\Util\HttpClient;
use ByJG\WebRequest\Exception\MessageException;
use ByJG\WebRequest\Exception\NetworkException;
use ByJG\WebRequest\Exception\RequestException;
use ByJG\WebRequest\HttpClient;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/ApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use ByJG\ApiTools\Exception\PathNotFoundException;
use ByJG\ApiTools\Exception\RequiredArgumentNotFound;
use ByJG\ApiTools\Exception\StatusCodeNotMatchedException;
use ByJG\Util\Psr7\Response;
use ByJG\WebRequest\Psr7\Response;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;

Expand Down
8 changes: 4 additions & 4 deletions src/MockRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

namespace ByJG\ApiTools;

use ByJG\Util\Exception\MessageException;
use ByJG\Util\Exception\RequestException;
use ByJG\Util\MockClient;
use ByJG\Util\Psr7\Response;
use ByJG\WebRequest\Exception\MessageException;
use ByJG\WebRequest\Exception\RequestException;
use ByJG\WebRequest\MockClient;
use ByJG\WebRequest\Psr7\Response;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

Expand Down
10 changes: 5 additions & 5 deletions tests/AbstractRequesterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
use ByJG\ApiTools\Exception\RequiredArgumentNotFound;
use ByJG\ApiTools\Exception\StatusCodeNotMatchedException;
use ByJG\ApiTools\MockRequester;
use ByJG\Util\Exception\MessageException;
use ByJG\Util\Exception\RequestException;
use ByJG\Util\Psr7\Request;
use ByJG\Util\Psr7\Response;
use ByJG\WebRequest\Exception\MessageException;
use ByJG\WebRequest\Exception\RequestException;
use ByJG\WebRequest\Psr7\Request;
use ByJG\WebRequest\Psr7\Response;
use ByJG\Util\Uri;
use ByJG\Util\Psr7\MemoryStream;
use ByJG\WebRequest\Psr7\MemoryStream;

abstract class AbstractRequesterTest extends ApiTestCase
{
Expand Down
14 changes: 7 additions & 7 deletions tests/TestingTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
use ByJG\ApiTools\Exception\RequiredArgumentNotFound;
use ByJG\ApiTools\Exception\StatusCodeNotMatchedException;
use ByJG\ApiTools\MockRequester;
use ByJG\Util\Exception\MessageException;
use ByJG\Util\Exception\RequestException;
use ByJG\Util\Helper\RequestMultiPart;
use ByJG\Util\MultiPartItem;
use ByJG\Util\Psr7\Request;
use ByJG\Util\Psr7\Response;
use ByJG\WebRequest\Exception\MessageException;
use ByJG\WebRequest\Exception\RequestException;
use ByJG\WebRequest\Helper\RequestMultiPart;
use ByJG\WebRequest\MultiPartItem;
use ByJG\WebRequest\Psr7\Request;
use ByJG\WebRequest\Psr7\Response;
use ByJG\Util\Uri;
use ByJG\Util\Psr7\MemoryStream;
use ByJG\WebRequest\Psr7\MemoryStream;

/**
* Class TestingTestCase
Expand Down

0 comments on commit 30190f2

Please sign in to comment.