This repository has been archived by the owner on May 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
Using Fixtures
alexsiri7 edited this page Jan 6, 2012
·
2 revisions
To include fixtures for your test, you can use the annotation @loadFixtures. This optionally takes the name of the fixtures file, if you omit it the fixture loaded will be the one with the name of the test method.
For example:
class ..._MyTest extends EcomDev_PHPUnit_Test_Case{
/**
* @test
* @loadFixtures
*/
public function testSize(){
...
}
This will look for the file MyTest/fixtures/testSize.yaml.
class ..._MyTest extends EcomDev_PHPUnit_Test_Case{
/**
* @test
* @loadFixtures someTestfile
*/
public function testSize(){
...
}
This will look for the file MyTest/fixtures/someTestfile.yaml.