ManagerTest::test_driver_init_default()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 1
eloc 5
c 2
b 0
f 1
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
namespace Nip\Logger\Tests;
4
5
use Nip\Logger\Logger;
6
use Monolog\Logger as Monolog;
7
8
/**
9
 * Class ManagerTest
10
 * @package Nip\Logger\Tests
11
 */
12
class ManagerTest extends AbstractTest
13
{
14
    public function test_driver_init_default()
15
    {
16
        $manager = $this->generateBaseManager();
17
18
        $driver = $manager->driver();
19
        self::assertInstanceOf(Logger::class, $driver);
20
21
        $logger = $driver->getLogger();
0 ignored issues
show
Bug introduced by
The method getLogger() does not exist on Psr\Log\LoggerInterface. It seems like you code against a sub-type of Psr\Log\LoggerInterface such as Psr\Log\Test\TestLogger or Nip\Logger\Logger. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        /** @scrutinizer ignore-call */ 
22
        $logger = $driver->getLogger();
Loading history...
22
        self::assertInstanceOf(Monolog::class, $logger);
23
    }
24
}
25