SigchildDisabledProcessTest.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Process\Tests;
  11. class SigchildDisabledProcessTest extends AbstractProcessTest
  12. {
  13. /**
  14. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  15. */
  16. public function testGetExitCode()
  17. {
  18. parent::testGetExitCode();
  19. }
  20. /**
  21. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  22. */
  23. public function testExitCodeCommandFailed()
  24. {
  25. parent::testExitCodeCommandFailed();
  26. }
  27. /**
  28. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  29. */
  30. public function testProcessIsSignaledIfStopped()
  31. {
  32. parent::testProcessIsSignaledIfStopped();
  33. }
  34. /**
  35. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  36. */
  37. public function testProcessWithTermSignal()
  38. {
  39. parent::testProcessWithTermSignal();
  40. }
  41. /**
  42. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  43. */
  44. public function testProcessIsNotSignaled()
  45. {
  46. parent::testProcessIsNotSignaled();
  47. }
  48. /**
  49. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  50. */
  51. public function testProcessWithoutTermSignal()
  52. {
  53. parent::testProcessWithoutTermSignal();
  54. }
  55. /**
  56. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  57. */
  58. public function testExitCodeText()
  59. {
  60. $process = $this->getProcess('qdfsmfkqsdfmqmsd');
  61. $process->run();
  62. $process->getExitCodeText();
  63. }
  64. /**
  65. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  66. */
  67. public function testIsSuccessful()
  68. {
  69. parent::testIsSuccessful();
  70. }
  71. /**
  72. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  73. */
  74. public function testIsNotSuccessful()
  75. {
  76. parent::testIsNotSuccessful();
  77. }
  78. /**
  79. * {@inheritdoc}
  80. */
  81. protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
  82. {
  83. $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options);
  84. $process->setEnhanceSigchildCompatibility(false);
  85. return $process;
  86. }
  87. }