Test Quiz

Please DO NOT renumber any of the existing questions and don’t swap answers between themselves, the cheat sheet that is kept separately must refer properly to the numbers and letters here.

 

    1. Which of the following statements are true?
      1. Maintenance mode and standard mode can be active at the same time
      2. Production mode makes it impossible to check errors
      3. Production mode uses pub directory for web-accessible files
      4. There must be error_reporting(E_ALL) present in developer mode
    2. In which Magento modes static files materialization is enabled?
      1. developer
      2. default
      3. production
      4. maintenance
    3. Administrator can control which IP addresses will still have access to the instance during maintenance mode by…
      1. editing .htaccess
      2. modifying System Configuration
      3. using php bin/magento maintenance:allow-ips
      4. editing var/.maintenance.ip file
    4. In order to specify that your module depends on other modules, you need…
      1. mention them in <sequence> node in the <moduleDir>/etc/module.xml comma-separated
      2. mention them in <dependency> node in the <moduleDir>/etc/module.xml as a list of module subnodes
      3. mention them in <sequence> node in the <moduleDir>/etc/module.xml as a list of dependency subnodes
      4. mention them in <sequence> node in the <moduleDir>/etc/module.xml as a list of module subnodes and add dependencies to module’s composer.json
      5. mention them in <sequence> node in the etc/config.php as array elements
    5. Can there be several modules responsible for the same feature in your Magento application?
      1. Yes, there is no limitation
      2. Absolutely not
      3. Only if you declare all modules in the same namespace
    6. What dependencies should be declared as module dependencies?
      1. Only modules current module depends on
      2. Themes
      3. Language packs
      4. All of the above
    7. What are possible locations for the module directory for a module Vaimo_FancyModule?
      1. app/code/Vaimo/FancyModule
      2. app/code/Vaimo_FancyModule
      3. vendor/module-vaimo-fancymodule/Vaimo/FancyModule
      4. vendor/module-vaimo-fancymodule
    8. What is the minimal required content of a module directory?
      1. Model, Controller, etc/module.xml, config.xml
      2. etc/module.xml, registration.php
      3. etc/model.xml, Model
      4. registration.php
    9. Where Magento stores credentials for the database, cache, session and encryption key?
      1. app/etc/local.xml
      2. app/etc/config.xml
      3. app/etc/config.php
      4. app/etc/env.php
    10. What’s the sequence of merging configuration files across the system?
      1. Primary application config, global config files in every module, area-specific config files in every module, config values from database
      2. Primary application config, config values from database, for every module: { global config files, area-specific config files }
      3. Primary application config, for every module: { global config files, area-specific config files }, config values from database
      4. Config values from database, application config, global config files in every module, area-specific config files in every module
    11. You need to instantiate a product. What do you do?
      1. Configure \Magento\Catalog\Model\Product object to be injected into your class
      2. Access Object Manager and perform $om->get(‘Magento\Catalog\Model\Product‘)
      3. Inject the \Magento\Catalog\Api\ProductRepositoryInterface product repository, then perform $productRepository->get($sku)
      4. Access Object Manager and perform $om->create(‘Magento\Catalog\Model\Product‘)
    12. The third party module contains the following code: 
  • 1
    2
    3
    4
    5
    6
  • protected function getPriceInfo()
    {
    $priceModel = new \MageSuper\Price\Model\PriceModel($this);
     
    return $priceModel->calculate(true);
    }

  • You are told to override \MageSuper\Price\Model\PriceModel in order to change the calculation formula. Your action:

      1. You’re extending \MyCompany\Price\Model\PriceModel from \MageSuper\Price\Model\PriceModel and overwriting calculate() method
      2. You’re extending \MyCompany\Price\Model\PriceModel from \MageSuper\Price\Model\PriceModel and creating a plugin aroundCalculate() to modify the behavior
      3. You’re extending \MyCompany\Price\Model\PriceModel from \MageSuper\Price\Model\PriceModel and declaring preference to prefer your class instead of the original one in di.xml, then you override calculate() in your class
      4. You refuse the job, because you cannot do what you are told
    1. An action controller you’re working on requires a product collection. In order to get an instance of a product collection, you
      1. Configure your controller to be injected with a product collection with shared=”false”
      2. Fetch an instance of Object Manager, then do $om->get(‘\Magento\Catalog\Api\ProductRepositoryInterface’)->getList()
      3. Configure your controller to be injected with a product collection
      4. Fetch an instance of product collection from Registry
Advertisements

1 thought on “Test Quiz”

  1. I can’t say it enou8h&#g230;.I am in such awe of your talent; you light and tones, and airy soft colors are always so amazing. Why oh why aren’t you CLOSER to us?! Can’t wait to see more of this session, and I am SO getting the girls to bounce around for some fun shots:)

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s