ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 30 - AD0-E718 discussion

Report
Export

An Adobe Commerce Architect creates a new functionality called Customs Fee, which adds a new total that applies to additional costs for handling customs clearance expenses. The extension allows specifying fee value for every website separately via the Adobe Commerce Configuration System.

The Architect plans to cover new functionality with integration tests. One test case needs to confirm if the total is calculated correctly on different websites.

How should the Architect make sure that test configuration data is added to test methods according to best practices?

A.
Override setuo () method, receive instance of \Magento\TestFramework\App\config, and specify value via setValue () method
Answers
A.
Override setuo () method, receive instance of \Magento\TestFramework\App\config, and specify value via setValue () method
B.
Specify @magentoconfigFixture annotations for the test methods in PHPDoc
Answers
B.
Specify @magentoconfigFixture annotations for the test methods in PHPDoc
C.
Create a fixture file to configure Adobe Commerce and specify it in test method PHPDoc using the @magentoconfigFixture annotation
Answers
C.
Create a fixture file to configure Adobe Commerce and specify it in test method PHPDoc using the @magentoconfigFixture annotation
Suggested answer: B

Explanation:

The best practice for making sure that test configuration data is added to test methods is to use the @magentoconfigFixture annotation in the PHPDoc for the test methods. This will allow the Architect to specify a fixture file which will configure Adobe Commerce, and the test method will then be able to access these configuration values. Additionally, the Architect can also override the setUp() method and receive an instance of \Magento\TestFramework\App\config and specify the value via the setValue() method.

asked 02/10/2024
BRUNO DE BRIDA
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first