HummingBirdAnimeClient/tests/AnimeClient/ConfigTest.php

27 lines
566 B
PHP
Raw Normal View History

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