Extends
lithium\test\Unit
Tests accessing library configurations.
Returns
voidSource
public function testLibraryConfigAccess() {
$result = Libraries::get('lithium');
$expected = array(
'path' => str_replace('\\', '/', realpath(realpath(LITHIUM_LIBRARY_PATH) . '/lithium')),
'prefix' => 'lithium\\',
'suffix' => '.php',
'loader' => 'lithium\\core\\Libraries::load',
'includePath' => false,
'transform' => null,
'bootstrap' => false,
'defer' => true,
'default' => false
);
if (!$this->hasApp) {
$expected['resources'] = sys_get_temp_dir();
$expected['default'] = true;
}
$this->assertEqual($expected, $result);
$this->assertNull(Libraries::get('foo'));
$result = Libraries::get();
$this->assertTrue(isset($result['lithium']));
$this->assertEqual($expected, $result['lithium']);
if ($this->hasApp) {
$this->assertTrue(isset($result['app']));
}
}