@@ -14,7 +14,7 @@ use Tester\Assert;
1414require __DIR__ . '/../bootstrap.php ' ;
1515
1616
17- test (function () { // error handling
17+ test (' error handling ' , function () {
1818 $ form = new Form ;
1919 $ input = $ form ->addText ('text ' )
2020 ->setRequired ('error ' );
@@ -34,7 +34,7 @@ test(function () { // error handling
3434});
3535
3636
37- test (function () { // validators
37+ test (' validators ' , function () {
3838 $ form = new Form ;
3939 $ input = $ form ->addText ('text ' );
4040 $ input ->setValue (123 );
@@ -71,7 +71,7 @@ test(function () { // validators
7171});
7272
7373
74- test (function () { // validators for array
74+ test (' validators for array ' , function () {
7575 $ form = new Form ;
7676 $ input = $ form ->addMultiSelect ('select ' , null , ['a ' , 'b ' , 'c ' , 'd ' ]);
7777 $ input ->setValue ([1 , 2 , 3 ]);
@@ -95,23 +95,23 @@ test(function () { // validators for array
9595});
9696
9797
98- test (function () { // setHtmlId
98+ test (' setHtmlId ' , function () {
9999 $ form = new Form ;
100100 $ input = $ form ->addText ('text ' )->setHtmlId ('myId ' );
101101
102102 Assert::same ('<input type="text" name="text" id="myId"> ' , (string ) $ input ->getControl ());
103103});
104104
105105
106- test (function () { // special name
106+ test (' special name ' , function () {
107107 $ form = new Form ;
108108 $ input = $ form ->addText ('submit ' );
109109
110110 Assert::same ('<input type="text" name="_submit" id="frm-submit"> ' , (string ) $ input ->getControl ());
111111});
112112
113113
114- test (function () { // disabled
114+ test (' disabled ' , function () {
115115 $ form = new Form ;
116116 $ form ->addText ('disabled ' )
117117 ->setDisabled ()
@@ -123,7 +123,7 @@ test(function () { // disabled
123123});
124124
125125
126- test (function () { // disabled & submitted
126+ test (' disabled & submitted ' , function () {
127127 $ _SERVER ['REQUEST_METHOD ' ] = 'POST ' ;
128128 $ _POST = ['disabled ' => 'submitted value ' ];
129129
@@ -147,7 +147,7 @@ test(function () { // disabled & submitted
147147});
148148
149149
150- test (function () {
150+ test ('' , function () {
151151 $ form = new Form ;
152152 $ form ->setTranslator (new class implements Nette \Localization \ITranslator {
153153 public function translate ($ s , ...$ parameters ): string
@@ -181,7 +181,7 @@ test(function () {
181181});
182182
183183
184- test (function () { // change HTML name
184+ test (' change HTML name ' , function () {
185185 $ _POST = ['b ' => '123 ' , 'send ' => '' ];
186186 $ form = new Form ;
187187 $ form ->addSubmit ('send ' , 'Send ' );
0 commit comments