/** * Activate custom DocBlock annotations along with more-or-less permanent workarounds */ public function registerAnnotations(\Magento\TestFramework\Application $application) { $eventManager = new \Magento\TestFramework\EventManager($this->_getSubscribers($application)); \Magento\TestFramework\Event\PhpUnit::setDefaultEventManager($eventManager); \Magento\TestFramework\Event\Magento::setDefaultEventManager($eventManager); }
public function testConstructorDefaultEventManager() { \Magento\TestFramework\Event\PhpUnit::setDefaultEventManager($this->_eventManager); $this->_object = new \Magento\TestFramework\Event\PhpUnit(); $this->testStartTestSuiteFireEvent(); }