/**
  * @since 2.1
  *
  * @param Title $title
  * @param Query $query
  * @param string $format
  * @param integer|null $duration
  *
  * @return ProfileAnnotator
  */
 public function newJointProfileAnnotator(Title $title, Query $query, $format, $duration = null)
 {
     $profiler = new NullProfile(new Subobject($title), $query->getHash());
     $profiler = new DescriptionProfile($profiler, $query->getDescription());
     $profiler = new FormatProfile($profiler, $format);
     $profiler = new DurationProfile($profiler, $duration);
     return $profiler;
 }
示例#2
0
 public function testGetHash()
 {
     $description = $this->getMockForAbstractClass('\\SMW\\Query\\Language\\Description');
     $instance = new Query($description, Query::INLINE_QUERY);
     $instance->setLimit(50);
     $hash = $instance->getHash();
     $this->assertInternalType('string', $hash);
     $instance->setLimit(100);
     $this->assertNotEquals($hash, $instance->getHash());
 }