コード例 #1
0
 /**
  * Tests key() method.
  */
 public function testKey()
 {
     $this->syncStorage->expects($this->once())->method('getChunk')->will($this->returnValue([0 => ['document_id' => 11, 'type' => ActionTypes::DELETE]]));
     $iterator = new SyncStorageImportIterator(['sync_storage' => $this->syncStorage, 'shop_id' => 1, 'document_type' => 'product'], $this->elasticsearchRepository, $this->entityManager, 'Product');
     $iterator->next();
     $this->assertEquals(11, $iterator->key());
 }