mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
29 lines
561 B
PHP
29 lines
561 B
PHP
<?php
|
|
|
|
/**
|
|
* @mixin PHPUnit_Framework_TestCase
|
|
*/
|
|
class HasClassCheckTest extends SapphireTest {
|
|
public function testCheckReportsMissingClasses() {
|
|
$check = new HasClassCheck('foo');
|
|
|
|
$expected = array(
|
|
EnvironmentCheck::ERROR,
|
|
'Class foo doesn\'t exist',
|
|
);
|
|
|
|
$this->assertEquals($expected, $check->check());
|
|
}
|
|
|
|
public function testCheckReportsFoundClasses() {
|
|
$check = new HasClassCheck('stdClass');
|
|
|
|
$expected = array(
|
|
EnvironmentCheck::OK,
|
|
'Class stdClass exists',
|
|
);
|
|
|
|
$this->assertEquals($expected, $check->check());
|
|
}
|
|
}
|