-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
252 additions
and
186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use Serhiy\Pushover\Api\Licensing\License; | ||
use PHPUnit\Framework\TestCase; | ||
use Serhiy\Pushover\Application; | ||
use Serhiy\Pushover\Client\Response\LicenseResponse; | ||
use Serhiy\Pushover\Exception\InvalidArgumentException; | ||
use Serhiy\Pushover\Recipient; | ||
|
||
|
@@ -24,7 +25,7 @@ class LicenseTest extends TestCase | |
*/ | ||
public function testCanBeCreated(): License | ||
{ | ||
$application = new Application("zaGDORePK8gMaC0QOYAMyEEuzJnyUi"); // using dummy token | ||
$application = new Application("cccc3333CCCC3333dddd4444DDDD44"); // using dummy token | ||
$license = new License($application); | ||
|
||
$this->assertInstanceOf(License::class, $license); | ||
|
@@ -47,7 +48,7 @@ public function testGetApplication(License $license) | |
*/ | ||
public function testSetApplication(License $license) | ||
{ | ||
$application = new Application("zaGDORePK8gMaC0QOYAMyEEuzJnyUi"); // using dummy token | ||
$application = new Application("cccc3333CCCC3333dddd4444DDDD44"); // using dummy token | ||
$license->setApplication($application); | ||
|
||
$this->assertInstanceOf(Application::class, $license->getApplication()); | ||
|
@@ -68,7 +69,7 @@ public function testGetRecipient(License $license) | |
*/ | ||
public function testSetRecipient(License $license) | ||
{ | ||
$recipient = new Recipient("uQiRzpo4DXghDmr9QzzfQu27cmVRsG"); // using dummy user key | ||
$recipient = new Recipient("aaaa1111AAAA1111bbbb2222BBBB22"); // using dummy user key | ||
|
||
$license->setRecipient($recipient); | ||
$this->assertInstanceOf(Recipient::class, $license->getRecipient()); | ||
|
@@ -132,7 +133,7 @@ public function testSetOs(License $license) | |
*/ | ||
public function testCanBeAssigned(License $license) | ||
{ | ||
$recipient = new Recipient("uQiRzpo4DXghDmr9QzzfQu27cmVRsG"); // using dummy user key | ||
$recipient = new Recipient("aaaa1111AAAA1111bbbb2222BBBB22"); // using dummy user key | ||
$email = '[email protected]'; | ||
|
||
$this->assertFalse($license->canBeAssigned()); | ||
|
@@ -165,4 +166,17 @@ public function testGetAvailableOsTypes(License $license) | |
|
||
$this->assertEquals($licenseTypes, $license->getAvailableOsTypes()); | ||
} | ||
|
||
/** | ||
* @group Integration | ||
*/ | ||
public function testCheckCredits() | ||
{ | ||
$application = new Application("cccc3333CCCC3333dddd4444DDDD44"); // using dummy token | ||
$license = new License($application); | ||
|
||
$response = $license->checkCredits(); | ||
|
||
$this->assertInstanceOf(LicenseResponse::class, $response); | ||
} | ||
} |
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
Oops, something went wrong.