Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
pelmered committed May 10, 2024
1 parent 6719f41 commit cfaf341
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/FormInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,19 @@ public function testUnsupportedCurrency(): void
20,
);
}

public function testAllowLabelToBeOverrided(): void
{
$field = (new MoneyInput('price'))->label('Custom Label');


$component = ComponentContainer::make(FormTestComponent::make())
->statePath('data')
->components([
$field,
])->fill([$field->getName() => 45345]);

$field = $component->getComponent('data.price');
$this->assertEquals('Custom Label', $field->getLabel());
}
}

0 comments on commit cfaf341

Please sign in to comment.