BuilderFactoryTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testNewSimpleItemBuilderReturnsCorrectType() 0 8 1
A testNewSimplePropertyBuilderReturnsCorrectType() 0 5 1
1
<?php
2
3
namespace Tests\Queryr\Resources\Builders;
4
5
use Queryr\Resources\Builders\BuilderFactory;
6
7
/**
8
 * @covers Queryr\Resources\Builders\BuilderFactory
9
 *
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class BuilderFactoryTest extends \PHPUnit_Framework_TestCase {
14
15
	public function testNewSimpleItemBuilderReturnsCorrectType() {
16
		$simpleItemBuilder = ( new BuilderFactory() )->newSimpleItemBuilder(
17
			'en',
18
			$this->getMock( 'Queryr\Resources\Builders\ResourceLabelLookup' )
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::getMock() has been deprecated with message: Method deprecated since Release 5.4.0; use createMock() or getMockBuilder() instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
19
		);
20
21
		$this->assertInstanceOf( 'Queryr\Resources\Builders\SimpleItemBuilder', $simpleItemBuilder );
22
	}
23
24
	public function testNewSimplePropertyBuilderReturnsCorrectType() {
25
		$simplePropertyBuilder = ( new BuilderFactory() )->newSimplePropertyBuilder( 'en' );
26
27
		$this->assertInstanceOf( 'Queryr\Resources\Builders\SimplePropertyBuilder', $simplePropertyBuilder );
28
	}
29
30
}
31