SigchildDisabledProcessTest.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 testGetExitCodeIsNullOnStart()
  24. {
  25. parent::testGetExitCodeIsNullOnStart();
  26. }
  27. /**
  28. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  29. */
  30. public function testGetExitCodeIsNullOnWhenStartingAgain()
  31. {
  32. parent::testGetExitCodeIsNullOnWhenStartingAgain();
  33. }
  34. /**
  35. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  36. */
  37. public function testExitCodeCommandFailed()
  38. {
  39. parent::testExitCodeCommandFailed();
  40. }
  41. /**
  42. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  43. */
  44. public function testProcessIsSignaledIfStopped()
  45. {
  46. parent::testProcessIsSignaledIfStopped();
  47. }
  48. /**
  49. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  50. */
  51. public function testProcessWithTermSignal()
  52. {
  53. parent::testProcessWithTermSignal();
  54. }
  55. /**
  56. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  57. */
  58. public function testProcessIsNotSignaled()
  59. {
  60. parent::testProcessIsNotSignaled();
  61. }
  62. /**
  63. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  64. */
  65. public function testProcessWithoutTermSignal()
  66. {
  67. parent::testProcessWithoutTermSignal();
  68. }
  69. /**
  70. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  71. */
  72. public function testExitCodeText()
  73. {
  74. $process = $this->getProcess('qdfsmfkqsdfmqmsd');
  75. $process->run();
  76. $process->getExitCodeText();
  77. }
  78. /**
  79. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  80. */
  81. public function testIsSuccessful()
  82. {
  83. parent::testIsSuccessful();
  84. }
  85. /**
  86. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  87. */
  88. public function testIsSuccessfulOnlyAfterTerminated()
  89. {
  90. parent::testIsSuccessfulOnlyAfterTerminated();
  91. }
  92. /**
  93. * @expectedException \Symfony\Component\Process\Exception\RuntimeException
  94. */
  95. public function testIsNotSuccessful()
  96. {
  97. parent::testIsNotSuccessful();
  98. }
  99. /**
  100. * {@inheritdoc}
  101. */
  102. protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
  103. {
  104. $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options);
  105. $process->setEnhanceSigchildCompatibility(false);
  106. return $process;
  107. }
  108. }