Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F32059015
TommyTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
791 B
Referenced Files
None
Subscribers
None
TommyTest.php
View Options
<?php
require_once
'traits/assertHttp.php'
;
class
TommyTest
extends
PHPUnit\Framework\TestCase
{
use
assertHttp
;
public
function
testIsLive
()
{
$this
->
assertHttpResponseCode
(
200
,
'https://builds.nasqueron.org'
,
'Tommy looks down.'
);
$this
->
assertHttpResponseCode
(
404
,
'https://builds.nasqueron.org/notexisting'
,
'A 404 code were expected for a not existing page.'
);
}
public
function
testAlive
()
{
$url
=
'https://builds.nasqueron.org/status'
;
$this
->
assertHttpResponseCode
(
200
,
$url
);
$this
->
assertSame
(
'ALIVE'
,
file_get_contents
(
$url
));
}
public
function
testDashboard
()
{
$content
=
file_get_contents
(
'https://builds.nasqueron.org'
);
$this
->
assertContains
(
'ci.nasqueron.org/job/'
,
$content
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 8, 08:03 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3783775
Default Alt Text
TommyTest.php (791 B)
Attached To
Mode
rTESTSPRODENV Test suite for operations: prod-environment-behaves-correctly
Attached
Detach File
Event Timeline
Log In to Comment