Esempio n. 1
0
 public function testDataAttribute()
 {
     $text = new Text('email');
     $expected = '<input type="text" name="email" data-sample="test-value">';
     $result = $text->data('sample', 'test-value')->render();
     $this->assertEquals($expected, $result);
     $text = new Text('email');
     $expected = '<input type="text" name="email" data-custom="another-value">';
     $result = $text->data('custom', 'another-value')->render();
     $this->assertEquals($expected, $result);
 }