public function testMakeThrownExceptionWhenGivenFileIsNotAvailable() { list($storage) = $this->getMocks(); $instance = new ImageHandler($storage); $mockFile = m::mock('Xpressengine\\Storage\\File'); $mockFile->shouldReceive('getAttribute')->with('mime')->once()->andReturn('text/plain'); try { $instance->make($mockFile); $this->assertTrue(false); } catch (\Exception $e) { $this->assertInstanceOf('Xpressengine\\Media\\Exceptions\\NotAvailableException', $e); } }