コード例 #1
0
 public function testPushUpdatesDirectlyWhenExecutedFromCommandLine()
 {
     $this->searchTableUpdater->expects($this->atLeastOnce())->method('isEnabled')->will($this->returnValue(true));
     $compositePropertyTableDiffIterator = $this->getMockBuilder('\\SMW\\SQLStore\\CompositePropertyTableDiffIterator')->disableOriginalConstructor()->getMock();
     $compositePropertyTableDiffIterator->expects($this->once())->method('getTableChangeOps')->will($this->returnValue(array()));
     $compositePropertyTableDiffIterator->expects($this->never())->method('getSubject');
     $deferredRequestDispatchManager = $this->getMockBuilder('\\SMW\\DeferredRequestDispatchManager')->disableOriginalConstructor()->getMock();
     $instance = new TextByChangeUpdater($this->connection, $this->searchTableUpdater, $this->textSanitizer, $this->transitionalDiffStore);
     $instance->asDeferredUpdate(true);
     $instance->isCommandLineMode(true);
     $instance->pushUpdates($compositePropertyTableDiffIterator, $deferredRequestDispatchManager, $this->slot);
 }