Completed
Push — master ( 9daec1...96bb84 )
by Tobias
01:26
created

FormEmptyValueTest::testExtract()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\extractor\tests\Functional\Visitor\Php\Symfony;
13
14
use Translation\Extractor\Tests\Functional\Visitor\Php\BasePHPVisitorTest;
15
use Translation\Extractor\Tests\Resources;
16
use Translation\Extractor\Visitor\Php\Symfony\FormTypeEmptyValue;
17
18
/**
19
 * @author Tobias Nyholm <[email protected]>
20
 */
21 View Code Duplication
class FormEmptyValueTest extends BasePHPVisitorTest
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
{
23
    public function testExtract()
24
    {
25
        $collection = $this->getSourceLocations(new FormTypeEmptyValue(), Resources\Php\Symfony\EmptyValueType::class);
26
27
        $this->assertCount(3, $collection);
28
29
        $this->assertEquals('gender.empty_value', $collection->get(0)->getMessage());
30
        $this->assertEquals('birthday.form.year', $collection->get(1)->getMessage());
31
        $this->assertEquals('birthday.form.month', $collection->get(2)->getMessage());
32
    }
33
}
34