for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use \Suricate\FormItem;
/**
* @SuppressWarnings("StaticAccess")
*/
class FormItemTest extends \PHPUnit\Framework\TestCase
{
public function testInput()
$res = FormItem::input('text', 'myInput', "accentué", 'Mon input');
$this->assertEquals(
'<label for="myInput">Mon input</label><input type="text" name="myInput" id="myInput" value="accentué"/>',
$res
);
$res = FormItem::input('text', 'myInput', null, 'Mon input');
'<label for="myInput">Mon input</label><input type="text" name="myInput" id="myInput"/>',
$res = FormItem::input('text', 'myInput', "testval");
'<input type="text" name="myInput" value="testval"/>',
}