Skip to content

Commit

Permalink
Test enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Mar 19, 2020
1 parent 4ae85ce commit 8bf5c55
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php
dist: trusty
php:
- '7.1.18'
- '7.1.33'
- '7.2'
- '7.3'
- nightly
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"divineomega/psr-18-guzzle-adapter": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"phpunit/phpunit": "^7.0||^8.0",
"fzaninotto/faker": "^1.7",
"vimeo/psalm": "^1",
"kriswallsmith/buzz": "^1.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/CustomInjectionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public function testConnection()

$passwordExposedChecker = new PasswordExposedChecker(null, $cache);

$this->assertEquals(true, $passwordExposedChecker->isExposed('hunter2'));
$this->assertEquals(false, $passwordExposedChecker->isExposed($this->getPasswordHashUnlikelyToBeExposed()));
$this->assertTrue($passwordExposedChecker->isExposed('hunter2'));
$this->assertFalse($passwordExposedChecker->isExposed($this->getPasswordHashUnlikelyToBeExposed()));
}

public function testCustomLibrary()
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/PasswordExposedByHashTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PasswordExposedByHashTest extends TestCase
/** @var PasswordExposedChecker */
private $checker;

protected function setUp()
protected function setUp(): void
{
$cache = new CacheItemPool();
$cache->changeConfig(
Expand Down Expand Up @@ -51,8 +51,8 @@ public function testExposedPasswords($hash)
{
$this->assertEquals($this->checker->passwordExposedByHash($hash), PasswordStatus::EXPOSED);
$this->assertEquals(password_exposed_by_hash($hash), PasswordStatus::EXPOSED);
$this->assertEquals($this->checker->isExposedByHash($hash), true);
$this->assertEquals(password_is_exposed_by_hash($hash), true);
$this->assertTrue($this->checker->isExposedByHash($hash));
$this->assertTrue(password_is_exposed_by_hash($hash));
}

public function testNotExposedPasswords()
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/PasswordExposedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PasswordExposedTest extends TestCase
/** @var PasswordExposedChecker */
private $checker;

protected function setUp()
protected function setUp(): void
{
$cache = new CacheItemPool();
$cache->changeConfig(
Expand Down Expand Up @@ -46,8 +46,8 @@ public function testExposedPasswords($password)
{
$this->assertEquals($this->checker->passwordExposed($password), PasswordStatus::EXPOSED);
$this->assertEquals(password_exposed($password), PasswordStatus::EXPOSED);
$this->assertEquals($this->checker->isExposed($password), true);
$this->assertEquals(password_is_exposed($password), true);
$this->assertTrue($this->checker->isExposed($password));
$this->assertTrue(password_is_exposed($password));
}

public function testNotExposedPasswords()
Expand Down

0 comments on commit 8bf5c55

Please sign in to comment.