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

SourceLocationTest::testCreateHere()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
crap 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