mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Trying to take care of a timer test that randomly fails due to rounding I think.
This commit is contained in:
parent
e4662f9cd0
commit
b411a48088
@ -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();
|
||||
|
||||
|
@ -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'));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user