public function testShouldTextGen() { $resource = $this->getMockBuilder('Imanee\\ImageResource\\GDResource')->setMethods(['getTextGeometry', 'createNew', 'setFormat', 'annotate'])->getMock(); $resource->expects($this->any())->method('getTextGeometry'); $resource->expects($this->once())->method('annotate'); $drawer = $this->getMockBuilder('Imanee\\Drawer')->setMethods(['getFontSize'])->getMock(); $drawer->expects($this->once())->method('getFontSize'); Imanee::textGen('Testing', $drawer, 'png', 'transparent', $resource); }