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:----RwVmvTvrSNz1PgI3dN9VodqphhkcWVcOsqh+69UA0Nuqg+Xhq7sIMY874w5aJxecRKD521eH5z4eFbmHAiYY+r3MwDpuDkS16ifztiTxSgZbgDToeCCkFiKeQ6ZTRuEhBNBB99WlWJzJ8fYgzdB3h+GcyXUJ2KH0YRJ4jMQLtvdXbQMmsKUUsBlnUj2ix433CaAzJZv3+SHsBUEmI7w6xCouczNFYjc4HM3k/mJGYqrZMINEIElPqxERqWKETo01JGp5EzwC4xHR9Lu1o2EtemGBaFq+4YA/1iUcDYbdjVJ9OjLKRLnHb0R5i/2T26+nibgD04MZWj2Sue/3jpuQLsN3PTPDqmX5gwwZR2hI/o+sLxmOd82MTlEEr0wCHfrJPApfcO98W6h9Vj2pdgBcCPoEvAfLxBeep075IFHJtBvJRJu++ceQwZOVPjQMAayYr2mQbg584jWhQnT41qcysw4oNbkU22e5xcSCbjthrosH/Akm5qguJW2AEEsZpVJRnJ7ZBBY8UWtGBPiL+M4S9v+GT+aTAZNTzWoDjTOrbY/xKlZ/eyPMIGOwziuf+/NfB0avsPpKc13AMV5JYO9z4WL/qziilrzQfZstPkhthKIJi/eXkza5TVoKoqgy0kyRG6VIAhmzAShwkd3xFJKETk5RATPgWo1EOfx/+3rpwtA=----ATTACHMENT:----NjM5ODIzNjQ0ODY2NzI4NiA3MTkwMjUyMDQ4Mjk2NjM0IDkyMzQ3MTE1MzE5OTY4MDI=