We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
19 | public function test_updateTime_cli() { |
||
20 | // Set the NPC_SCRIPT variable as if this were a CLI program |
||
21 | define('NPC_SCRIPT', true); |
||
22 | |||
23 | $time = SmrSession::getTime(); |
||
24 | $microtime = SmrSession::getMicrotime(); |
||
25 | |||
26 | // Sleep 1 second to ensure that the integer time has incremented |
||
27 | sleep(1); |
||
28 | SmrSession::updateTime(); |
||
29 | |||
30 | // Make sure the times have changed |
||
31 | $this->assertNotEquals($time, SmrSession::getTime()); |
||
32 | $this->assertNotEquals($microtime, SmrSession::getMicroTime()); |
||
33 | } |
||
52 |