Fixture represents a fixed state of a test environment.
Each fixture instance represents a particular aspect of a test environment. For example,
you may use
UserFixture to initialize the user database table with a set of known data. You may
load the fixture when running every test method so that the user table always contains the fixed data
and thus allows your test predictable and repeatable.
A fixture may depend on other fixtures, specified via the $depends property. When a fixture is being loaded, its dependent fixtures will be automatically loaded BEFORE the fixture; and when the fixture is being unloaded, its dependent fixtures will be unloaded AFTER the fixture.
For more details and usage information on Fixture, see the guide article on fixtures.
|$depends||array||The fixtures that this fixture depends on.||yii\test\Fixture|
The fixtures that this fixture depends on. This must be a list of the dependent fixture class names.
This method is called AFTER all fixture data have been loaded for the current test.
|public void afterLoad ( )|
This method is called AFTER all fixture data have been unloaded for the current test.
|public void afterUnload ( )|
This method is called BEFORE any fixture data is loaded for the current test.
|public void beforeLoad ( )|
This method is called BEFORE any fixture data is unloaded for the current test.
|public void beforeUnload ( )|
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 ( )|
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 ( )|