Passed
Push — release/v2 ( 19bb7e...119cbe )
by Benoit
02:55
created

TypeTest.php$0 ➔ getType()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JBen87\ParsleyBundle\Tests\Constraint\Constraints;
4
5
use JBen87\ParsleyBundle\Constraint\Constraints as ParsleyAssert;
6
use JBen87\ParsleyBundle\Exception\ConstraintException;
7
8
class TypeTest extends ConstraintTestCase
9
{
10
    public function testNormalization(): void
11
    {
12
        $constraint = new class extends ParsleyAssert\Type
13
        {
14
            /**
15
             * @inheritdoc
16
             */
17
            protected function getType(): string
18
            {
19
                return 'foo';
20
            }
21
        };
22
23
        $this->expectException(ConstraintException::class);
24
        $constraint->normalize($this->normalizer);
25
    }
26
}
27