Skip to content

Commit c3110d9

Browse files
committed
Assert in non-asserting ('risky') tests
1 parent 4efb71d commit c3110d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/TwoFactorAuthTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
use RobThree\Auth\Providers\Time\ITimeProvider;
2828

2929

30-
class TwoFactorAuthTest extends PHPUnit_Framework_TestCase
30+
class TwoFactorAuthTest extends PHPUnit\Framework\TestCase
3131
{
3232
/**
3333
* @expectedException \RobThree\Auth\TwoFactorAuthException
@@ -102,6 +102,7 @@ public function testEnsureCorrectTimeDoesNotThrowForCorrectTime() {
102102

103103
$tfa = new TwoFactorAuth('Test', 6, 30, 'sha1', null, null, $tpr1);
104104
$tfa->ensureCorrectTime(array($tpr2)); // 128 - 123 = 5 => within default leniency
105+
$this->assertTrue(true);
105106
}
106107

107108
/**
@@ -119,6 +120,7 @@ public function testEnsureCorrectTimeThrowsOnIncorrectTime() {
119120
public function testEnsureDefaultTimeProviderReturnsCorrectTime() {
120121
$tfa = new TwoFactorAuth('Test', 6, 30, 'sha1');
121122
$tfa->ensureCorrectTime(array(new TestTimeProvider(time())), 1); // Use a leniency of 1, should the time change between both time() calls
123+
$this->assertTrue(true);
122124
}
123125

124126
public function testEnsureAllTimeProvidersReturnCorrectTime() {
@@ -130,6 +132,7 @@ public function testEnsureAllTimeProvidersReturnCorrectTime() {
130132
new RobThree\Auth\Providers\Time\HttpTimeProvider('https://github.com'),
131133
new RobThree\Auth\Providers\Time\HttpTimeProvider('https://yahoo.com'),
132134
));
135+
$this->assertTrue(true);
133136
}
134137

135138
public function testVerifyCodeWorksCorrectly() {
@@ -327,6 +330,7 @@ public function testMCryptRNGProvidersReturnExpectedNumberOfBytes() {
327330
$this->assertEquals($l, strlen($rng->getRandomBytes($l)));
328331
$this->assertEquals(true, $rng->isCryptographicallySecure());
329332
}
333+
$this->assertTrue(true);
330334
}
331335

332336
/**

0 commit comments

Comments
 (0)