generateVariations() public method

If any of the operations fail Imbo will trigger errors
public generateVariations ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface
Beispiel #1
0
 /**
  * @covers Imbo\EventListener\ImageVariations::generateVariations
  * @expectedException PHPUnit_Framework_Error
  * @expectedExceptionMessage Could not store image variation metadata for pubkey (imgid), width: 512
  */
 public function testGenerateVariationsTriggersWarningOnDatabaseException()
 {
     $this->imageModel->method('getWidth')->willReturn(1024);
     $this->db->expects($this->once())->method('storeImageVariationMetadata')->will($this->throwException(new DatabaseException()));
     $this->listener->generateVariations($this->event);
 }