Definition at line 12 of file MagentoTest.php.
◆ constructorExceptionDataProvider()
constructorExceptionDataProvider |
( |
| ) |
|
Definition at line 55 of file MagentoTest.php.
57 return [
'no event manager' => [
null],
'not an event manager' => [new \stdClass()]];
◆ setUp()
Definition at line 24 of file MagentoTest.php.
26 $this->_eventManager = $this->getMockBuilder(\
Magento\TestFramework\EventManager::class)
27 ->setMethods([
'fireEvent'])
28 ->setConstructorArgs([[]])
30 $this->_object = new \Magento\TestFramework\Event\Magento($this->_eventManager);
◆ tearDown()
Definition at line 33 of file MagentoTest.php.
static setDefaultEventManager(\Magento\TestFramework\EventManager $eventManager=null)
◆ testConstructorDefaultEventManager()
testConstructorDefaultEventManager |
( |
| ) |
|
Definition at line 38 of file MagentoTest.php.
41 $this->_object = new \Magento\TestFramework\Event\Magento();
static setDefaultEventManager(\Magento\TestFramework\EventManager $eventManager=null)
◆ testConstructorException()
testConstructorException |
( |
|
$eventManager | ) |
|
@dataProvider constructorExceptionDataProvider @expectedException \Magento\Framework\Exception\LocalizedException
- Parameters
-
Definition at line 50 of file MagentoTest.php.
52 new \Magento\TestFramework\Event\Magento($eventManager);
◆ testInitStoreAfter()
Definition at line 60 of file MagentoTest.php.
62 $this->_eventManager->expects($this->once())->method(
'fireEvent')->with(
'initStoreAfter');
63 $this->_object->execute($this->createMock(\
Magento\Framework\Event\Observer::class));
◆ $_eventManager
◆ $_object
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Event/MagentoTest.php