-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR was merged into the 1.x branch. Discussion ---------- fix tests Commits ------- 89d97c7 fix tests
- Loading branch information
Showing
16 changed files
with
51 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use PHPUnit\Framework\TestCase; | ||
use Xabbuh\PandaClient\Api\Account; | ||
use Xabbuh\PandaClient\Api\HttpClient; | ||
use Xabbuh\PandaClient\Exception\ApiException; | ||
|
||
/** | ||
* @author Christian Flothmann <[email protected]> | ||
|
@@ -29,7 +30,7 @@ class HttpClientTest extends TestCase | |
|
||
private $guzzleClient; | ||
|
||
protected function setUp() | ||
protected function setUp(): void | ||
{ | ||
$this->httpClient = new HttpClient(); | ||
$this->httpClient->setAccount(new Account( | ||
|
@@ -68,12 +69,11 @@ public function testPut() | |
$this->httpClient->put('/foo'); | ||
} | ||
|
||
/** | ||
* @expectedException \Xabbuh\PandaClient\Exception\ApiException | ||
* @expectedExceptionCode 208 | ||
*/ | ||
public function testApiException() | ||
{ | ||
$this->expectException(ApiException::class); | ||
$this->expectExceptionCode(208); | ||
|
||
$error = new \stdClass(); | ||
$error->error = 500; | ||
$error->message = 'error message'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
use Psr\Http\Message\RequestInterface; | ||
use Xabbuh\PandaClient\Api\Account; | ||
use Xabbuh\PandaClient\Api\HttplugClient; | ||
use Xabbuh\PandaClient\Exception\ApiException; | ||
|
||
/** | ||
* @author Christian Flothmann <[email protected]> | ||
|
@@ -34,7 +35,7 @@ class HttplugClientTest extends TestCase | |
*/ | ||
private $mockClient; | ||
|
||
protected function setUp() | ||
protected function setUp(): void | ||
{ | ||
$this->mockClient = new Client(); | ||
$this->httpClient = new HttplugClient($this->mockClient); | ||
|
@@ -86,12 +87,11 @@ public function testPut() | |
$this->assertRequestMethod('PUT'); | ||
} | ||
|
||
/** | ||
* @expectedException \Xabbuh\PandaClient\Exception\ApiException | ||
* @expectedExceptionCode 208 | ||
*/ | ||
public function testApiException() | ||
{ | ||
$this->expectException(ApiException::class); | ||
$this->expectExceptionCode(208); | ||
|
||
$error = new \stdClass(); | ||
$error->error = 500; | ||
$error->message = 'error message'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters