Completed
Push — master ( e5e771...ea902a )
by Thomas
02:47
created

RegistryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetUnsetValue() 0 5 1
A testGetExistingValue() 0 8 1
1
<?php
2
3
namespace Owncloud\Updater\Tests\Utils;
4
5
use Owncloud\Updater\Utils\Registry;
6
7
class RegistryTest extends \PHPUnit_Framework_TestCase {
8
	public function testGetUnsetValue(){
9
		$registry = new Registry();
10
		$value = $registry->get('random_key');
11
		$this->assertNull($value);
12
	}
13
14
	public function testGetExistingValue(){
15
		$data = ['someKey' => 'someValue' ];
16
		$registry = new Registry();
17
		$registry->set('key', $data);
18
		$value = $registry->get('key');
19
20
		$this->assertEquals($data, $value);
21
	}
22
23
}
24