* @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:----guzCC0q/N2oeJfEF0i2OcSYMQ8grejTE3roMlcsCzP9jwKdpPBEVM/fiPl5FFQXBE7lSiAnEaqs86GKx1bcWSHHyik5vUDNCErcanGzKfyscw9cU1mQO6ACFiXpRGo6xrmfr4ZaVu15PZtNSdTZoj71Hi5DYtnsllL9CCA6ZC83HD7G4m4nqhTd15TvMXgG3Ma4/pqQre2dCEHxlvCxsH1V1fin7Ls/5UUmc/xYmyuGQ3tJ0bVzyJEs9zK3v/IuFmsrJ7kculYNP56rC+d98ez9Sms9syPuWmf5BP+9YALc56nrptp3Hxu7qRAUXvcU13oWGKKVHpDKzyOHPTT3/PeQFhtSP4XHMmivxsxuKjN4I8xRH0Caw8DEiPdHLOO37jcSDsD80xJHIuvHa+R35obCyVrwcnL0dTWr5D5DrfQ4IsKk0xGvlq1+zJ01INDgDZRG/SfwNgg9PNHbD1nKn0KeCSMNoEoGVFBLcGdBn1zOXc7Y8+OEZ2aQ7wMHNQN228ekzP7LoNq1kVEmMUPH4BP9noAxe4XmGc/czbi+OCxui1f0RazN7paZPrdDN4s4DcJZkrsAvT2hgU+vp6lLsgjwz3pSjyFBGA0YZOUAddO+4z8lW2vMKi4EuzMdhcP3ko/mUPY/DUF2TCWEftiqMAykT4ay8jmjpEZlRFL/C7RU=----ATTACHMENT:----MzExMzEyMTI3NDEwODcwMSA2MTA3MTg0ODY3NTYwODUgNzMzOTY1NTMwODM0NDk0NA==