SignalEventSubscriber example

$this->assertTrue($dispatcherCalled);
        $this->assertTrue($command->signaled);
    }

    /** * @requires extension pcntl */
    public function testSignalSubscriberNotCalledByDefault()
    {
        $command = new BaseSignableCommand(false);

        $subscriber = new SignalEventSubscriber();
        $dispatcher = new EventDispatcher();
        $dispatcher->addSubscriber($subscriber);

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

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

    /** * @requires extension pcntl */
Home | Imprint | This part of the site doesn't use cookies.