phpunit - Magento 2 dependency injection preferences in unit tests -


i wondering why dependency injection preferences specified in di.xml not being read magento\testframework\helper\bootstrap provided magento. have found workaround providing direct configuration setup it:

bootstrap::getobjectmanager()->configure(    [      'preferences' =>          [            'example\coreinterface' => 'example\core'          ]    ] ); 

unfortunately it's not di.xml rewrite prone, 1 day rewrite di.xml preference , break tests. nice load di.xml upon bootstrap of tests. there better way of loading interface preference rewrites?


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -