mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
355 B
PHTML
18 lines
355 B
PHTML
5 years ago
|
<?php
|
||
|
|
||
|
namespace Tests\Unit;
|
||
|
|
||
|
use Tests\TestCase;
|
||
|
use App\Services\SnowflakeService;
|
||
|
|
||
|
class Snowflake extends TestCase
|
||
|
{
|
||
|
/** @test */
|
||
|
public function snowflakeTest()
|
||
|
{
|
||
|
$expected = 266077397319815168;
|
||
|
$actual = SnowflakeService::byDate(now()->parse('2021-02-13T05:36:35+00:00'));
|
||
|
$this->assertEquals($expected, $actual);
|
||
|
}
|
||
|
}
|