Example #1
0
 public function testShouldSetAndGetFormat()
 {
     $resource = $this->getMockBuilder('Imanee\\ImageResource\\GDResource')->setMethods(['setFormat', 'getFormat'])->getMock();
     $resource->expects($this->once())->method('setFormat')->with('jpeg');
     $resource->expects($this->once())->method('getFormat')->will($this->returnValue('jpeg'));
     $this->model->setResource($resource);
     $this->model->setFormat('jpeg');
     $this->assertEquals('jpeg', $this->model->getFormat());
 }