| Total Complexity | 8 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 5 | class CommonTest extends TestCase |
||
| 6 | { |
||
| 7 | |||
| 8 | public static function setUpBeforeClass() |
||
| 9 | { |
||
| 10 | |||
| 11 | } |
||
| 12 | |||
| 13 | public static function tearDownAfterClass() |
||
| 14 | { |
||
| 15 | |||
| 16 | } |
||
| 17 | |||
| 18 | protected function setUp() |
||
| 19 | { |
||
| 20 | } |
||
| 21 | |||
| 22 | protected function tearDown() |
||
| 23 | { |
||
| 24 | } |
||
| 25 | |||
| 26 | |||
| 27 | public function testFunctionGetConfigKeyNotExist(){ |
||
| 28 | $key = 'foo'; |
||
| 29 | $cfg = get_config($key); |
||
| 30 | $this->assertNull($cfg); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testFunctionGetConfigKeyNotExistUsingDefaultValue(){ |
||
| 34 | $key = 'foo'; |
||
| 35 | $expected = 'bar'; |
||
| 36 | $cfg = get_config($key, $expected); |
||
| 37 | $this->assertEquals($cfg, $expected); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function testFunctionGetConfigAfterSet(){ |
||
| 41 | $key = 'foo'; |
||
| 42 | $expected = 'bar'; |
||
| 43 | $c = new Config(); |
||
| 44 | $c->init(); |
||
| 45 | $c->set($key, $expected); |
||
| 46 | $cfg = get_config($key); |
||
| 47 | $this->assertEquals($cfg, $expected); |
||
| 48 | } |
||
| 49 | |||
| 50 | public function testVsStream(){ |
||
| 57 | |||
| 58 | |||
| 59 | } |
||
| 60 | } |