@@ -118,7 +118,7 @@ class FileService implements IAttachmentService {
|
|||||||
$error = $phpFileUploadErrors[$file['error']];
|
$error = $phpFileUploadErrors[$file['error']];
|
||||||
}
|
}
|
||||||
if ($error !== null) {
|
if ($error !== null) {
|
||||||
throw new \RuntimeException($error);
|
throw new \Exception($error);
|
||||||
}
|
}
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class FileServiceTest extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \RuntimeException
|
* @expectedException \Exception
|
||||||
*/
|
*/
|
||||||
public function testCreateEmpty() {
|
public function testCreateEmpty() {
|
||||||
$attachment = $this->getAttachment();
|
$attachment = $this->getAttachment();
|
||||||
@@ -112,7 +112,7 @@ class FileServiceTest extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \RuntimeException
|
* @expectedException \Exception
|
||||||
*/
|
*/
|
||||||
public function testCreateError() {
|
public function testCreateError() {
|
||||||
$attachment = $this->getAttachment();
|
$attachment = $this->getAttachment();
|
||||||
|
|||||||
Reference in New Issue
Block a user