SQLLoggerCollectorOptionsTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testSetGetSQLLogger() 0 8 1
A testSetGetConfiguration() 0 8 1
A testSetGetName() 0 9 1
1
<?php
2
3
namespace DoctrineORMModuleTest\Options;
4
5
use PHPUnit\Framework\TestCase;
6
use DoctrineORMModule\Options\SQLLoggerCollectorOptions;
7
8
class SQLLoggerCollectorOptionsTest extends TestCase
9
{
10
    public function testSetGetSQLLogger()
11
    {
12
        $options = new SQLLoggerCollectorOptions();
13
        $options->setSqlLogger('sql-logger-name');
14
        $this->assertSame('sql-logger-name', $options->getSqlLogger());
0 ignored issues
show
Bug introduced by
The method assertSame() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
15
        $options->setSqlLogger(null);
16
        $this->assertNull($options->getSqlLogger());
0 ignored issues
show
Bug introduced by
The method assertNull() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
17
    }
18
19
    public function testSetGetConfiguration()
20
    {
21
        $options = new SQLLoggerCollectorOptions();
22
        $options->setConfiguration('configuration-name');
23
        $this->assertSame('configuration-name', $options->getConfiguration());
0 ignored issues
show
Bug introduced by
The method assertSame() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
24
        $options->setConfiguration(null);
25
        $this->assertSame('doctrine.configuration.orm_default', $options->getConfiguration());
0 ignored issues
show
Bug introduced by
The method assertSame() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
26
    }
27
28
    public function testSetGetName()
29
    {
30
        $options = new SQLLoggerCollectorOptions();
31
        $this->assertSame('orm_default', $options->getName()); // testing defaults too!
0 ignored issues
show
Bug introduced by
The method assertSame() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
32
        $options->setName('collector-name');
33
        $this->assertSame('collector-name', $options->getName());
0 ignored issues
show
Bug introduced by
The method assertSame() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
34
        $options->setName(null);
35
        $this->assertSame('', $options->getName());
0 ignored issues
show
Bug introduced by
The method assertSame() does not seem to exist on object<DoctrineORMModule...erCollectorOptionsTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
36
    }
37
}
38