Skip to content

Commit

Permalink
Remove unused getId() method and test. (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 12, 2024
1 parent b3ae8b4 commit a194ad9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
10 changes: 0 additions & 10 deletions src/Attribute/HasId.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ trait HasId
{
protected string|null $id = '';

/**
* Get the ID of the widget.
*
* @return string|null The ID of the widget.
*/
public function getId(): string|null
{
return $this->id;
}

/**
* Set the ID of the widget.
*
Expand Down
12 changes: 0 additions & 12 deletions tests/Attribute/HasIdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,4 @@ public function testGenerateIdWithId(): void

$this->assertSame('foo', $instance->generateId());
}

public function testGetId(): void
{
$instance = new class () {
use HasId;

protected array $attributes = [];
};

$this->assertSame('', $instance->id('')->getId());
$this->assertSame('foo', $instance->id('foo')->getId());
}
}
5 changes: 0 additions & 5 deletions tests/Input/Email/RenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ public function testGenerateId(): void
$this->assertStringContainsString('id="email-', Email::widget()->render());
}

public function testGetId(): void
{
$this->assertSame('email-65a15e0439570', Email::widget()->id('email-65a15e0439570')->getId());
}

public function testGetValue(): void
{
$this->assertSame('value', Email::widget()->value('value')->getValue());
Expand Down

0 comments on commit a194ad9

Please sign in to comment.