Add the following annotation to the test method:

Add the following annotation to the test method:

A . Option A
B. Option B
C. Option C

Answer: B

Explanation:

To add a custom fixture to test a MyVendor_MyModule, the developer needs to do the following: Create a PHP file with the fixture data in [magento root dir]/dev/tests/integration/testsuite/MyVendor/MyModule/_files/my_fixture.php. Add the following annotation to the test method:

@magentoDataFixture(

‘testsuite/MyVendor/MyModule/_files/my_fixture.php’

)

This will tell Magento to load the fixture data from the my_fixture.php file before the test method is executed.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments