ExecutionModeTest::testChangeAutoCommitStatus()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Tests\Driver\OCI8;
6
7
use Doctrine\DBAL\Driver\OCI8\ExecutionMode;
8
use PHPStan\Testing\TestCase;
0 ignored issues
show
Bug introduced by
The type PHPStan\Testing\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
final class ExecutionModeTest extends TestCase
11
{
12
    /** @var ExecutionMode */
13
    private $mode;
14
15
    protected function setUp() : void
16
    {
17
        $this->mode = new ExecutionMode();
18
    }
19
20
    public function testDefaultAutoCommitStatus() : void
21
    {
22
        self::assertTrue($this->mode->isAutoCommitEnabled());
23
    }
24
25
    public function testChangeAutoCommitStatus() : void
26
    {
27
        $this->mode->disableAutoCommit();
28
        self::assertFalse($this->mode->isAutoCommitEnabled());
29
30
        $this->mode->enableAutoCommit();
31
        self::assertTrue($this->mode->isAutoCommitEnabled());
32
    }
33
}
34