コード例 #1
0
ファイル: Input.test.php プロジェクト: raftalks/former
 public function testTextWithoutFormInstance()
 {
     Former::close();
     $input = Former::text('foo')->data('foo')->class('bar')->__toString();
     $matcher = '<label for="foo">Foo</label><input data="foo" class="bar" type="text" name="foo" id="foo">';
     $this->assertEquals($matcher, $input);
     Former::horizontal_open();
 }
コード例 #2
0
ファイル: Validation.test.php プロジェクト: iyoworks/former
 public function testCanAddRequiredTextToPlainFields()
 {
     Former::close();
     Former::withRules(array('foo' => 'required'));
     $input = Former::text('foo')->__toString();
     $matcher = '<label for="foo">Foo<sup>*</sup></label><input required="true" type="text" name="foo" id="foo">';
     $this->assertEquals($matcher, $input);
 }
コード例 #3
0
ファイル: _ide_helper.php プロジェクト: avin/library
 /**
  * Closes a form
  *
  * @return string A form closing tag
  * @static 
  */
 public static function close()
 {
     return \Former\Former::close();
 }
コード例 #4
0
ファイル: Form.test.php プロジェクト: raftalks/former
 public function testClose()
 {
     $close = Former::close();
     $this->assertEquals('</form>', $close);
 }
コード例 #5
0
ファイル: start.php プロジェクト: nigobo/laravel-play
 public static function tearDownAfterClass()
 {
     \Former\Former::close();
 }
コード例 #6
0
ファイル: start.php プロジェクト: iyoworks/former
 public function tearDown()
 {
     \Former\Former::close();
 }