Fix: Move tests one up

This commit is contained in:
Andreas Möller
2016-09-15 08:31:27 +02:00
parent 8d2bab3c17
commit 7ff6fff06d
31 changed files with 2 additions and 2 deletions
@@ -0,0 +1,33 @@
<?php
namespace Ramsey\Uuid\Test\Provider\Time;
use Ramsey\Uuid\Provider\Time\SystemTimeProvider;
use Ramsey\Uuid\Test\TestCase;
use AspectMock\Test as AspectMock;
class SystemTimeProviderTest extends TestCase
{
public function testCurrentTimeReturnsTimestampArray()
{
$provider = new SystemTimeProvider();
$time = $provider->currentTime();
$this->assertArrayHasKey('sec', $time);
$this->assertArrayHasKey('usec', $time);
}
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testCurrentTimeUsesGettimeofday()
{
$this->skipIfHhvm();
$timestamp = ['sec' => 1458844556, 'usec' => 200997];
$func = AspectMock::func('Ramsey\Uuid\Provider\Time', 'gettimeofday', $timestamp);
$provider = new SystemTimeProvider();
$provider->currentTime();
$func->verifyInvokedOnce();
}
}