Skip to content

Commit

Permalink
Improve unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Feb 6, 2023
1 parent 5a515a9 commit 6ce3513
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Response/BreachesResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace WBW\Library\HaveIBeenPwned\Tests\Response;

use WBW\Library\HaveIBeenPwned\Model\Breach;
use WBW\Library\HaveIBeenPwned\Response\AbstractResponse;
use WBW\Library\HaveIBeenPwned\Response\BreachesResponse;
use WBW\Library\HaveIBeenPwned\Tests\AbstractTestCase;

Expand Down Expand Up @@ -50,6 +51,8 @@ public function test__construct(): void {

$obj = new BreachesResponse();

$this->assertInstanceOf(AbstractResponse::class, $obj);

$this->assertCount(0, $obj->getBreaches());
}
}
3 changes: 3 additions & 0 deletions tests/Response/DataClassesResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace WBW\Library\HaveIBeenPwned\Tests\Response;

use WBW\Library\HaveIBeenPwned\Model\DataClass;
use WBW\Library\HaveIBeenPwned\Response\AbstractResponse;
use WBW\Library\HaveIBeenPwned\Response\DataClassesResponse;
use WBW\Library\HaveIBeenPwned\Tests\AbstractTestCase;

Expand Down Expand Up @@ -50,6 +51,8 @@ public function test__construct(): void {

$obj = new DataClassesResponse();

$this->assertInstanceOf(AbstractResponse::class, $obj);

$this->assertCount(0, $obj->getDataClasses());
}
}
3 changes: 3 additions & 0 deletions tests/Response/PastesResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace WBW\Library\HaveIBeenPwned\Tests\Response;

use WBW\Library\HaveIBeenPwned\Model\Paste;
use WBW\Library\HaveIBeenPwned\Response\AbstractResponse;
use WBW\Library\HaveIBeenPwned\Response\PastesResponse;
use WBW\Library\HaveIBeenPwned\Tests\AbstractTestCase;

Expand Down Expand Up @@ -50,6 +51,8 @@ public function test__construct(): void {

$obj = new PastesResponse();

$this->assertInstanceOf(AbstractResponse::class, $obj);

$this->assertCount(0, $obj->getPastes());
}
}
3 changes: 3 additions & 0 deletions tests/Response/RangesResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace WBW\Library\HaveIBeenPwned\Tests\Response;

use WBW\Library\HaveIBeenPwned\Model\Range;
use WBW\Library\HaveIBeenPwned\Response\AbstractResponse;
use WBW\Library\HaveIBeenPwned\Response\RangesResponse;
use WBW\Library\HaveIBeenPwned\Tests\AbstractTestCase;

Expand Down Expand Up @@ -50,6 +51,8 @@ public function test__construct(): void {

$obj = new RangesResponse();

$this->assertInstanceOf(AbstractResponse::class, $obj);

$this->assertCount(0, $obj->getRanges());
}
}

0 comments on commit 6ce3513

Please sign in to comment.