$33 GRAYBYTE WORDPRESS FILE MANAGER $55

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/php53/usr/share/pear/test/Process/Symfony/Component/Process/Tests/

HOME
Current File : /opt/alt/php53/usr/share/pear/test/Process/Symfony/Component/Process/Tests//SimpleProcessTest.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Process\Tests;

use Symfony\Component\Process\Process;

class SimpleProcessTest extends AbstractProcessTest
{
    private $enabledSigchild = false;

    public function setUp()
    {
        ob_start();
        phpinfo(INFO_GENERAL);

        $this->enabledSigchild = false !== strpos(ob_get_clean(), '--enable-sigchild');
    }

    public function testGetExitCode()
    {
        $this->skipIfPHPSigchild(); // This test use exitcode that is not available in this case
        parent::testGetExitCode();
    }

    public function testExitCodeCommandFailed()
    {
        $this->skipIfPHPSigchild(); // This test use exitcode that is not available in this case
        parent::testExitCodeCommandFailed();
    }

    public function testProcessIsSignaledIfStopped()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
        parent::testProcessIsSignaledIfStopped();
    }

    public function testProcessWithTermSignal()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
        parent::testProcessWithTermSignal();
    }

    public function testProcessIsNotSignaled()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
        parent::testProcessIsNotSignaled();
    }

    public function testProcessWithoutTermSignal()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
        parent::testProcessWithoutTermSignal();
    }

    public function testExitCodeText()
    {
        $this->skipIfPHPSigchild(); // This test use exitcode that is not available in this case
        parent::testExitCodeText();
    }

    public function testIsSuccessful()
    {
        $this->skipIfPHPSigchild(); // This test use PID that is not available in this case
        parent::testIsSuccessful();
    }

    public function testIsNotSuccessful()
    {
        $this->skipIfPHPSigchild(); // This test use PID that is not available in this case
        parent::testIsNotSuccessful();
    }

    public function testGetPid()
    {
        $this->skipIfPHPSigchild(); // This test use PID that is not available in this case
        parent::testGetPid();
    }

    public function testGetPidIsNullBeforeStart()
    {
        $this->skipIfPHPSigchild(); // This test use PID that is not available in this case
        parent::testGetPidIsNullBeforeStart();
    }

    public function testGetPidIsNullAfterRun()
    {
        $this->skipIfPHPSigchild(); // This test use PID that is not available in this case
        parent::testGetPidIsNullAfterRun();
    }

    public function testSignal()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
        parent::testSignal();
    }

    public function testProcessWithoutTermSignalIsNotSignaled()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
        parent::testProcessWithoutTermSignalIsNotSignaled();
    }

    public function testProcessThrowsExceptionWhenExternallySignaled()
    {
        $this->skipIfPHPSigchild(); // This test use PID that is not available in this case
        parent::testProcessThrowsExceptionWhenExternallySignaled();
    }

    public function testExitCodeIsAvailableAfterSignal()
    {
        $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
        parent::testExitCodeIsAvailableAfterSignal();
    }

    public function testSignalProcessNotRunning()
    {
        $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Can not send signal on a non running process.');
        parent::testSignalProcessNotRunning();
    }

    public function testSignalWithWrongIntSignal()
    {
        if ($this->enabledSigchild) {
            $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
        } else {
            $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Error while sending signal `-4`.');
        }
        parent::testSignalWithWrongIntSignal();
    }

    public function testSignalWithWrongNonIntSignal()
    {
        if ($this->enabledSigchild) {
            $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.');
        } else {
            $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Error while sending signal `Céphalopodes`.');
        }
        parent::testSignalWithWrongNonIntSignal();
    }

    /**
     * {@inheritdoc}
     */
    protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
    {
        return new Process($commandline, $cwd, $env, $stdin, $timeout, $options);
    }

    private function skipIfPHPSigchild()
    {
        if ($this->enabledSigchild) {
            $this->markTestSkipped('Your PHP has been compiled with --enable-sigchild, this test can not be executed');
        }
    }

    private function expectExceptionIfPHPSigchild($classname, $message)
    {
        if ($this->enabledSigchild) {
            $this->setExpectedException($classname, $message);
        }
    }
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 7.05 AM
root / root
0755
AbstractProcessTest.php
26.065 KB
18 Dec 2019 6.20 PM
root / root
0644
NonStopableProcess.php
0.793 KB
18 Dec 2019 6.20 PM
root / root
0644
PhpExecutableFinderTest.php
1.825 KB
18 Dec 2019 6.20 PM
root / root
0644
PhpProcessTest.php
0.657 KB
18 Dec 2019 6.20 PM
root / root
0644
PipeStdinInStdoutStdErrStreamSelect.php
1.506 KB
18 Dec 2019 6.20 PM
root / root
0644
ProcessBuilderTest.php
5.859 KB
18 Dec 2019 6.20 PM
root / root
0644
ProcessFailedExceptionTest.php
2.644 KB
18 Dec 2019 6.20 PM
root / root
0644
ProcessInSigchildEnvironment.php
0.442 KB
18 Dec 2019 6.20 PM
root / root
0644
ProcessUtilsTest.php
1.333 KB
18 Dec 2019 6.20 PM
root / root
0644
SigchildDisabledProcessTest.php
7.921 KB
18 Dec 2019 6.20 PM
root / root
0644
SigchildEnabledProcessTest.php
4.34 KB
18 Dec 2019 6.20 PM
root / root
0644
SignalListener.php
0.248 KB
18 Dec 2019 6.20 PM
root / root
0644
SimpleProcessTest.php
6.243 KB
18 Dec 2019 6.20 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF