2015-06-26 12:03:42 -04:00
|
|
|
<?php
|
|
|
|
|
2015-09-15 13:19:29 -04:00
|
|
|
use \Aviat\AnimeClient\Config;
|
2015-06-26 16:39:10 -04:00
|
|
|
|
2015-06-26 12:03:42 -04:00
|
|
|
class ConfigTest extends AnimeClient_TestCase {
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->config = new Config([
|
2015-09-14 10:54:50 -04:00
|
|
|
'foo' => 'bar',
|
2015-09-14 15:49:20 -04:00
|
|
|
'asset_path' => '/assets',
|
2015-09-14 10:54:50 -04:00
|
|
|
'bar' => 'baz'
|
2015-06-26 12:03:42 -04:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConfig__get()
|
|
|
|
{
|
2015-07-02 14:04:04 -04:00
|
|
|
$this->assertEquals($this->config->foo, $this->config->__get('foo'));
|
2015-06-26 12:03:42 -04:00
|
|
|
$this->assertEquals($this->config->bar, $this->config->__get('bar'));
|
2015-07-02 14:04:04 -04:00
|
|
|
$this->assertEquals(NULL, $this->config->baz);
|
2015-06-26 12:03:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetNonExistentConfigItem()
|
|
|
|
{
|
|
|
|
$this->assertEquals(NULL, $this->config->foobar);
|
|
|
|
}
|
|
|
|
}
|