mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8dd644d25d
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
37 lines
916 B
PHP
37 lines
916 B
PHP
<?php
|
|
|
|
use SilverStripe\Core\Manifest\SS_ConfigStaticManifest;
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
|
|
class ConfigStaticManifestTest extends SapphireTest {
|
|
|
|
private static $testString = 'string';
|
|
|
|
private static $testArray = array('foo' => 'bar');
|
|
|
|
protected static $ignored = true;
|
|
|
|
public function testGet() {
|
|
$manifest = new SS_ConfigStaticManifest();
|
|
|
|
// Test madeup value
|
|
$this->assertNull($manifest->get(__CLASS__, 'madeup', null));
|
|
|
|
// Test string value
|
|
$this->assertEquals('string', $manifest->get(__CLASS__, 'testString'));
|
|
|
|
// Test array value
|
|
$this->assertEquals(array('foo' => 'bar'), $manifest->get(__CLASS__, 'testArray'));
|
|
|
|
// Test to ensure we're only picking up private statics
|
|
$this->assertNull($manifest->get(__CLASS__, 'ignored', null));
|
|
|
|
// Test madeup class
|
|
if(!class_exists('aonsffgrgx')) {
|
|
$this->assertNull($manifest->get('aonsffgrgx', 'madeup', null));
|
|
}
|
|
}
|
|
|
|
}
|