Skip to content

Commit

Permalink
SelectElementTest: test label change
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf authored and nilmerg committed Sep 2, 2022
1 parent 239b215 commit 989553a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/FormElement/SelectElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace ipl\Tests\Html\FormElement;

use ipl\Html\FormElement\SelectElement;
use ipl\Html\FormElement\SelectOption;
use ipl\Tests\Html\TestCase;

class SelectElementTest extends TestCase
Expand Down Expand Up @@ -256,4 +257,11 @@ public function testSetValueSelectsAnOption()
$select
);
}

public function testLabelCanBeChanged()
{
$option = new SelectOption('value', 'Original label');
$option->setLabel('New label');
$this->assertHtml('<option value="value">New label</option>', $option);
}
}

0 comments on commit 989553a

Please sign in to comment.