We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4df6d8f + eb45f72 commit 20749e4Copy full SHA for 20749e4
tests/FieldTest.php
@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+use NitroXy\PHPForms\Form;
4
5
+require_once 'MockForm.php';
6
7
+class FieldTest extends PHPUnit_Framework_TestCase {
8
+ public function testHiddenField(){
9
+ $mock = new MockLayout();
10
+ $form = Form::create('id', function($f){
11
+ $f->hidden_field('foo', '1');
12
+ }, ['layout' => $mock]);
13
+ $this->assertArrayHasKey('foo', $mock->field);
14
+ $this->assertEquals('hidden', $mock->field['foo']->attribute('type'));
15
+ $this->assertEquals('1', $mock->field['foo']->attribute('value'));
16
+ }
17
+}
0 commit comments