Esempio n. 1
0
 public function testGetDispatcher()
 {
     $this->assertNull($this->event->getDispatcher());
 }
Esempio n. 2
0
 public function testLegacyGetDispatcher()
 {
     $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
     $this->assertNull($this->event->getDispatcher());
 }
Esempio n. 3
0
 public function testGetDispatcher()
 {
     $this->assertNull($this->event->getDispatcher());
     $this->event->setDispatcher($this->dispatcher);
     $this->assertSame($this->dispatcher, $this->event->getDispatcher());
 }
 /**
  * @return \Heystack\Core\EventDispatcher
  */
 public function getDispatcher()
 {
     return parent::getDispatcher();
 }
Esempio n. 5
0
 public function updateOrderDiscount(Event $event)
 {
     $discount = $this->couponManager->getDiscount();
     $this->request->getSession()->getSessionCart($event->getDispatcher())->setDiscount($discount)->save();
     $this->request->getSession()->getOrder()->setDiscount($discount);
 }