Esempio n. 1
0
 public function testSubscribe()
 {
     $app = $this->getApp();
     $ext = new NormalExtension();
     $ext->setContainer($app);
     $ext->boot($app);
     $listeners = $app['dispatcher']->getListeners('dropbear.sighting');
     $this->assertInstanceOf('Bolt\\Tests\\Extension\\Mock\\NormalExtension', $listeners[0][0]);
     $this->setExpectedException('RuntimeException', 'Drop Bear Alert!');
     $app['dispatcher']->dispatch('dropbear.sighting');
 }