예제 #1
0
 public function testOutputDirNotFound()
 {
     $dir = $this->output_dir->url('thumbs');
     $service = new ImageService($this->imanee, $this->source_dir, $dir . '/test', new Filesystem());
     // test a valid resource
     $thumbnail = $service->thumbnail('valid.jpg', 100, 100, false);
     $this->assertContains('-100x100.jpeg', $thumbnail);
 }
예제 #2
0
 public function testNotFoundThumbnail()
 {
     $service = new ImageService($this->imanee, $this->source_dir, $this->output_dir->url('thumbs'), new Filesystem());
     // test a not-found resource
     try {
         $service->thumbnail('not-found.jpg', 100, 100, false);
     } catch (ImageNotFoundException $e) {
     }
     $this->assertNotEmpty($e);
 }