StoreNotInstalledTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A testPropertyTypeLookupThrowsExceptionWhenStoreNotInstalled() 0 4 1
1
<?php
2
3
namespace Tests\Queryr\EntityStore;
4
5
use Queryr\EntityStore\EntityStoreConfig;
6
use Queryr\EntityStore\EntityStoreFactory;
7
use Tests\Queryr\EntityStore\Fixtures\TestFixtureFactory;
8
use Wikibase\DataModel\Entity\PropertyId;
9
10
/**
11
 * @licence GNU GPL v2+
12
 * @author Jeroen De Dauw < [email protected] >
13
 */
14
class StoreNotInstalledTest extends \PHPUnit_Framework_TestCase {
15
16
	/**
17
	 * @var EntityStoreFactory
18
	 */
19
	private $factory;
20
21
	public function setUp() {
22
		$connection = TestFixtureFactory::newInstance()->newConnection();
23
		$config = new EntityStoreConfig();
24
25
		$this->factory = new EntityStoreFactory( $connection, $config );
26
	}
27
28
	public function testPropertyTypeLookupThrowsExceptionWhenStoreNotInstalled() {
29
		$this->setExpectedException( 'Queryr\EntityStore\PropertyTypeLookupException' );
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::setExpectedException() has been deprecated with message: Method deprecated since Release 5.2.0

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...
30
		$this->factory->newPropertyTypeLookup()->getTypeOfProperty( new PropertyId( 'P2'  ) );
31
	}
32
33
}
34