Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3780916
D577.id1400.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
D577.id1400.diff
View Options
diff --git a/tests/prod-environment-behaves-correctly/AuthGroveTest.php b/tests/prod-environment-behaves-correctly/AuthGroveTest.php
new file mode 100644
--- /dev/null
+++ b/tests/prod-environment-behaves-correctly/AuthGroveTest.php
@@ -0,0 +1,28 @@
+<?php
+
+require_once 'traits/assertHttp.php';
+
+class AuthGroveTest extends PHPUnit_Framework_TestCase {
+ use assertHttp;
+
+ public function testRedirections () {
+ $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.");
+ }
+
+ public function testAlive () {
+ $url = 'https://login.nasqueron.org/status';
+ $this->assertHttpResponseCode(200, $url);
+ $this->assertSame('ALIVE', file_get_contents($url));
+ }
+
+ public function testHomepage () {
+ $content = file_get_contents('https://login.nasqueron.org');
+ $this->assertContains('https://login.nasqueron.org/auth/', $content);
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 17:44 (2 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264905
Default Alt Text
D577.id1400.diff (1 KB)
Attached To
Mode
D577: Test Auth Grove (login.nasqueron.org)
Attached
Detach File
Event Timeline
Log In to Comment