Completed
Push — master ( 04f40e...f278b5 )
by Tobias
05:43
created

DescriptionTest::testExtract()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
dl 9
loc 9
c 0
b 0
f 0
rs 9.6666
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;
13
14
use Translation\Extractor\Tests\Resources\Php\Symfony\DescriptionType;
15
use Translation\Extractor\Visitor\Php\Symfony\FormTypeLabelExplicit;
16
17
final class DescriptionTest extends BasePHPVisitorTest
18
{
19 View Code Duplication
    public function testExtract()
0 ignored issues
show
Duplication introduced by
This method 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...
20
    {
21
        $collection = $this->getSourceLocations(new FormTypeLabelExplicit(), DescriptionType::class);
22
23
        $this->assertCount(1, $collection);
24
        $source = $collection->first();
25
        $this->assertEquals('test_label', $source->getMessage());
26
        $this->assertEquals('Foobar:', $source->getContext()['desc']);
27
    }
28
}
29