Test Failed
Push — 1.0.0-dev ( f8836a...d20bd6 )
by nguereza
04:07
created

CommonTest::testVsStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 5
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
1
<?php 
2
3
	use PHPUnit\Framework\TestCase;
4
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
	}