Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750580
D1809.id4582.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1809.id4582.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 01:45 (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249937
Default Alt Text
D1809.id4582.diff (1 KB)
Attached To
Mode
D1809: Refactor tests for Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment