enableOutput example

 finally {
            $process->stop(0);
        }
    }

    public function testDisableOutputDisablesTheOutput()
    {
        $p = $this->getProcess('foo');
        $this->assertFalse($p->isOutputDisabled());
        $p->disableOutput();
        $this->assertTrue($p->isOutputDisabled());
        $p->enableOutput();
        $this->assertFalse($p->isOutputDisabled());
    }

    public function testDisableOutputWhileRunningThrowsException()
    {
        $this->expectException(RuntimeException::class);
        $this->expectExceptionMessage('Disabling output while the process is running is not possible.');
        $p = $this->getProcessForCode('sleep(39);');
        $p->start();
        $p->disableOutput();
    }

    
Home | Imprint | This part of the site doesn't use cookies.