/**
  * @since 2.4
  *
  * @param Store $store
  * @param CompositePropertyTableDiffIterator $compositePropertyTableDiffIterator
  *
  * @return EntityIdListRelevanceDetectionFilter
  */
 public function newEntityIdListRelevanceDetectionFilter(Store $store, CompositePropertyTableDiffIterator $compositePropertyTableDiffIterator)
 {
     $entityIdListRelevanceDetectionFilter = new EntityIdListRelevanceDetectionFilter($store, $compositePropertyTableDiffIterator);
     $entityIdListRelevanceDetectionFilter->setPropertyExemptionlist(ApplicationFactory::getInstance()->getSettings()->get('smwgQueryDependencyPropertyExemptionlist'));
     $entityIdListRelevanceDetectionFilter->setAffiliatePropertyDetectionlist(ApplicationFactory::getInstance()->getSettings()->get('smwgQueryDependencyAffiliatePropertyDetectionlist'));
     return $entityIdListRelevanceDetectionFilter;
 }
 public function testgetFilteredIdListOnExemptedUserdefinedProperty()
 {
     $orderedDiffByTable = array('fpt_foo' => array('insert' => array(array('p_id' => 100, 's_id' => 201, 'o_serialized' => '1/2016/6/1/11/1/48/0', 'o_sortkey' => '2457540.9595833')), 'delete' => array(array('p_id' => 100, 's_id' => 201, 'o_serialized' => '1/2016/6/1/11/1/59/0', 'o_sortkey' => '2457540.9582292'))));
     $idTable = $this->getMockBuilder('\\stdClass')->setMethods(array('getDataItemById'))->getMock();
     $idTable->expects($this->any())->method('getDataItemById')->with($this->equalTo(100))->will($this->returnValue(DIWikiPage::newFromText('Has date', SMW_NS_PROPERTY)));
     $store = $this->getMockBuilder('\\SMW\\SQLStore\\SQLStore')->disableOriginalConstructor()->setMethods(array('getObjectIds'))->getMockForAbstractClass();
     $store->expects($this->any())->method('getObjectIds')->will($this->returnValue($idTable));
     $compositePropertyTableDiffIterator = $this->getMockBuilder('\\SMW\\SQLStore\\CompositePropertyTableDiffIterator')->disableOriginalConstructor()->setMethods(array('getCombinedIdListOfChangedEntities', 'getOrderedDiffByTable'))->getMock();
     $compositePropertyTableDiffIterator->expects($this->once())->method('getCombinedIdListOfChangedEntities')->will($this->returnValue(array(100, 201, 1001)));
     $compositePropertyTableDiffIterator->expects($this->any())->method('getOrderedDiffByTable')->will($this->returnValue($orderedDiffByTable));
     $instance = new EntityIdListRelevanceDetectionFilter($store, $compositePropertyTableDiffIterator);
     $instance->setPropertyExemptionlist(array('Has date'));
     $this->assertEquals(array(1001), $instance->getFilteredIdList());
 }