Failed Conditions
Pull Request — master (#7688)
by Gabriel
09:49
created

GH6682Test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testIssue() 0 19 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\ORM\Functional\Ticket;
6
7
use Doctrine\ORM\Mapping\ClassMetadataInfo;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\Mapping\ClassMetadataInfo 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...
8
use Doctrine\Tests\OrmFunctionalTestCase;
9
10
final class GH6682Test extends OrmFunctionalTestCase
11
{
12
    /**
13
     * @group 6682
14
     */
15
    public function testIssue() : void
16
    {
17
        self::markTestIncomplete(
18
            '@guilhermeblanco, in #6683 we added allocationSize/initialValue as to the sequence definition but with the'
19
            . ' changes you have made I am not sure if we should rather test this relying on the mapping drivers instead'
20
        );
21
22
        $parsedDefinition = [
23
            'sequenceName'   => 'test_sequence',
24
            'allocationSize' => '',
25
            'initialValue'   => '',
26
        ];
27
28
        $classMetadataInfo = new ClassMetadataInfo('test_entity');
29
        $classMetadataInfo->setSequenceGeneratorDefinition($parsedDefinition);
30
31
        self::assertSame(
32
            ['sequenceName' => 'test_sequence', 'allocationSize' => '1', 'initialValue' => '1'],
33
            $classMetadataInfo->sequenceGeneratorDefinition
34
        );
35
    }
36
}
37