Skip to content

Commit

Permalink
Add coverage for the id method
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 2, 2024
1 parent 8535f44 commit d920608
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Form/FieldTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ public function testModel()

/**
* @covers ::name
* @covers ::id
*/
public function testName()
{
Expand All @@ -774,17 +775,20 @@ public function testName()
);

$this->assertSame('the-name', $field->name());
$this->assertSame('the-name', $field->id());
}

/**
* @covers ::name
* @covers ::id
*/
public function testNameWhenNotSet()
{
$field = $this->field();

// the field type should be used as name
$this->assertSame('test', $field->name());
$this->assertSame('test', $field->id());
}

/**
Expand Down

0 comments on commit d920608

Please sign in to comment.