@@ -68,6 +68,7 @@ test(function () {
6868 'error ' => 0 ,
6969 ]), $ input ->getValue ());
7070 Assert::true ($ input ->isFilled ());
71+ Assert::true ($ input ->isOk ());
7172});
7273
7374
@@ -84,6 +85,7 @@ test(function () { // container
8485 'error ' => 0 ,
8586 ]), $ input ->getValue ());
8687 Assert::true ($ input ->isFilled ());
88+ Assert::true ($ input ->isOk ());
8789});
8890
8991
@@ -106,6 +108,7 @@ test(function () { // multiple (in container)
106108 'error ' => 0 ,
107109 ])], $ input ->getValue ());
108110 Assert::true ($ input ->isFilled ());
111+ Assert::true ($ input ->isOk ());
109112});
110113
111114
@@ -117,6 +120,7 @@ test(function () { // missing data
117120 Assert::false ($ form ->isValid ());
118121 Assert::equal ([], $ input ->getValue ());
119122 Assert::false ($ input ->isFilled ());
123+ Assert::false ($ input ->isOk ());
120124});
121125
122126
@@ -128,6 +132,7 @@ test(function () { // empty data
128132 Assert::false ($ form ->isValid ());
129133 Assert::equal (new FileUpload ([]), $ input ->getValue ());
130134 Assert::false ($ input ->isFilled ());
135+ Assert::false ($ input ->isOk ());
131136});
132137
133138
@@ -138,27 +143,31 @@ test(function () { // malformed data
138143 Assert::true ($ form ->isValid ());
139144 Assert::equal (new FileUpload ([]), $ input ->getValue ());
140145 Assert::false ($ input ->isFilled ());
146+ Assert::false ($ input ->isOk ());
141147
142148 $ form = new Form ;
143149 $ input = $ form ->addUpload ('invalid2 ' );
144150
145151 Assert::true ($ form ->isValid ());
146152 Assert::equal (new FileUpload ([]), $ input ->getValue ());
147153 Assert::false ($ input ->isFilled ());
154+ Assert::false ($ input ->isOk ());
148155
149156 $ form = new Form ;
150157 $ input = $ form ->addMultiUpload ('avatar ' );
151158
152159 Assert::true ($ form ->isValid ());
153160 Assert::equal ([], $ input ->getValue ());
154161 Assert::false ($ input ->isFilled ());
162+ Assert::false ($ input ->isOk ());
155163
156164 $ form = new Form ;
157165 $ input = $ form ->addContainer ('multiple ' )->addUpload ('avatar ' );
158166
159167 Assert::true ($ form ->isValid ());
160168 Assert::equal (new FileUpload ([]), $ input ->getValue ());
161169 Assert::false ($ input ->isFilled ());
170+ Assert::false ($ input ->isOk ());
162171});
163172
164173
0 commit comments