コード例 #1
0
 public function testGetRequestOptions()
 {
     $store = $this->getMockBuilder('\\SMW\\Store')->disableOriginalConstructor()->getMockForAbstractClass();
     $printRequest = $this->getMockBuilder('\\SMW\\Query\\PrintRequest')->disableOriginalConstructor()->getMock();
     $printRequest->expects($this->any())->method('getParameter')->will($this->returnValue(42));
     $instance = new ResultFieldMatchFinder($store, $printRequest);
     $this->assertInstanceOf('SMW\\RequestOptions', $instance->getRequestOptions());
 }
コード例 #2
0
 /**
  * Make a request option object based on the given parameters, and
  * return NULL if no such object is required. The parameter defines
  * if the limit should be taken into account, which is not always desired
  * (especially if results are to be cached for future use).
  *
  * @param boolean $useLimit
  *
  * @return SMWRequestOptions|null
  */
 protected function getRequestOptions($useLimit = true)
 {
     return $this->resultFieldMatchFinder->getRequestOptions($useLimit);
 }