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 t

test\Fixture unload()

unload() public method Unloads the fixture. This method is called after every test method finishes. You may override this method to perform necessary cleanup work for the fixture. public void unload ( )

test\FixtureTrait createFixtures()

createFixtures() protected method Creates the specified fixture instances. All dependent fixtures will also be created. protected yii\test\Fixture[] createFixtures ( array $fixtures )$fixtures array The fixtures to be created. You may provide fixture names or fixture configurations. If this parameter is not provided, the fixtures specified in globalFixtures() and fixtures() will be created. return yii\test\Fixture[] The created fixture instances throws yii\base\InvalidConfigException

test\Fixture beforeUnload()

beforeUnload() public method This method is called BEFORE any fixture data is unloaded for the current test. public void beforeUnload ( )

test\Fixture $depends

$depends public property The fixtures that this fixture depends on. This must be a list of the dependent fixture class names. public array $depends = []

test\Fixture beforeLoad()

beforeLoad() public method This method is called BEFORE any fixture data is loaded for the current test. public void beforeLoad ( )

test\Fixture load()

load() public method Loads the fixture. This method is called before performing every test method. You should override this method with concrete implementation about how to set up the fixture. public void load ( )

test\Fixture afterUnload()

afterUnload() public method This method is called AFTER all fixture data have been unloaded for the current test. public void afterUnload ( )

test\Fixture afterLoad()

afterLoad() public method This method is called AFTER all fixture data have been loaded for the current test. public void afterLoad ( )

test\BaseActiveFixture unload()

unload() public method Unloads the fixture. This method is called after every test method finishes. You may override this method to perform necessary cleanup work for the fixture. public void unload ( )