Completed
Push — master ( 0e466a...c81f6c )
by mw
06:27
created

TemplateBuilderTest::testCanConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SRF\Tests\Outline;
4
5
use SRF\Outline\TemplateBuilder;
6
7
/**
8
 * @covers \SRF\Outline\TemplateBuilder
9
 * @group semantic-result-formats
10
 *
11
 * @license GNU GPL v2+
12
 * @since 3.1
13
 *
14
 * @author mwjames
15
 */
16
class TemplateBuilderTest extends \PHPUnit_Framework_TestCase {
17
18
	public function testCanConstruct() {
19
20
		$this->assertInstanceOf(
21
			TemplateBuilder::class,
22
			new TemplateBuilder( [] )
23
		);
24
	}
25
26
	public function tesBuild() {
27
28
		$params = [
29
			'outlineproperties' => [ 'Foo' ],
30
			'template' => 'Bar',
31
			'userparam' => ''
32
		];
33
34
		$instance = new TemplateBuilder( $params );
0 ignored issues
show
Unused Code introduced by mwjames
$instance is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
35
	}
36
37
}
38