delete() public method

public delete ( string $indexName, string $type, string $id ) : array
$indexName string
$type string
$id string
return array
 public function testWithPrefixedIndex()
 {
     $id = 12345;
     $data = ['id' => $id, 'name' => 'Harry Potter and the wizards'];
     // Make sure the document doesn't exist.
     if ($this->documentsManager->exists('books', 'books', $id)) {
         $this->documentsManager->delete('books', 'books', $id);
     }
     $this->documentsManager->index('books', 'books', $data);
     $this->assertTrue($this->documentsManager->exists('books', 'books', $id));
     $this->assertEquals($data, $this->documentsManager->get('books', 'books', $id)['_source']);
 }
 public function testUpdateOrIndex()
 {
     $id = 12345;
     // Make sure the document doesn't exist.
     if ($this->documentsManager->exists('movies', 'movies', $id)) {
         $this->documentsManager->delete('movies', 'movies', $id);
     }
     $this->documentsManager->updateOrIndex('movies', 'movies', $id, ['id' => $id, 'name' => 'Jurasic World', 'year' => 2014]);
     $this->assertTrue($this->documentsManager->exists('movies', 'movies', $id));
     $this->documentsManager->updateOrIndex('movies', 'movies', $id, ['id' => $id, 'name' => 'Jurasic World', 'year' => 2015]);
     $document = $this->documentsManager->get('movies', 'movies', $id);
     $this->assertEquals('2015', $document['_source']['year']);
 }