Bolt\Tests\Extension\SimpleExtensionTest::testSubscribe PHP Method

testSubscribe() public method

public testSubscribe ( )
    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');
    }