store = $this->getMockBuilder( '\SMW\SQLStore\SQLStore' ) ->disableOriginalConstructor() ->getMock(); $connection = $this->getMockBuilder( '\SMW\MediaWiki\Connection\Database' ) ->disableOriginalConstructor() ->getMock(); $this->store->expects( $this->any() ) ->method( 'getConnection' ) ->willReturn( $connection ); } public function testCanConstruct() { $this->assertInstanceOf( QueryEngineFactory::class, new QueryEngineFactory( $this->store ) ); } public function testCanConstructConditionBuilder() { $instance = new QueryEngineFactory( $this->store ); $this->assertInstanceOf( '\SMW\SQLStore\QueryEngine\ConditionBuilder', $instance->newConditionBuilder() ); } public function testCanConstructQuerySegmentListProcessor() { $instance = new QueryEngineFactory( $this->store ); $this->assertInstanceOf( '\SMW\SQLStore\QueryEngine\QuerySegmentListProcessor', $instance->newQuerySegmentListProcessor() ); } public function testCanConstructQueryEngine() { $instance = new QueryEngineFactory( $this->store ); $this->assertInstanceOf( '\SMW\SQLStore\QueryEngine\QueryEngine', $instance->newQueryEngine() ); } public function testCanConstructConceptQuerySegmentBuilder() { $instance = new QueryEngineFactory( $this->store ); $this->assertInstanceOf( '\SMW\SQLStore\QueryEngine\ConceptQuerySegmentBuilder', $instance->newConceptQuerySegmentBuilder() ); } }