Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Commit

Permalink
Update for form ^0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Jul 18, 2017
1 parent 7f99288 commit 2d5a8ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "MIT",
"require": {
"php": ">=5.4.0",
"adamwathan/form": "^0.8.11"
"adamwathan/form": "^0.9.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
Expand Down
11 changes: 11 additions & 0 deletions tests/FormGroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,15 @@ public function testCanRenderWithHelpBlock()
$result = $formGroup->render();
$this->assertEquals($expected, $result);
}

public function testCanIncludeHtmlInLabels()
{
$label = $this->builder->label('<span>Email</span>');
$text = $this->builder->text('email');
$formGroup = new FormGroup($label, $text);

$expected = '<div class="form-group"><label><span>Email</span></label><input type="text" name="email"></div>';
$result = $formGroup->render();
$this->assertEquals($expected, $result);
}
}

0 comments on commit 2d5a8ba

Please sign in to comment.