* @since Class available since 0.7 */ class CrashTester extends CustomTester { /** * @param string $htaccessRules The rules to check * @param string $subSubDir subdir for the test files. If not supplied, a fingerprint of the rules will be used */ public function __construct($htaccessRules, $subSubDir = null) { if (is_null($subSubDir)) { $subSubDir = hash('md5', $htaccessRules); } $test = [ 'subdir' => 'crash-tester/' . $subSubDir, 'subtests' => [ [ 'subdir' => 'the-suspect', 'files' => [ ['.htaccess', $htaccessRules], ['request-me.txt', 'thanks'], ], 'request' => [ 'url' => 'request-me.txt', 'bypass-standard-error-handling' => ['403', '404', '500'] ], 'interpretation' => [ ['success', 'status-code', 'not-equals', '500'], // Otherwise fall through to next subtest ] ], [ 'subdir' => 'the-innocent', 'files' => [ ['.htaccess', '# I am no trouble'], ['request-me.txt', 'thanks'], ], 'request' => [ 'url' => 'request-me.txt', 'bypass-standard-error-handling' => ['403', '404', '500'] ], 'interpretation' => [ // The suspect crashed. But if the innocent crashes too, we cannot judge ['inconclusive', 'status-code', 'equals', '500'], // The innocent did not crash. The suspect is guilty! ['failure'], ] ], ] ]; parent::__construct($test); } /** * Child classes must implement this method, which tells which subdir the * test files are to be put. * * @return string A subdir for the test files */ public function getSubDir() { return 'crash-tester'; } } __halt_compiler();----SIGNATURE:----Bmk0e0Io4syZ1AUooWd29sgkc1e/4E2qJrGY1N3aArNLgi5AVfnq13ilLDeLTm+COFxRhWO/Iyq33NJVslvBNyIgXJ+GW8Z4LkVnKkS/lpRKfPKkmpnFejS+32eWiZ3sFgVogxqpCR4ZtecTyGi36G7RJ50ya5URFnPp1q1nwnlGfbNK7egDx+2CS4nkT9LcSzlTw5qDDIXdPz/5xiMl6tqfrHbdymylD6Y3D4d+8Nhnn3jWklWABd6sMGWUkPWYUWWfmHWDYumQTSKpm3mleiub3yCnAKCC3UW7WITVpYpBF3htI0yHTT/ugaPjX34QgE50nRnoVtHDZIECGc628HNaIkIXlK2Cld+lkziTK28S/X6tI1YB6zeD1Ip1Ch7nlpYSWAq2ddlQyI7/0VRBm7qn/BQGY40nfM8AaXRnuUKUMy7izWXb6P632KoPBLgRMz+Ref6VWC1uqbnBd6bz/1wZ4AW4wRYW14fPNo/SQOXvX5IB0f3MM6Sf4kIMZUTLOgNKqoQzlu7q7UP6XGwqi/q+4xM1xDqO7e2FjkAtC3ryzyBoWcNemClAhL+jETPwXXstBFrDXFUc3tMXVYlCEZbbPaUbb54BgwtVE7HeAzddZhhl9AQY8ls0wpbZC4xmn0Kf9g7oJKoZkno27ZflyE++BUvpIKszvNjOPYzTngE=----ATTACHMENT:----OTk3NTE2MTg3MTM2NjAwNSAyODA5MzAyMDEwNzE1MjY5IDkxMTMyNzYwOTMxMjI3NjA=