Magento Shiksha
Quiz : Magento Knowledge Test
1. In Magento 2, which file defines module dependencies and version?
(a) registration.php
(b) di.xml
(c) module.xml
(d) config.xml
2. What happens if two plugins with the same sortOrder are declared for a method?
(a) Magento throws an error
(b) Only the first plugin runs
(c) Execution order becomes unpredictable
(d) Magento merges them automatically
3. In Magento 2, Dependency Injection primarily helps in:
(a) Reducing database queries
(b) Removing layout dependencies
(c) Replacing class dependencies at runtime without modifying code
(d) Improving frontend performance
4. In Magento 2, which file is used to declare routes for a custom module?
(a) routes.xml in etc/frontend or etc/adminhtml
(b) webapi.xml in etc
(c) di.xml in etc
(d) module.xml in etc
5. Where are plugins defined in a Magento 2 module?
(a) routes.xml
(b) module.xml
(c) di.xml
(d) webapi.xml
6. Which of the following is NOT a valid plugin method type in Magento 2?
(a) before method
(b) around method
(c) after method
(d) replace method
7. What is the main purpose of a Plugin in Magento 2?
(a) To override core files directly
(b) To intercept public method calls and modify input/output
(c) To add new database tables
(d) To manage static content deployment
8. Which method type in a plugin allows you to modify both the arguments before execution and the return value after execution?
(a) before method
(b) after method
(c) around method
(d) All of the above
9. Which Magento 2 mode provides the best performance but does not allow automatic code generation?
(a) Developer Mode
(b) Production Mode
(c) Default Mode
(d) Maintenance Mode
10. In Magento 2, if multiple plugins are defined on the same class, the execution order is controlled by:
(a) pluginOrder tag
(b) sortOrder attribute
(c) sequence.xml
(d) Alphabetical order of module names
Submit