コード例 #1
0
 public function testOnModeOn()
 {
     $this->topicPublisher->expects($this->once())->method('send')->with('oro/maintenance', array('isOn' => true, 'msg' => 'Maintenance mode is ON'));
     /** @var MaintenanceListener $publisher */
     $publisher = new MaintenanceListener($this->topicPublisher);
     $publisher->onModeOn();
 }
コード例 #2
0
 public function testOnModeOn()
 {
     $expectedUserId = 0;
     $this->topicPublisher->expects($this->once())->method('send')->with('oro/maintenance', array('isOn' => true, 'userId' => $expectedUserId));
     $this->securityFacade->expects($this->once())->method('getLoggedUserId')->will($this->returnValue($expectedUserId));
     /** @var MaintenanceListener $publisher */
     $publisher = new MaintenanceListener($this->topicPublisher, $this->securityFacade, $this->logger);
     $publisher->onModeOn();
 }