Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb7693cf4b | ||
|
|
9c4fea1f04 | ||
|
|
c93974c835 | ||
|
|
501aea5374 | ||
|
|
72d6ea9713 | ||
|
|
5edfe5d8bb | ||
|
|
42a626c23e | ||
|
|
0918dac79f | ||
|
|
28a91965be |
No files matched your search
@@ -1,7 +1,6 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- hhvm
|
||||
|
||||
+6
-12
@@ -12,11 +12,11 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"illuminate/http": "~5.1",
|
||||
"illuminate/routing": "~5.1",
|
||||
"illuminate/session": "~5.1",
|
||||
"illuminate/support": "~5.1"
|
||||
"php": ">=5.5.9",
|
||||
"illuminate/http": "5.1.*",
|
||||
"illuminate/routing": "5.1.*",
|
||||
"illuminate/session": "5.1.*",
|
||||
"illuminate/support": "5.1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~0.9",
|
||||
@@ -29,11 +29,5 @@
|
||||
"files": [
|
||||
"src/helpers.php"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
}
|
||||
+1088
-989
File diff suppressed because it is too large.
Load diff
@@ -183,6 +183,18 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
|
||||
public function testFormTel()
|
||||
{
|
||||
$form1 = $this->formBuilder->tel('foo');
|
||||
$form2 = $this->formBuilder->tel('foo', 'foobar');
|
||||
$form3 = $this->formBuilder->tel('foo', null, ['class' => 'span2']);
|
||||
|
||||
$this->assertEquals('<input name="foo" type="tel">', $form1);
|
||||
$this->assertEquals('<input name="foo" type="tel" value="foobar">', $form2);
|
||||
$this->assertEquals('<input class="span2" name="foo" type="tel">', $form3);
|
||||
}
|
||||
|
||||
|
||||
public function testFormNumber()
|
||||
{
|
||||
$form1 = $this->formBuilder->number('foo');
|
||||
@@ -207,6 +219,17 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals('<input class="span2" name="foo" type="date">', $form4);
|
||||
}
|
||||
|
||||
public function testFormTime()
|
||||
{
|
||||
$form1 = $this->formBuilder->time('foo');
|
||||
$form2 = $this->formBuilder->time('foo', \Carbon\Carbon::now()->format('H:i'));
|
||||
$form3 = $this->formBuilder->time('foo', null, ['class' => 'span2']);
|
||||
|
||||
$this->assertEquals('<input name="foo" type="time">', $form1);
|
||||
$this->assertEquals('<input name="foo" type="time" value="' . \Carbon\Carbon::now()->format('H:i') . '">', $form2);
|
||||
$this->assertEquals('<input class="span2" name="foo" type="time">', $form3);
|
||||
}
|
||||
|
||||
|
||||
public function testFormFile()
|
||||
{
|
||||
@@ -291,6 +314,24 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals($select, '<select name="size[key]"><option value="L">Large</option><option value="M">Medium</option><option value="S" selected="selected">Small</option></select>');
|
||||
}
|
||||
|
||||
public function testFormWithOptionalPlaceholder()
|
||||
{
|
||||
$select = $this->formBuilder->select(
|
||||
'size',
|
||||
['L' => 'Large', 'S' => 'Small'],
|
||||
null,
|
||||
['placeholder' => 'Select One...']
|
||||
);
|
||||
$this->assertEquals($select, '<select name="size"><option selected="selected">Select One...</option><option value="L">Large</option><option value="S">Small</option></select>');
|
||||
|
||||
$select = $this->formBuilder->select(
|
||||
'size',
|
||||
['L' => 'Large', 'S' => 'Small'],
|
||||
'L',
|
||||
['placeholder' => 'Select One...']
|
||||
);
|
||||
$this->assertEquals($select, '<select name="size"><option>Select One...</option><option value="L" selected="selected">Large</option><option value="S">Small</option></select>');
|
||||
}
|
||||
|
||||
public function testFormSelectYear()
|
||||
{
|
||||
@@ -474,4 +515,4 @@ class FormBuilderModelStub {
|
||||
{
|
||||
return isset($this->data[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user