public function testFallsBackIfDatabaseDoesNotReturnAnyVariation()
{
$width = 1024;
$height = 768;
$transformations = [['name' => 'maxSize', 'params' => ['width' => 512]]];
$this->eventManager->expects($this->never())->method('trigger');
$this->imageModel->expects($this->once())->method('getWidth')->will($this->returnValue($width));
$this->imageModel->expects($this->once())->method('getHeight')->will($this->returnValue($height));
$this->request->expects($this->once())->method('getTransformations')->will($this->returnValue($transformations));
$this->db->expects($this->once())->method('getBestMatch')->with($this->user, $this->imageIdentifier, 512)->will($this->returnValue(null));
$this->listener->chooseVariation($this->event);
}