diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php
index 0d2dabb..aabe67e 100644
--- a/tests/FormBuilderTest.php
+++ b/tests/FormBuilderTest.php
@@ -121,6 +121,26 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('', $form6);
}
+ public function testMacroField()
+ {
+ $this->formBuilder->macro('data_field', function ($name, $value, $data) {
+ $dataAttributes = [];
+ foreach ($data as $key => $attribute) {
+ $dataAttributes[] = $key.'="'.$attribute.'"';
+ }
+ return '';
+ });
+
+ $form = $this->formBuilder->data_field('foo', null, [
+ 'role' => 'set_name',
+ 'data-titlecase' => 'ucfirst',
+ 'data-inputmask-type' => 'Regex',
+ 'data-inputmask-regex' => '[A-Za-z0-9\\s-\\(\\)&]{2,70}',
+ ]);
+
+ $this->assertEquals('', $form);
+ }
+
public function testPasswordsNotFilled()
{
$this->formBuilder->setSessionStore($session = m::mock('Illuminate\Contracts\Session\Session'));