Skip to content

Commit

Permalink
Create MacroServiceProviderTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Feb 7, 2025
1 parent a81d133 commit b957037
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/Unit/Macros/MacroServiceProviderTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Apiato\Macros\MacroServiceProvider;

describe(class_basename(MacroServiceProvider::class), function (): void {
it('can search for decoded value', function (): void {
$hashedId = hashids()->encode(20);
$collection = collect([
['id' => 10],
['id' => 20],
['id' => 30],
]);

expect($collection->containsDecodedHash($hashedId))->toBeTrue();
});
})->covers(MacroServiceProvider::class);

0 comments on commit b957037

Please sign in to comment.