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_setup [2018/04/20 09:54] smayr [References] |
systems:yii2:testing_setup [2018/04/26 09:38] (current) smayr [Configure Tests] |
||
---|---|---|---|
Line 192: | Line 192: | ||
- Filesystem | - Filesystem | ||
- Yii2 | - Yii2 | ||
+ | # | ||
+ | | ||
+ | | ||
+ | - Db: | ||
+ | dsn: " | ||
+ | user: " | ||
+ | password: " | ||
+ | #- REST | ||
+ | # depends: PhpBrowser | ||
+ | # url: http:// | ||
</ | </ | ||
Line 205: | Line 215: | ||
enabled: | enabled: | ||
- Asserts | - Asserts | ||
- | - Db: | ||
- | dsn: " | ||
- | user: " | ||
- | password: "" | ||
- Yii2: | - Yii2: | ||
part: [orm, email] | part: [orm, email] | ||
+ | configFile: ' | ||
+ | entryScript: | ||
+ | #- Db: | ||
+ | # dsn: " | ||
+ | # user: " | ||
+ | # password: " | ||
</ | </ | ||
Line 690: | Line 702: | ||
' | ' | ||
' | ' | ||
- | | + | ' |
//' | //' | ||
' | ' | ||
Line 709: | Line 721: | ||
</ | </ | ||
+ | Get more generators from: [[https:// | ||
=== Template for Fixtures === | === Template for Fixtures === | ||
If you need unit tests to load faker data using fixtures, create a fixture template under '' | If you need unit tests to load faker data using fixtures, create a fixture template under '' | ||
<code php> | <code php> | ||
+ | <?php | ||
// users.php file under the template path (by default @tests/ | // users.php file under the template path (by default @tests/ | ||
/** | /** | ||
Line 780: | Line 794: | ||
== Test Examples == | == Test Examples == | ||
+ | * See: [[systems: | ||
- | === Comments === | ||
- | <code php> | ||
- | $I-> | ||
- | $I-> | ||
- | </ | ||
- | |||
- | === Users === | ||
- | <code php> | ||
- | // Login | ||
- | $I-> | ||
- | $I-> | ||
- | $I-> | ||
- | |||
- | // Logout | ||
- | \Yii:: | ||
- | $I-> | ||
- | $I-> | ||
- | $I-> | ||
- | </ | ||
== References == | == References == | ||
* [[https:// | * [[https:// |