a4ffc7ae45a7ed482dd2015af171c14c05ff5f81
[yaffs-website] / web / core / modules / simpletest / tests / fixtures / simpletest_phpunit_run_command_test.php
1 <?php
2
3 namespace Drupal\Tests\simpletest\Unit;
4
5 /**
6  * This test crashes PHP.
7  *
8  * To avoid accidentally running, it is not in a normal PSR-4 directory, the
9  * file name does not adhere to PSR-4 and an environment variable also needs to
10  * be set for the crash to happen.
11  *
12  * @see \Drupal\Tests\simpletest\Unit\SimpletestPhpunitRunCommandTest::testSimpletestPhpUnitRunCommand()
13  */
14 class SimpletestPhpunitRunCommandTestWillDie extends \PHPUnit_Framework_TestCase {
15
16   /**
17    * Performs the status specified by SimpletestPhpunitRunCommandTestWillDie.
18    */
19   public function testWillDie() {
20     $status = (int) getenv('SimpletestPhpunitRunCommandTestWillDie');
21     if ($status == 0) {
22       $this->assertTrue(TRUE, 'Assertion to ensure test pass');
23       return;
24     }
25     exit($status);
26   }
27
28 }