ConfigurationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDocumentNamespace() 0 13 1
1
<?php
2
3
namespace Doctrine\Tests\ODM\CouchDB;
4
5
class ConfigurationTest extends CouchDBTestCase
6
{
7
    public function testDocumentNamespace()
8
    {
9
        $config = new \Doctrine\ODM\CouchDB\Configuration();
10
11
        $config->addDocumentNamespace('foo', 'Documents\Bar');
12
        $this->assertEquals('Documents\Bar', $config->getDocumentNamespace('foo'));
13
14
        $config->setDocumentNamespaces(array('foo' => 'Documents\Bar'));
15
        $this->assertEquals('Documents\Bar', $config->getDocumentNamespace('foo'));
16
17
        $this->setExpectedException('Doctrine\ODM\CouchDB\CouchDBException');
18
        $config->getDocumentNamespace('bar');
19
    }
20
}