Example #1
0
 public function testLogIfBatchNotDeletedForFilterOnRemove()
 {
     $s3 = $this->createAmazonS3Mock();
     $s3->expects($this->once())->method('delete_all_objects')->with('images.example.com', '/filter/i')->will($this->returnValue(false));
     $logger = $this->getMock('Psr\\Log\\LoggerInterface');
     $logger->expects($this->once())->method('error');
     $resolver = new AmazonS3Resolver($s3, 'images.example.com');
     $resolver->setLogger($logger);
     $resolver->remove(array(), array('filter'));
 }
 public function testClearIsDisabled()
 {
     $s3 = $this->getMock('AmazonS3');
     $s3->expects($this->never())->method('delete_object');
     $resolver = new AmazonS3Resolver($s3, 'images.example.com');
     $resolver->clear('');
 }