We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | class EpochTest extends \PHPUnit\Framework\TestCase { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Test that the `update` function works properly when NPC_SCRIPT is set. |
||
| 14 | * We run in a separate process so that the constant doesn't propagate into |
||
| 15 | * other tests. |
||
| 16 | * @runInSeparateProcess |
||
| 17 | */ |
||
| 18 | public function test_update_cli() { |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * update should throw if called without NPC_SCRIPT defined. |
||
| 36 | */ |
||
| 37 | public function test_update() { |
||
| 38 | $this->expectException(\Exception::class); |
||
| 39 | $this->expectExceptionMessage('Only call this function from CLI programs'); |
||
| 40 | Epoch::update(); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * We can't check the time/microtime values, but we can ensure that |
||
| 45 | * the rounded values are identical. |
||
| 46 | */ |
||
| 47 | public function test_time_microtime_equality() { |
||
| 49 | } |
||
| 50 | |||
| 52 |