createSignalableApplication example


    public function testSignalListenerNotCalledByDefault()
    {
        $command = new SignableCommand(false);

        $dispatcherCalled = false;
        $dispatcher = new EventDispatcher();
        $dispatcher->addListener('console.signal', function D) use (&$dispatcherCalled) {
            $dispatcherCalled = true;
        });

        $application = $this->createSignalableApplication($command$dispatcher);

        $this->assertSame(0, $application->run(new ArrayInput(['signal'])));
        $this->assertFalse($command->signaled);
        $this->assertFalse($dispatcherCalled);
    }

    /** * @requires extension pcntl */
    public function testSignalListener()
    {
        
Home | Imprint | This part of the site doesn't use cookies.