/**
  * @dataProvider dataItemDataProvider
  */
 public function testDetectChanges($storeValues, $dataValues, $propertiesToCompare, $expected)
 {
     $this->storeValues = $storeValues;
     $subject = new DIWikiPage(__METHOD__, SMW_NS_PROPERTY);
     $updateDispatcherJob = $this->getMockBuilder('SMW\\MediaWiki\\Jobs\\UpdateDispatcherJob')->disableOriginalConstructor()->getMock();
     $expectedToRun = $expected['job'] ? $this->once() : $this->never();
     $updateDispatcherJob->expects($expectedToRun)->method('run')->will($this->returnValue($subject));
     $jobFactory = $this->getMockBuilder('SMW\\MediaWiki\\Jobs\\JobFactory')->disableOriginalConstructor()->getMock();
     $jobFactory->expects($this->any())->method('newUpdateDispatcherJob')->will($this->returnValue($updateDispatcherJob));
     $this->applicationFactory->registerObject('JobFactory', $jobFactory);
     $store = $this->getMockBuilder('SMW\\Store')->disableOriginalConstructor()->setMethods(array('getPropertyValues'))->getMockForAbstractClass();
     $store->expects($this->atLeastOnce())->method('getPropertyValues')->will($this->returnCallback(array($this, 'mockStorePropertyValuesCallback')));
     $semanticData = $this->getMockBuilder('\\SMW\\SemanticData')->disableOriginalConstructor()->getMock();
     $semanticData->expects($this->atLeastOnce())->method('getSubject')->will($this->returnValue($subject));
     $semanticData->expects($this->atLeastOnce())->method('getPropertyValues')->will($this->returnValue($dataValues));
     $instance = new PropertySpecificationChangeNotifier($store, $semanticData);
     $instance->compareWith($propertiesToCompare);
     $this->assertEquals($expected['diff'], $instance->hasDiff());
 }