Add unit tests for new classes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -25,11 +25,12 @@ namespace OCA\Deck\Db;
|
||||
|
||||
use OCA\Deck\ArchivedItemException;
|
||||
use OCA\Deck\Controller\PageController;
|
||||
use OCA\Deck\InvalidAttachmentType;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\NotFoundException;
|
||||
use OCA\Deck\StatusException;
|
||||
|
||||
class ExceptionsTest extends \PHPUnit_Framework_TestCase {
|
||||
class ExceptionsTest extends \Test\TestCase {
|
||||
|
||||
public function testNoPermissionException() {
|
||||
$c = new \stdClass();
|
||||
@@ -49,6 +50,11 @@ class ExceptionsTest extends \PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals('foo', $e->getMessage());
|
||||
}
|
||||
|
||||
public function testInvalidAttachmentType() {
|
||||
$e = new InvalidAttachmentType('foo');
|
||||
$this->assertEquals('No matching IAttachmentService implementation found for type foo', $e->getMessage());
|
||||
}
|
||||
|
||||
public function testStatusException() {
|
||||
$e = new StatusException('foo');
|
||||
$this->assertEquals('foo', $e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user