yf_test_html5fw user moduleBootstrap acceptance testing methods.
| File | plugins/test/modules/test/yf_test_html5fw.class.php |
|---|---|
| Use | module('test_html5fw'), URL ?object=test_html5fw |
| Property | Default | Description |
|---|---|---|
| None declared in this class. | ||
public function container()
public function container()
{
return form()->container('name');
}
public function controls()
public function controls()
{
return form()
->text('login', 'Login', ['prepend' => '@'])
->select_box('color', ['r' => 'Red', 'g' => 'Green'])
->radio_box('size', ['s' => 'Small', 'l' => 'Large'])
->check_box('agree', 'I agree')
->textarea('note', 'Note', ['inline_help' => 'Help text'])
->save();
}
public function error_state()
public function error_state()
{
common()->_raise_error('Login is required', 'login');
return form()->text('login', 'Login')->save();
}
public function text()
public function text()
{
return form()->text('name');
}
public function textarea()
public function textarea()
{
return form()->textarea('name');
}
public function widgets()
public function widgets()
{
$html = _class('html');
return $html->alert(['head' => 'Heads up', 'body' => 'Alert body', 'alert' => 'info'])
. $html->tabs(['one' => 'First tab', 'two' => 'Second tab'])
. $html->accordion(['one' => 'First panel', 'two' => 'Second panel'])
. $html->breadcrumbs([['name' => 'Home', 'link' => './'], ['name' => 'Here']])
. $html->pagination(['1' => './?page=1', '2' => './?page=2', 'prev' => './?page=1', 'next' => './?page=2'])
. $html->div_box('menu', ['a' => 'Alpha', 'b' => 'Beta'], 'a')
. $html->modal(['header' => 'Inline modal', 'body' => 'Modal body', 'inline' => 1, 'show_close' => 1]);
}