Skip to content

Commit

Permalink
refactor: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Dec 14, 2024
1 parent c330def commit 1500ce6
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions tests/Unit/Traits/HashIdTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,15 @@
use Apiato\Core\Exceptions\IncorrectIdException;
use Apiato\Core\Tests\Unit\UnitTestCase;
use Apiato\Core\Traits\HashIdTrait;
use Mockery\LegacyMockInterface;
use Mockery\MockInterface;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;

#[CoversClass(HashIdTrait::class)]
class HashIdTraitTest extends UnitTestCase
{
private $trait;
private $mockTrait;

public static function resourceKeyProvider(): array
{
return [
'null' => [
'resourceKey' => null,
'expected' => 'User',
],
];
}
private LegacyMockInterface|MockInterface $mockTrait;

public function setUp(): void
{
Expand Down Expand Up @@ -209,20 +200,4 @@ public function testDecodeHashedIdsBeforeValidationReturnsDataWhenKeyDoesNotExis

$this->assertEquals($requestData, $result);
}

#[DataProvider('resourceKeyProvider')]
public function testCanOverrideResourceKey($resourceKey, $expected): void
{
$this->markTestSkipped();
$result = $this->trait
->withMeta($this->metadata)
->transform(
data: $this->user,
transformerName: $this->transformer,
meta: $this->customMetadata,
resourceKey: $resourceKey,
);

$this->assertEquals($expected, $result['data']['object']);
}
}

0 comments on commit 1500ce6

Please sign in to comment.