public function testGetImagesWithStartAndEndTimestamps()
{
list($start, $end) = $this->insertImages();
$model = new Images();
$user = 'user';
// Fetch to the timestamp of when the last image was added
$query = new Query();
$query->to($end);
$this->assertCount(6, $this->adapter->getImages([$user], $query, $model));
$this->assertSame(6, $model->getHits());
// Fetch until the second the first image was added
$query = new Query();
$query->to($start);
$this->assertCount(1, $this->adapter->getImages([$user], $query, $model));
$this->assertSame(1, $model->getHits());
// Fetch from the second the first image was added
$query = new Query();
$query->from($start);
$this->assertCount(6, $this->adapter->getImages([$user], $query, $model));
$this->assertSame(6, $model->getHits());
// Fetch from the second the last image was added
$query = new Query();
$query->from($end);
$this->assertCount(1, $this->adapter->getImages([$user], $query, $model));
$this->assertSame(1, $model->getHits());
}