Skip to content

Commit

Permalink
Update SupportTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Dec 17, 2024
1 parent 488b18f commit 5932a5e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Feature/Support/SupportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ public function test_tid_is()
$this->assertFalse(TID::is('kjzfcijpj2z2a'));
}

public function test_tid_parse()
{
$tid = TID::fromStr('3jt6walwmos2y');

$this->assertSame(1681321002683032, $tid->timestamp());
$this->assertSame(30, $tid->clockId());
$this->assertSame('3jt6walwmos2y', TID::fromTime($tid->timestamp(), $tid->clockId())->toString());
}

public function test_cid_encode()
{
$cid = CID::encode('test');
Expand Down

0 comments on commit 5932a5e

Please sign in to comment.