Changeset View
Changeset View
Standalone View
Standalone View
src/future/exec/__tests__/ExecPassthruTestCase.php
<?php | <?php | ||||
final class ExecPassthruTestCase extends PhutilTestCase { | final class ExecPassthruTestCase extends PhutilTestCase { | ||||
public function testExecPassthru() { | public function testExecPassthru() { | ||||
// NOTE: We're limited in what we can do here easily; this process can't | // NOTE: We're limited in what we can do here easily; this process can't | ||||
// read any output from the child process (and it will be sent directly to | // read any output from the child process (and it will be sent directly to | ||||
// the terminal, which is undesirable). This makes crafting effective unit | // the terminal, which is undesirable). This makes crafting effective unit | ||||
// tests a fairly involved process. | // tests a fairly involved process. | ||||
$bin = $this->getSupportExecutable('exit'); | $bin = $this->getSupportExecutable('exit'); | ||||
$exec = new PhutilExecPassthru('php -f %R', $bin); | $exec = new PhutilExecPassthru('php -f %R', $bin); | ||||
$err = $exec->execute(); | $err = $exec->resolve(); | ||||
$this->assertEqual(0, $err); | $this->assertEqual(0, $err); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0