* @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:----1VID9X/C+cDTPnc+j4hlseFx0a6fadA6URGlX2vwxzeW/xe+m/Z/BKu+RqnCgwUwh3j4dNx0V9oPuey8JVvatErmRKJiAgFZJjYz0cqAwRihd1BrEo9yz3wKv8f95hRN+BCb6ueVtITM004r1AWLzXv0FOmOsAUfB0f1AbYdiY6hNomaDIOogp2Bm2e8uXe31oQNJcctK2ZI8XXTD5QPvC9xiYEvF0mRfV5oYgAKIvhIJlX9geZx9RkCei6HaikrLRCa7X+0IWA4QopgA169wSge2qhkKR9UozAxn16zWBI5fOzXtBViilnLajfVZeBRYc2GsqerxYmq84x/BlVKEtvqX4EAhXChX+kK98sQQVBHEZwK18k6LFB0XtfK2puU2YJs7Sxdajn0jwL0caO9i3JHm3Z8bldxGsYHtU0YbISMbID1/umUEBK7A2xszgpf9decc54cD6jf+62v78Zjjyzwh3TO3B5rcs3B5qLrg9b12HJ3SdGWekR6wZuDJ+g72Z58ZE2rAQBTUxwEjxE6qWmKixLUQuJEQAjkK2fEDWxzgGDh0f3wfhXAv9TlxgAcGS7jTZwf1Ikju+ArJkfloaoQhTDwM1MDQLQIBZI9yP6wBU9kKDVwsH+Snz2RCw8Ww6P9/IU4rXMCQSAmcflkEZj5drgxGSEgzGJCdq4fQn8=----ATTACHMENT:----ODg0MDM3NzYxNDE1NTEzIDE0MTY1MTMwOTM4NTUwMTUgNDYxNDYzNDQzNTIxNDA0NA==