Trying to take care of a timer test that randomly fails due to rounding I think.

This commit is contained in:
Lonnie Ezell 2017-12-03 23:15:40 -06:00
parent e4662f9cd0
commit b411a48088
No known key found for this signature in database
GPG Key ID: 8EB408F8D82F5002
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ class RedirectResponse extends Response
*
* @return $this
*/
public function with(string $key, string $message)
public function with(string $key, $message)
{
$session = $this->ensureSession();

View File

@ -90,7 +90,7 @@ class TimerTest extends \CIUnitTestCase
$timer->start('longjohn', strtotime('-11 minutes'));
// Use floor here to account for fractional differences in seconds.
$this->assertEquals(11 * 60, floor($timer->getElapsedTime('longjohn')));
$this->assertEquals(11 * 60, (int)$timer->getElapsedTime('longjohn'));
}
//--------------------------------------------------------------------
@ -100,7 +100,7 @@ class TimerTest extends \CIUnitTestCase
timer()->start('longjohn', strtotime('-11 minutes'));
// Use floor here to account for fractional differences in seconds.
$this->assertEquals(11 * 60, floor(timer()->getElapsedTime('longjohn')));
$this->assertEquals(11 * 60, (int)timer()->getElapsedTime('longjohn'));
}
//--------------------------------------------------------------------