public function testSyncRemove()
 {
     $this->eventObserverMock->expects($this->once())->method('getDataObject')->willReturn($this->salesModelMock);
     $this->salesModelMock->expects($this->once())->method('getId')->willReturn('sales-id-value');
     $this->gridAggregatorMock->expects($this->once())->method('purge')->with('sales-id-value');
     $this->unit->execute($this->eventObserverMock);
 }
 public function testAsyncInsertDisabled()
 {
     $this->scopeConfigurationMock->expects($this->once())->method('getValue')->with('dev/grid/async_indexing', 'default', null)->willReturn(false);
     $this->gridAggregatorMock->expects($this->never())->method('refreshBySchedule');
     $this->unit->asyncInsert();
 }
 public function testSyncInsertDisabled()
 {
     $this->scopeConfigurationMock->expects($this->once())->method('getValue')->with('dev/grid/async_indexing', 'default', null)->willReturn(true);
     $this->gridAggregatorMock->expects($this->never())->method('refresh')->with('sales-id-value');
     $this->unit->execute($this->eventObserverMock);
 }