Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56329715
AuthGroveTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AuthGroveTest.php
View Options
<?php
require_once
'traits/assertHttp.php'
;
class
AuthGroveTest
extends
PHPUnit\Framework\TestCase
{
use
assertHttp
;
public
function
testTLS
()
{
$this
->
assertHttpResponseCode
(
301
,
'http://login.nasqueron.org'
,
'Webserver should be configured to redirect http to https.'
);
$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
()
{
$url
=
'https://login.nasqueron.org'
;
$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/x-php
Expires
Sat, Nov 7, 02:41 (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4250730
Default Alt Text
AuthGroveTest.php (1 KB)
Attached To
Mode
rTESTSPRODENV Test suite for operations: prod-environment-behaves-correctly
Attached
Detach File
Event Timeline
Log In to Comment