2015-06-26 12:03:42 -04:00
|
|
|
<?php
|
|
|
|
|
2015-06-26 16:39:10 -04:00
|
|
|
use \AnimeClient\Config;
|
|
|
|
|
2015-06-26 12:03:42 -04:00
|
|
|
class ConfigTest extends AnimeClient_TestCase {
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->config = new Config([
|
|
|
|
'config' => [
|
|
|
|
'foo' => 'bar'
|
|
|
|
],
|
|
|
|
'base_config' => [
|
|
|
|
'bar' => 'baz'
|
|
|
|
]
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConfig__get()
|
|
|
|
{
|
|
|
|
$this->assertEquals($this->config->bar, $this->config->__get('bar'));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetNonExistentConfigItem()
|
|
|
|
{
|
|
|
|
$this->assertEquals(NULL, $this->config->foobar);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|