public function testGetPlugin() { $this->_configScopeMock->expects($this->any())->method('getCurrentScope')->will($this->returnValue('backend')); $this->_model->getNext('Magento\\Framework\\Interception\\Custom\\Module\\Model\\Item', 'getName'); $this->_model->getNext('Magento\\Framework\\Interception\\Custom\\Module\\Model\\ItemContainer', 'getName'); $this->assertEquals('Magento\\Framework\\Interception\\Custom\\Module\\Model\\ItemPlugin\\Simple', $this->_model->getPlugin('Magento\\Framework\\Interception\\Custom\\Module\\Model\\Item', 'simple_plugin')); $this->assertEquals('Magento\\Framework\\Interception\\Custom\\Module\\Model\\ItemPlugin\\Advanced', $this->_model->getPlugin('Magento\\Framework\\Interception\\Custom\\Module\\Model\\Item', 'advanced_plugin')); $this->assertEquals('Magento\\Framework\\Interception\\Custom\\Module\\Model\\ItemContainerPlugin\\Simple', $this->_model->getPlugin('Magento\\Framework\\Interception\\Custom\\Module\\Model\\ItemContainer', 'simple_plugin')); }