/**
  * @since 2.0
  *
  * @return true
  */
 public function process()
 {
     $settings = ApplicationFactory::getInstance()->getSettings();
     $deleteSubjectJob = new DeleteSubjectJob($this->wikiPage->getTitle(), array('asDeferredJob' => $settings->get('smwgDeleteSubjectAsDeferredJob'), 'withAssociates' => $settings->get('smwgDeleteSubjectWithAssociatesRefresh')));
     $deleteSubjectJob->execute();
     return true;
 }
 /**
  * @return DeleteSubjectJob
  */
 private function acquireInstance(Title $title = null, $settings = array())
 {
     if ($title === null) {
         $title = Title::newFromText(__METHOD__);
     }
     $defaultSettings = array('smwgCacheType' => 'hash', 'smwgEnableUpdateJobs' => false, 'smwgDeleteSubjectAsDeferredJob' => false, 'smwgDeleteSubjectWithAssociatesRefresh' => false);
     $settings = Settings::newFromArray(array_merge($defaultSettings, $settings));
     $semanticData = new SemanticData(DIWikiPage::newFromTitle($title));
     $mockStore = $this->getMockBuilder('\\SMW\\Store')->disableOriginalConstructor()->setMethods(array('deleteSubject', 'getSemanticData', 'getProperties', 'getInProperties'))->getMockForAbstractClass();
     $mockStore->expects($this->once())->method('deleteSubject')->will($this->returnCallback(array($this, 'mockStoreDeleteSubjectCallback')));
     $mockStore->expects($this->any())->method('getSemanticData')->will($this->returnValue($semanticData));
     $mockStore->expects($this->any())->method('getProperties')->will($this->returnValue(array()));
     $mockStore->expects($this->any())->method('getInProperties')->will($this->returnValue(array()));
     ApplicationFactory::getInstance()->registerObject('Store', $mockStore);
     ApplicationFactory::getInstance()->registerObject('Settings', $settings);
     $parameters = array('asDeferredJob' => $settings->get('smwgDeleteSubjectAsDeferredJob'), 'withAssociates' => $settings->get('smwgDeleteSubjectWithAssociatesRefresh'));
     $instance = new DeleteSubjectJob($title, $parameters);
     $instance->setJobQueueEnabledState(false);
     return $instance;
 }