delete() public method

public delete ( $user, $imageIdentifier )
Exemplo n.º 1
0
 /**
  * @covers Imbo\Storage\GridFS::delete
  * @covers Imbo\Storage\GridFS::imageExists
  */
 public function testDeleteFile()
 {
     $file = $this->getMockBuilder('MongoGridFSFile')->disableOriginalConstructor()->getMock();
     $cursor = $this->getMockBuilder('MongoGridFSCursor')->disableOriginalConstructor()->getMock();
     $cursor->expects($this->once())->method('count')->will($this->returnValue(1));
     $cursor->expects($this->once())->method('getNext')->will($this->returnValue($file));
     $this->grid->expects($this->once())->method('find')->will($this->returnValue($cursor));
     $this->grid->expects($this->once())->method('delete');
     $this->driver->delete($this->publicKey, $this->imageIdentifier);
 }