mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
b9af2d0734
Remove PHP 5.5 from Travis configuration. Dotenv used for environment management now, examples and tests updated to use putenv instead of define. Logger alias update to LoggerInterface. Update mutable config API calls. Replace array declaration with short version: []. Update license year.
30 lines
633 B
PHP
30 lines
633 B
PHP
<?php
|
|
|
|
namespace SilverStripe\EnvironmentCheck\Tests\Checks;
|
|
|
|
use SilverStripe\EnvironmentCheck\Checks\URLCheck;
|
|
use SilverStripe\EnvironmentCheck\EnvironmentCheck;
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
/**
|
|
* Class URLCheckTest
|
|
*
|
|
* @mixin PHPUnit_Framework_TestCase
|
|
*
|
|
* @package environmentcheck
|
|
*/
|
|
class URLCheckTest extends SapphireTest
|
|
{
|
|
public function testCheckReportsMissingPages()
|
|
{
|
|
$check = new URLCheck('foo', 'bar');
|
|
|
|
$expected = [
|
|
EnvironmentCheck::ERROR,
|
|
'Error retrieving "foo" (Code: 404)'
|
|
];
|
|
|
|
$this->assertEquals($expected, $check->check());
|
|
}
|
|
}
|