silverstripe-environmentcheck/tests/checks/URLCheckTest.php

20 lines
388 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 URLCheckTest extends SapphireTest
{
public function testCheckReportsMissingPages()
{
$check = new URLCheck('foo', 'bar');
2015-09-10 23:13:48 +02:00
2015-11-21 07:18:35 +01:00
$expected = array(
EnvironmentCheck::ERROR,
'Error retrieving "foo" (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
}