File tree 9 files changed +49
-31
lines changed
9 files changed +49
-31
lines changed Original file line number Diff line number Diff line change 1
- @ echo off
2
- if " %PHPBIN% " == " " set PHPBIN = @php_bin@
3
- if not exist " %PHPBIN% " if " %PHP_PEAR_PHP_BIN% " neq " " goto USE_PEAR_PATH
4
- GOTO RUN
5
- :USE_PEAR_PATH
6
- set PHPBIN = %PHP_PEAR_PHP_BIN%
7
- :RUN
8
- " %PHPBIN% " " @bin_dir@\codecept" %*
1
+ @ echo off
2
+ if " %PHPBIN% " == " " set PHPBIN = @php_bin@
3
+ if exist " codecept" goto INTERNAL
4
+ if not exist " %PHPBIN% " if " %PHP_PEAR_PHP_BIN% " neq " " goto USE_PEAR_PATH
5
+ GOTO RUN
6
+ :USE_PEAR_PATH
7
+ set PHPBIN = %PHP_PEAR_PHP_BIN%
8
+ :RUN
9
+ " %PHPBIN% " " @bin_dir@\codecept" %*
10
+ :INTERNAL
11
+ " %PHPBIN% " " codecept" %*
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ protected function debugResponse()
119
119
// $this->client->getzendrequest()->getcontrollername(),
120
120
// $this->client->getzendrequest()->getactionname()
121
121
// ));
122
+ $ this ->debugSection ('Session ' ,json_encode ($ _COOKIE ));
122
123
if ($ this ->db ) {
123
124
$ profiler = $ this ->db ->getProfiler ();
124
125
$ queries = $ profiler ->getTotalNumQueries () - $ this ->queries ;
Original file line number Diff line number Diff line change @@ -194,7 +194,10 @@ protected function getFormFor($node)
194
194
$ action = $ this ->getFormUrl ($ form );
195
195
196
196
if (!isset ($ this ->forms [$ action ])) {
197
- $ form ->children ()->addHtmlContent ('<input type="submit" /> ' ); // for forms with no submits...
197
+ $ submit = new \DOMElement ('input ' );
198
+ $ submit = $ form ->current ()->appendChild ($ submit );
199
+ $ submit ->setAttribute ('type ' ,'submit ' ); // for forms with no submits
200
+
198
201
$ form = $ form ->filter ('input[type=submit] ' )->form ();
199
202
$ this ->forms [$ action ] = $ form ;
200
203
}
Original file line number Diff line number Diff line change 1
- a:1:{s:13:"4f4356d6a9057";a: 0:{} }
1
+ a:0:{}
Original file line number Diff line number Diff line change 10
10
'/ ' => 'index ' ,
11
11
'/info ' => 'info ' ,
12
12
'/login ' => 'login ' ,
13
- '/form/(field|select|checkbox|file|textarea|hidden|complex)(#)? ' => 'form '
13
+ '/form/(field|select|checkbox|file|textarea|hidden|complex|button|empty )(#)? ' => 'form '
14
14
);
15
15
16
16
glue::stick ($ urls );
Original file line number Diff line number Diff line change
1
+ <html >
2
+ <body >
3
+ <form action =" /form/button" method =" POST" >
4
+ <input type = " hidden" name = " text" value = " val" />
5
+ <button type = " submit" >Submit</button >
6
+ </form >
7
+ </body >
8
+ </html >
Original file line number Diff line number Diff line change
1
+ <html >
2
+ <body >
3
+ <form action =" /form/empty" method =" POST" >
4
+ <input type = " text" name = " text" value = " val" >
5
+ </form >
6
+ </body >
7
+ </html >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -169,6 +169,20 @@ public function testSubmitForm() {
169
169
$ this ->assertEquals ('Davert ' , $ form ['name ' ]);
170
170
$ this ->assertEquals ('kill_all ' , $ form ['action ' ]);
171
171
}
172
+
173
+ public function testSubmitFormWithNoSubmitButton () {
174
+ $ this ->module ->amOnPage ('/form/empty ' );
175
+ $ this ->module ->submitForm ('form ' , array ('text ' => 'davert ' ));
176
+ $ form = data::get ('form ' );
177
+ $ this ->assertEquals ('davert ' , $ form ['text ' ]);
178
+ }
179
+
180
+ public function testSubmitFormByButton () {
181
+ $ this ->module ->amOnPage ('/form/button ' );
182
+ $ this ->module ->click ('Submit ' );
183
+ $ form = data::get ('form ' );
184
+ $ this ->assertEquals ('val ' , $ form ['text ' ]);
185
+ }
172
186
173
187
public function testAjax () {
174
188
$ this ->module ->sendAjaxGetRequest ('/info ' , array ('show ' => 'author ' ));
@@ -213,5 +227,7 @@ public function testComplexSelectorsAndForms() {
213
227
$ this ->
assertEquals (
'[email protected] ' ,
$ post[
'email ' ]);
214
228
215
229
}
230
+
231
+
216
232
217
233
}
You can’t perform that action at this time.
0 commit comments