disallowAllDirectives('fatal'); $testResult = $fakeServer->runTester(new ServerSignatureTester()); $this->assertFailure($testResult); // SPECIAL! // As ServerSignature is in core and AllowOverride is None, the tester assumes // that this does not happen. The 500 must then be another problem, which is why // it returns inconclusive //$this->assertInconclusive($testResult); } public function testAccessAllDenied() { $fakeServer = new FakeServer(); $fakeServer->denyAllAccess(); $testResult = $fakeServer->runTester(new ServerSignatureTester()); $this->assertInconclusive($testResult); } /** * Test when the directive has no effect. * This could happen when: * - The directive is forbidden (non-fatal) * - The module is not loaded * * This tests when ServerSignature is set, and the directive has no effect. */ public function testDirectiveHasNoEffect1() { $fakeServer = new FakeServer(); $fakeServer->setResponses([ '/server-signature/on/test.php' => new HttpResponse('1', '200', []), '/server-signature/off/test.php' => new HttpResponse('0', '200', []) ]); $testResult = $fakeServer->runTester(new ServerSignatureTester()); $this->assertFailure($testResult); } /** * This tests when ServerSignature is unset, and the directive has no effect. */ public function testDirectiveHasNoEffect2() { $fakeServer = new FakeServer(); $fakeServer->setResponses([ '/server-signature/on/test.php' => new HttpResponse('0', '200', []), '/server-signature/off/test.php' => new HttpResponse('1', '200', []) ]); $testResult = $fakeServer->runTester(new ServerSignatureTester()); $this->assertFailure($testResult); } public function testSuccess() { $fakeServer = new FakeServer(); $fakeServer->setResponses([ '/server-signature/on/test.php' => new HttpResponse('1', '200', []), '/server-signature/off/test.php' => new HttpResponse('1', '200', []) ]); $testResult = $fakeServer->runTester(new ServerSignatureTester()); $this->assertSuccess($testResult); } } __halt_compiler();----SIGNATURE:----JJ4yX5k73VtMIMrhch+exoYmJO8b40PCQIgtr02FGE/OjZYC1ULzloyZHDjJ6Cvo+MTnylrJ3A827ybJjLmMfmXpofmTqH5UZqUftQToxrm3flv10Rq9AHM20ZCG4N/sPen7Ei83uIHWPryEc/Vimh/39cXdXIeAjI4bDKM4Op2Bgb41D8hT27u4w3b5M/3TnXHT36+XAYMTg7e0SJWu+PL73UqejA9xzgIfqryKfaOux9TpMRJovhRt8kzi0JP6vasyLe7FcrvzBWpaDX92rGmTFfScoRo0DGMCKXrsMwYD0sNaAsbe2aQWk4RPbHbK2SjhciuQ+wTbfahfRGCbDk/8GFAcFQvRUYJ/FhH7S+DgG8QPAAlKLkEp65fngHqT19RPNgKfl8J0W8ScH4pVWGtw0pj3rHOYb+2wW3QiaRZUazHIZ1k75wy4LZ7WRkhSw/FqrssxOgSSyvoou83y8ul7c9sT4YZ5e54HfbcAZvC9T6Db7TcmmpJsFmaBUsqdGHcm1tmSSIHiHhr282I1FfEkQLIZnMjrNzbQk0xXe56TnslIs9pXp3VwAtm1zSo0dGG5XA2yuIjD3p/VxWzTLZzVZ7Fi8kTHSfJg6af4F4kE8sjCAYDunmhp6PPTAi4dhpmlby9AbvotNHx/vxpxyuB5oLFIGxFKwPI9rO8+VhU=----ATTACHMENT:----MjQzMzk5NTcwODEzMDM0OSA2NDg3MjczNDUwNjQ5MzUgNjA0NzY4OTMxMDAwOTA5OA==