예제 #1
0
 /**
  * @covers ::delete
  */
 public function testDelete()
 {
     $this->entity->id = $this->randomMachineName();
     $storage = $this->getMock('\\Drupal\\Core\\Entity\\EntityStorageInterface');
     // Testing the argument of the delete() method consumes too much memory.
     $storage->expects($this->once())->method('delete');
     $this->entityManager->expects($this->once())->method('getStorage')->with($this->entityTypeId)->will($this->returnValue($storage));
     $this->entity->delete();
 }