Completed
Push — master ( c9036e...5033a3 )
by Bartko
05:59
created

Zend2WithScopeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAdapter() 0 14 2
1
<?php
2
namespace StefanoTreeTest\Integration\Adapter;
3
4
use StefanoTree\NestedSet\Adapter\AdapterInterface as TreeAdapterInterface;
5
use StefanoTree\NestedSet\Adapter\Zend2 as NestedSetAdapter;
6
use StefanoTree\NestedSet\Options;
7
use StefanoTreeTest\TestUtil;
8
9
class Zend2WithScopeTest
10
    extends AdapterWithScopeTestAbstract
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
11
{
12
    /**
13
     * @return TreeAdapterInterface
14
     */
15
    protected function getAdapter()
16
    {
17
        $options = new Options(array(
18
            'tableName' => 'tree_traversal_with_scope',
19
            'idColumnName' => 'tree_traversal_id',
20
            'scopeColumnName' => 'scope',
21
        ));
22
23
        if ('pgsql' == TEST_STEFANO_DB_ADAPTER) {
24
            $options->setSequenceName('tree_traversal_with_scope_tree_traversal_id_seq');
25
        }
26
27
        return new NestedSetAdapter($options, TestUtil::getZend2DbAdapter());
28
    }
29
}
30