Tests for exceptions
This commit is contained in:
@@ -23,10 +23,12 @@
|
||||
|
||||
namespace OCA\Deck\Db;
|
||||
|
||||
use OCA\Deck\CardArchivedException;
|
||||
use OCA\Deck\Controller\PageController;
|
||||
use OCA\Deck\NoPermissionException;
|
||||
use OCA\Deck\NotFoundException;
|
||||
|
||||
class NoPermissionExceptionTest extends \PHPUnit_Framework_TestCase {
|
||||
class ExceptionsTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
public function testNoPermissionException() {
|
||||
$c = new \stdClass();
|
||||
@@ -34,4 +36,14 @@ class NoPermissionExceptionTest extends \PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals('stdClass#mymethod: not allowed', $e->getMessage());
|
||||
}
|
||||
|
||||
public function testNotFoundException() {
|
||||
$e = new NotFoundException('foo');
|
||||
$this->assertEquals('foo', $e->getMessage());
|
||||
}
|
||||
|
||||
public function testCardArchivedException() {
|
||||
$e = new CardArchivedException('foo');
|
||||
$this->assertEquals('foo', $e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user