-
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
1 parent
5e98137
commit d664aca
Showing
24 changed files
with
124 additions
and
269 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
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 |
---|---|---|
|
@@ -13,6 +13,8 @@ | |
|
||
namespace Api\Licensing; | ||
|
||
use PHPUnit\Framework\Attributes\Depends; | ||
use PHPUnit\Framework\Attributes\Group; | ||
use PHPUnit\Framework\TestCase; | ||
use Serhiy\Pushover\Api\Licensing\License; | ||
use Serhiy\Pushover\Application; | ||
|
@@ -32,17 +34,13 @@ public function testCanBeConstructed(): License | |
return $license; | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testGetApplication(License $license): void | ||
{ | ||
$this->assertInstanceOf(Application::class, $license->getApplication()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testSetApplication(License $license): void | ||
{ | ||
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token | ||
|
@@ -51,17 +49,13 @@ public function testSetApplication(License $license): void | |
$this->assertInstanceOf(Application::class, $license->getApplication()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testGetRecipient(License $license): void | ||
{ | ||
$this->assertNull($license->getRecipient()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testSetRecipient(License $license): void | ||
{ | ||
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key | ||
|
@@ -73,17 +67,13 @@ public function testSetRecipient(License $license): void | |
$this->assertNull($license->getRecipient()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testGetEmail(License $license): void | ||
{ | ||
$this->assertNull($license->getEmail()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testSetEmail(License $license): void | ||
{ | ||
$email = '[email protected]'; | ||
|
@@ -95,17 +85,13 @@ public function testSetEmail(License $license): void | |
$this->assertNull($license->getEmail()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testGetOs(License $license): void | ||
{ | ||
$this->assertNull($license->getOs()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testSetOs(License $license): void | ||
{ | ||
$license->setOs(License::OS_ANDROID); | ||
|
@@ -118,9 +104,7 @@ public function testSetOs(License $license): void | |
$license->setOs('Wrong_OS'); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testCanBeAssigned(License $license): void | ||
{ | ||
$recipient = new Recipient('aaaa1111AAAA1111bbbb2222BBBB22'); // using dummy user key | ||
|
@@ -141,9 +125,7 @@ public function testCanBeAssigned(License $license): void | |
$this->assertFalse($license->canBeAssigned()); | ||
} | ||
|
||
/** | ||
* @depends testCanBeConstructed | ||
*/ | ||
#[Depends('testCanBeConstructed')] | ||
public function testGetAvailableOsTypes(License $license): void | ||
{ | ||
$licenseTypes = [ | ||
|
@@ -156,9 +138,7 @@ public function testGetAvailableOsTypes(License $license): void | |
$this->assertEquals($licenseTypes, $license->getAvailableOsTypes()); | ||
} | ||
|
||
/** | ||
* @group Integration | ||
*/ | ||
#[Group('Integration')] | ||
public function testCheckCredits(): void | ||
{ | ||
$application = new Application('cccc3333CCCC3333dddd4444DDDD44'); // using dummy token | ||
|
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.