Completed
Push — master ( 5a4306...e82f42 )
by Tobias
02:36
created

SourceLocationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreateHere() 0 10 1
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\Unit\Model;
13
14
use Translation\Extractor\Model\SourceLocation;
15
16
class SourceLocationTest extends \PHPUnit_Framework_TestCase
17
{
18 1
    public function testCreateHere()
19
    {
20 1
        $location = SourceLocation::createHere('foobar', ['foo' => 'bar']);
21
22 1
        $this->assertContains('tests/Unit/Model/SourceLocationTest.php', $location->getPath());
23 1
        $this->assertEquals(20, $location->getLine());
24
25 1
        $this->assertEquals('foobar', $location->getMessage());
26 1
        $this->assertEquals(['foo' => 'bar'], $location->getContext());
27 1
    }
28
}
29