Example #1
0
 public function testShouldThumbnail()
 {
     $resource = $this->getMockBuilder('Imanee\\ImageResource\\GDResource')->setMethods(['thumbnail'])->getMock();
     $resource->expects($this->at(0))->method('thumbnail')->with(200, 200);
     $resource->expects($this->at(1))->method('thumbnail')->with(200, 200, true);
     $this->model->setResource($resource);
     $this->model->thumbnail(200, 200);
     $this->model->thumbnail(200, 200, true);
 }
Example #2
0
 public function testShouldNotThumbnailWhenImageIsSmallerThanBoxAndStretchIsFalse()
 {
     $resource = $this->getMockBuilder('Imanee\\ImageResource\\GDResource')->setMethods(['thumbnail'])->getMock();
     $resource->expects($this->never())->method('thumbnail');
     $this->model->setResource($resource);
     $this->model->thumbnail(1200, 1200, false, false);
 }