Page MenuHomeDevCentral

D1809.diff
No OneTemporary

D1809.diff

diff --git a/AuthGroveTest.php b/AuthGroveTest.php
--- a/AuthGroveTest.php
+++ b/AuthGroveTest.php
@@ -5,13 +5,8 @@
class AuthGroveTest extends PHPUnit\Framework\TestCase {
use assertHttp;
- public function testRedirections () {
+ public function testTLS () {
$this->assertHttpResponseCode(301, 'http://login.nasqueron.org', 'Webserver should be configured to redirect http to https.');
- $this->assertHttpResponseCode(302, 'https://login.nasqueron.org', '/ should redirect to login page');
- $this->assertHttpResponseCode(404, 'https://login.nasqueron.org/notexisting', 'A 404 code were expected for a not existing page.');
- }
-
- public function testSSL () {
$this->assertHttpResponseCode(200, 'https://login.nasqueron.org/auth/login', "Auth Grove HTTPS login page isn't reachable.");
}
@@ -23,8 +18,13 @@
public function testHomepage () {
$url = 'https://login.nasqueron.org';
- $this->assertHttpResponseCode(200, $url);
+ $this->assertHttpResponseCode(302, $url, '/ should redirect to login page');
+
$content = file_get_contents($url);
$this->assertContains('https://login.nasqueron.org/auth/', $content);
}
+
+ public function testNotExisting () {
+ $this->assertHttpResponseCode(404, 'https://login.nasqueron.org/notexisting', 'A 404 code were expected for a not existing page.');
+ }
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 23:49 (19 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249937
Default Alt Text
D1809.diff (1 KB)

Event Timeline