Beispiel #1
0
 public function testGetObservers()
 {
     $eventName = 'some_event';
     $observers = ['observer1', 'observer3'];
     $this->dataContainerMock->expects($this->once())->method('get')->with($eventName, $this->equalTo([]))->will($this->returnValue($observers));
     $result = $this->config->getObservers($eventName);
     $this->assertEquals($observers, $result);
 }
Beispiel #2
0
 /**
  * Get observers by event name
  *
  * @param string $eventName
  * @return null|array|mixed
  */
 public function getObservers($eventName)
 {
     return $this->_dataContainer->get($eventName, array());
 }
Beispiel #3
0
 public function testGet()
 {
     $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(false));
     $this->_configScopeMock->expects($this->once())->method('getCurrentScope')->will($this->returnValue('value'));
     $this->assertEquals(null, $this->_model->get());
 }