test\FixtureTrait fixtures()

fixtures() public method

Declares the fixtures that are needed by the current test case.

The return value of this method must be an array of fixture configurations. For example,

[
    // anonymous fixture
    PostFixture::className(),
    // "users" fixture
    'users' => UserFixture::className(),
    // "cache" fixture with configuration
    'cache' => [
         'class' => CacheFixture::className(),
         'host' => 'xxx',
    ],
]

Note that the actual fixtures used for a test case will include both globalFixtures() and fixtures().

public array fixtures ( )
return array

The fixtures needed by the current test case

doc_Yii
2016-10-30 17:13:11
Comments
Leave a Comment

Please login to continue.