5 require_once(__DIR__ .
"/../../../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"/../../../../Base.php");
7 require_once(__DIR__ .
"/FormTest.php");
42 $df =
new Data\Factory();
43 $language = $this->createMock(\ilLanguage::class);
66 $f = $this->buildFactory();
67 $if = $this->buildInputFactory();
69 $form =
$f->standard(
$url, [
$if->text(
"label")]);
70 $this->assertEquals(
$url, $form->getPostURL());
76 $f = $this->buildFactory();
77 $if = $this->buildInputFactory();
80 $form =
$f->standard(
$url, [
81 $if->text(
"label",
"byline"),
84 $r = $this->getDefaultRenderer();
85 $html = $r->render($form);
87 $expected =
"<form role=\"form\" class=\"il-standard-form form-horizontal\" enctype=\"multipart/form-data\" action=\"MY_URL\" method=\"post\" novalidate=\"novalidate\"> <div class=\"il-standard-form-header clearfix\"> <div class=\"il-standard-form-cmd\"><button class=\"btn btn-default\" data-action=\"\">save</button></div> </div> <div class=\"form-group row\"> <label for=\"form_input_1\" class=\"control-label col-sm-3\">label</label> <div class=\"col-sm-9\"> <input type=\"text\" name=\"form_input_1\" class=\"form-control form-control-sm\" /> <div class=\"help-block\">byline</div> </div></div> <div class=\"il-standard-form-footer clearfix\"> <div class=\"il-standard-form-cmd\"><button class=\"btn btn-default\" data-action=\"\">save</button></div> </div></form>";
88 $this->assertHTMLEquals($expected, $html);
93 $f = $this->buildFactory();
94 $if = $this->buildInputFactory();
97 $form =
$f->standard(
$url, [
98 $if->text(
"label",
"byline"),
101 $r = $this->getDefaultRenderer();
102 $html = $r->render($form);
104 $expected =
"<form role=\"form\" class=\"il-standard-form form-horizontal\" enctype=\"multipart/form-data\" method=\"post\" novalidate=\"novalidate\"> <div class=\"il-standard-form-header clearfix\"> <div class=\"il-standard-form-cmd\"><button class=\"btn btn-default\" data-action=\"\">save</button></div> </div> <div class=\"form-group row\"> <label for=\"form_input_1\" class=\"control-label col-sm-3\">label</label> <div class=\"col-sm-9\"> <input type=\"text\" name=\"form_input_1\" class=\"form-control form-control-sm\" /> <div class=\"help-block\">byline</div> </div></div> <div class=\"il-standard-form-footer clearfix\"> <div class=\"il-standard-form-cmd\"><button class=\"btn btn-default\" data-action=\"\">save</button></div> </div></form>";
105 $this->assertHTMLEquals($expected, $html);
Class ChatMainBarProvider .
Provides common functionality for UI tests.