Skip to content

Commit 569c46e

Browse files
committed
Fix tests that were using assertInternalType to use the relevant assertIs* assertions
1 parent 4862f57 commit 569c46e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/StopwatchTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ public function testTimerStoppedValueRetention() {
1313
$stopwatch = new Stopwatch();
1414
$stopwatch->stop();
1515
$time_1 = $stopwatch->read();
16-
$this->assertInternalType('float', $time_1);
16+
$this->assertIsFloat($time_1);
1717
sleep(20);
1818
$time_2 = $stopwatch->read();
19-
$this->assertInternalType('float', $time_2);
19+
$this->assertIsFloat( $time_2);
2020
$this->assertSame($time_1, $time_2);
2121
}
2222

2323
public function testTimerContiniuous() {
2424
$stopwatch = new Stopwatch();
2525
$time_1 = $stopwatch->read();
26-
$this->assertInternalType('float', $time_1);
26+
$this->assertIsFloat($time_1);
2727
sleep(20);
2828
$time_2 = $stopwatch->read();
29-
$this->assertInternalType('float', $time_2);
29+
$this->assertIsFloat($time_2);
3030
$this->assertNotSame($time_1, $time_2);
3131
}
3232

@@ -36,7 +36,7 @@ public function testTimerMultipleStartCalls() {
3636
$time_1 = $stopwatch->read();
3737
sleep(20);
3838
$time_2 = $stopwatch->read();
39-
$this->assertInternalType('float', $time_2);
39+
$this->assertIsFloat($time_2);
4040
$this->assertNotSame($time_1, $time_2);
4141
}
4242
}

tests/TimerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function testStopWithoutInitializing() {
145145

146146
public function testValidSecondsCount() {
147147
Timer::start(__FUNCTION__);
148-
$this->assertInternalType('string', Timer::read(__FUNCTION__));
148+
$this->assertIsString(Timer::read(__FUNCTION__));
149149
}
150150

151151
public function testDenyAccessWithoutInitializing() {

0 commit comments

Comments
 (0)