-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reestruturacao dos diretorios de teste dos end-points + adicionado te…
…ste da classe de client http
- Loading branch information
1 parent
34abb69
commit c9dafb8
Showing
33 changed files
with
180 additions
and
91 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace Hotmart\Test\Http; | ||
|
||
use Hotmart\Http\Client; | ||
use Hotmart\Test\BaseTestCase; | ||
use Hotmart\Http\Endpoints\Transactions; | ||
use Hotmart\Http\Endpoints\Subscriptions; | ||
use Hotmart\Http\Endpoints\Authentication; | ||
|
||
class ClientTest extends BaseTestCase | ||
{ | ||
/** | ||
* @var \Hotmart\Http\Client | ||
*/ | ||
private $client; | ||
|
||
public function setUp() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->client = new Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC'); | ||
} | ||
|
||
public function test_get_subscriptions_instance() | ||
{ | ||
$this->assertTrue(method_exists($this->client, 'subscriptions')); | ||
$this->assertInstanceOf(Subscriptions::class, $this->client->subscriptions()); | ||
} | ||
|
||
public function test_get_transactions_instance() | ||
{ | ||
$this->assertTrue(method_exists($this->client, 'transactions')); | ||
$this->assertInstanceOf(Transactions::class, $this->client->transactions()); | ||
} | ||
|
||
public function test_get_authentication_instance() | ||
{ | ||
$this->assertTrue(method_exists($this->client, 'authentication')); | ||
$this->assertInstanceOf(Authentication::class, $this->client->authentication()); | ||
} | ||
|
||
public function test_get_credentials() | ||
{ | ||
$this->assertTrue(method_exists($this->client, 'clientId')); | ||
$this->assertTrue(method_exists($this->client, 'clientSecret')); | ||
$this->assertTrue(method_exists($this->client, 'clientBasic')); | ||
|
||
$this->assertEquals('CLIENT_ID', $this->client->clientId()); | ||
$this->assertEquals('CLIENT_SECRET', $this->client->clientSecret()); | ||
$this->assertEquals('CLIENT_BASIC', $this->client->clientBasic()); | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
tests/unit/Endpoints/AuthenticationTest.php → ...nit/Http/Endpoints/AuthenticationTest.php
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
tests/unit/Endpoints/ResponseHandlerTest.php → ...it/Http/Endpoints/ResponseHandlerTest.php
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
3 changes: 2 additions & 1 deletion
3
tests/unit/Endpoints/SubscriptionsTest.php → ...unit/Http/Endpoints/SubscriptionsTest.php
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
5 changes: 3 additions & 2 deletions
5
tests/unit/Endpoints/TransactionsTest.php → .../unit/Http/Endpoints/TransactionsTest.php
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