Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
systems:yii2:testing_examples [2018/04/23 08:53] smayr |
systems:yii2:testing_examples [2018/04/24 15:44] (current) smayr [Forms] |
||
---|---|---|---|
Line 17: | Line 17: | ||
' | ' | ||
]); | ]); | ||
- | $model_user_1 | + | $user_id |
</ | </ | ||
Line 86: | Line 86: | ||
} | } | ||
| | ||
+ | function testRecordCanBeChanged() | ||
+ | { | ||
+ | // Create an Price record from framework. | ||
+ | $id = $this-> | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ]); | ||
+ | $this-> | ||
+ | $this-> | ||
+ | | ||
+ | // Access model | ||
+ | $price = \app\models\Price:: | ||
+ | // | ||
+ | $price-> | ||
+ | $price-> | ||
+ | $this-> | ||
+ | | ||
+ | // Verify data was saved using framework methods | ||
+ | $this-> | ||
+ | $this-> | ||
+ | } | ||
//... | //... | ||
} | } | ||
Line 91: | Line 113: | ||
== Comments == | == Comments == | ||
+ | Use '' | ||
<code php> | <code php> | ||
- | $I->wantTo(' | + | $I->amGoingTo(' |
$I-> | $I-> | ||
+ | $I-> | ||
</ | </ | ||
Line 152: | Line 176: | ||
$I-> | $I-> | ||
} | } | ||
+ | </ | ||
+ | |||
+ | With fields, you can fill them in several says, all meaning the same thing: | ||
+ | <code php> | ||
+ | // All equivalent (input box) | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | |||
+ | // All equivalent (selection box) | ||
+ | $I-> | ||
+ | $I-> | ||
+ | $I-> | ||
+ | </ | ||
+ | |||
+ | == Debug == | ||
+ | <code php> | ||
+ | // Access model | ||
+ | $entry = \app\models\Entry:: | ||
+ | codecept_debug(" | ||
</ | </ |