silverstripe-environmentcheck/tests/checks/ExternalURLCheckTest.php

22 lines
515 B
PHP
Raw Normal View History

2015-09-10 23:13:48 +02:00
<?php
/**
* @mixin PHPUnit_Framework_TestCase
*/
2015-11-21 07:18:35 +01:00
class ExternalURLCheckTest extends SapphireTest
{
public function testCheckReportsMissingPages()
{
$this->markTestSkipped('ExternalURLCheck seems faulty on some systems');
2015-09-10 23:13:48 +02:00
2015-11-21 07:18:35 +01:00
$check = new ExternalURLCheck('http://missing-site/');
2015-09-10 23:13:48 +02:00
2015-11-21 07:18:35 +01:00
$expected = array(
EnvironmentCheck::ERROR,
'Success retrieving "http://missing-site/" (Code: 404)',
);
2015-09-10 23:13:48 +02:00
2015-11-21 07:18:35 +01:00
$this->assertEquals($expected, $check->check());
}
2015-09-10 23:13:48 +02:00
}