Skip to content

Commit b741c49

Browse files
committed
fix order of returned array values for mocked hrtime()
1 parent 5ed96d3 commit b741c49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ClockMock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static function hrtime($asNumber = false)
100100
return PHP_INT_SIZE === 8 ? (int) $number : (float) $number;
101101
}
102102

103-
return [(int) $ns, (int) self::$now];
103+
return [(int) self::$now, (int) $ns];
104104
}
105105

106106
public static function register($class)

Tests/ClockMockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testGmDate()
7272

7373
public function testHrTime()
7474
{
75-
$this->assertSame([125000000, 1234567890], hrtime());
75+
$this->assertSame([1234567890, 125000000], hrtime());
7676
}
7777

7878
public function testHrTimeAsNumber()

0 commit comments

Comments
 (0)