1
- <?php //[STAMP] 208a5aabd8b3cbf311bce9385040e7e4
1
+ <?php //[STAMP] 5d8d4bee99eb2e9043c0849267f3483c
2
2
3
3
// This class was automatically generated by build task
4
4
// You should not change it manually as it will be overwritten on next build
@@ -1527,8 +1527,8 @@ public function dontSeeInFormFields($formSelector, $params) {
1527
1527
/**
1528
1528
* [!] Method is generated. Documentation taken from corresponding module.
1529
1529
*
1530
- * Submits the given form on the page, optionally with the given form values.
1531
- * Give the form fields values as an array.
1530
+ * Submits the given form on the page, optionally with the given form
1531
+ * values. Give the form fields values as an array.
1532
1532
*
1533
1533
* Skipped fields will be filled by their values from the page.
1534
1534
* You don't need to click the 'Submit' button afterwards.
@@ -1543,20 +1543,33 @@ public function dontSeeInFormFields($formSelector, $params) {
1543
1543
*
1544
1544
* ``` php
1545
1545
* <?php
1546
- * $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
1546
+ * $I->submitForm('#login', [
1547
+ * 'login' => 'davert',
1548
+ * 'password' => '123456'
1549
+ * ]);
1547
1550
* // or
1548
- * $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'), 'submitButtonName');
1551
+ * $I->submitForm('#login', [
1552
+ * 'login' => 'davert',
1553
+ * 'password' => '123456'
1554
+ * ], 'submitButtonName');
1549
1555
*
1550
1556
* ```
1551
1557
*
1552
1558
* For example, given this sample "Sign Up" form:
1553
1559
*
1554
1560
* ``` html
1555
1561
* <form action="/sign_up">
1556
- * Login: <input type="text" name="user[login]" /><br/>
1557
- * Password: <input type="password" name="user[password]" /><br/>
1558
- * Do you agree to out terms? <input type="checkbox" name="user[agree]" /><br/>
1559
- * Select pricing plan <select name="plan"><option value="1">Free</option><option value="2" selected="selected">Paid</option></select>
1562
+ * Login:
1563
+ * <input type="text" name="user[login]" /><br/>
1564
+ * Password:
1565
+ * <input type="password" name="user[password]" /><br/>
1566
+ * Do you agree to out terms?
1567
+ * <input type="checkbox" name="user[agree]" /><br/>
1568
+ * Select pricing plan:
1569
+ * <select name="plan">
1570
+ * <option value="1">Free</option>
1571
+ * <option value="2" selected="selected">Paid</option>
1572
+ * </select>
1560
1573
* <input type="submit" name="submitButton" value="Submit" />
1561
1574
* </form>
1562
1575
* ```
@@ -1565,17 +1578,36 @@ public function dontSeeInFormFields($formSelector, $params) {
1565
1578
*
1566
1579
* ``` php
1567
1580
* <?php
1568
- * $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)), 'submitButton');
1569
- *
1581
+ * $I->submitForm(
1582
+ * '#userForm',
1583
+ * [
1584
+ * 'user' => [
1585
+ * 'login' => 'Davert',
1586
+ * 'password' => '123456',
1587
+ * 'agree' => true
1588
+ * ]
1589
+ * ],
1590
+ * 'submitButton'
1591
+ * );
1570
1592
* ```
1571
- * Note that "2" will be the submitted value for the "plan" field, as it is the selected option.
1593
+ * Note that "2" will be the submitted value for the "plan" field, as it is
1594
+ * the selected option.
1572
1595
*
1573
- * You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm.
1596
+ * You can also emulate a JavaScript submission by not specifying any
1597
+ * buttons in the third parameter to submitForm.
1574
1598
*
1575
1599
* ```php
1576
1600
* <?php
1577
- * $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
1578
- *
1601
+ * $I->submitForm(
1602
+ * '#userForm',
1603
+ * [
1604
+ * 'user' => [
1605
+ * 'login' => 'Davert',
1606
+ * 'password' => '123456',
1607
+ * 'agree' => true
1608
+ * ]
1609
+ * ]
1610
+ * );
1579
1611
* ```
1580
1612
*
1581
1613
* Pair this with seeInFormFields for quick testing magic.
@@ -1620,8 +1652,31 @@ public function dontSeeInFormFields($formSelector, $params) {
1620
1652
* ?>
1621
1653
* ```
1622
1654
*
1623
- * Mixing string and boolean values for a checkbox's value is not
1624
- * supported and may produce unexpected results.
1655
+ * Mixing string and boolean values for a checkbox's value is not supported
1656
+ * and may produce unexpected results.
1657
+ *
1658
+ * Field names ending in "[]" must be passed without the trailing square
1659
+ * bracket characters, and must contain an array for its value. This allows
1660
+ * submitting multiple values with the same name, consider:
1661
+ *
1662
+ * ```php
1663
+ * $I->submitForm('#my-form', [
1664
+ * 'field[]' => 'value',
1665
+ * 'field[]' => 'another value', // 'field[]' is already a defined key
1666
+ * ]);
1667
+ * ```
1668
+ *
1669
+ * The solution is to pass an array value:
1670
+ *
1671
+ * ```php
1672
+ * // this way both values are submitted
1673
+ * $I->submitForm('#my-form', [
1674
+ * 'field' => [
1675
+ * 'value',
1676
+ * 'another value',
1677
+ * ]
1678
+ * ]);
1679
+ * ```
1625
1680
*
1626
1681
* @param $selector
1627
1682
* @param $params
@@ -3254,7 +3309,7 @@ public function assertNotSame($expected, $actual, $message = null) {
3254
3309
/**
3255
3310
* [!] Method is generated. Documentation taken from corresponding module.
3256
3311
*
3257
- * Checks that expected is greater than actual
3312
+ * Checks that actual is greater than expected
3258
3313
*
3259
3314
* @param $expected
3260
3315
* @param $actual
@@ -3280,7 +3335,7 @@ public function assertGreaterThen($expected, $actual, $message = null) {
3280
3335
/**
3281
3336
* [!] Method is generated. Documentation taken from corresponding module.
3282
3337
*
3283
- * Checks that expected is greater or equal than actual
3338
+ * Checks that actual is greater or equal than expected
3284
3339
*
3285
3340
* @param $expected
3286
3341
* @param $actual
@@ -3306,7 +3361,7 @@ public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
3306
3361
/**
3307
3362
* [!] Method is generated. Documentation taken from corresponding module.
3308
3363
*
3309
- * Checks that expected is less than actual
3364
+ * Checks that actual is less than expected
3310
3365
*
3311
3366
* @param $expected
3312
3367
* @param $actual
@@ -3321,7 +3376,7 @@ public function assertLessThan($expected, $actual, $message = null) {
3321
3376
/**
3322
3377
* [!] Method is generated. Documentation taken from corresponding module.
3323
3378
*
3324
- * Checks that expected is less or equal than actual
3379
+ * Checks that actual is less or equal than expected
3325
3380
*
3326
3381
* @param $expected
3327
3382
* @param $actual
0 commit comments