2017-01-04 23:16:12 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\EnvironmentCheck\Tests\Controllers;
|
|
|
|
|
|
|
|
use SilverStripe\Control\HTTPRequest;
|
|
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
use SilverStripe\EnvironmentCheck\Controllers\DevCheckController;
|
2017-03-21 11:57:07 +01:00
|
|
|
use SilverStripe\EnvironmentCheck\EnvironmentChecker;
|
2017-01-04 23:16:12 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class DevCheckControllerTest
|
|
|
|
*
|
|
|
|
* @mixin PHPUnit_Framework_TestCase
|
|
|
|
*
|
|
|
|
* @package environmentcheck
|
|
|
|
*/
|
|
|
|
class DevCheckControllerTest extends SapphireTest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $usesDatabase = true;
|
|
|
|
|
|
|
|
public function testIndexCreatesChecker()
|
|
|
|
{
|
|
|
|
$controller = new DevCheckController();
|
|
|
|
|
|
|
|
$request = new HTTPRequest('GET', 'example.com');
|
|
|
|
|
2017-03-21 11:57:07 +01:00
|
|
|
$this->assertInstanceOf(EnvironmentChecker::class, $controller->index($request));
|
2017-01-04 23:16:12 +01:00
|
|
|
}
|
|
|
|
}
|