/**
  * @dataProvider queryDataProvider
  */
 public function testCreateProfile(array $rawParams, array $expected)
 {
     list($query, $formattedParams) = SMWQueryProcessor::getQueryAndParamsFromFunctionParams($rawParams, SMW_OUTPUT_WIKI, SMWQueryProcessor::INLINE_QUERY, false);
     $queryProfilerFactory = new QueryProfilerFactory();
     $jointProfileAnnotator = $queryProfilerFactory->newJointProfileAnnotator(Title::newFromText(__METHOD__), $query, $formattedParams['format']->getValue());
     $jointProfileAnnotator->addAnnotation();
     $this->assertInstanceOf('\\SMW\\SemanticData', $jointProfileAnnotator->getContainer()->getSemanticData());
     $this->semanticDataValidator->assertThatPropertiesAreSet($expected, $jointProfileAnnotator->getContainer()->getSemanticData());
 }
 public function testConstructJointProfileAnnotator()
 {
     $description = $this->getMockBuilder('\\SMW\\Query\\Language\\Description')->disableOriginalConstructor()->getMock();
     $title = $this->getMockBuilder('\\Title')->disableOriginalConstructor()->getMock();
     $query = $this->getMockBuilder('\\SMWQuery')->disableOriginalConstructor()->getMock();
     $query->expects($this->once())->method('getDescription')->will($this->returnValue($description));
     $instance = new QueryProfilerFactory();
     $this->assertInstanceOf('\\SMW\\Query\\Profiler\\ProfileAnnotator', $instance->newJointProfileAnnotator($title, $query, ''));
 }