diff --git a/lib/Model/AbstractModel.php b/lib/Model/AbstractModel.php index 59edb10d..d7b5102f 100644 --- a/lib/Model/AbstractModel.php +++ b/lib/Model/AbstractModel.php @@ -88,7 +88,7 @@ abstract class AbstractModel public function setId($id) { if (!self::isValidId($id)) { - throw new Exception('Invalid paste ID.', 60); + throw new Exception('Invalid document ID.', 60); } $this->_id = $id; } @@ -129,14 +129,6 @@ abstract class AbstractModel */ abstract public function store(); - /** - * Delete the current instance. - * - * @access public - * @throws Exception - */ - abstract public function delete(); - /** * Test if current instance exists in store. * diff --git a/lib/Model/Comment.php b/lib/Model/Comment.php index 4ce35f96..3c0b2b20 100644 --- a/lib/Model/Comment.php +++ b/lib/Model/Comment.php @@ -71,17 +71,6 @@ class Comment extends AbstractModel } } - /** - * Delete the comment. - * - * @access public - * @throws Exception - */ - public function delete() - { - throw new Exception('To delete a comment, delete its parent paste', 64); - } - /** * Test if comment exists in store. * @@ -131,7 +120,7 @@ class Comment extends AbstractModel public function setParentId($id) { if (!self::isValidId($id)) { - throw new Exception('Invalid paste ID.', 65); + throw new Exception('Invalid document ID.', 65); } $this->_data['parentid'] = $id; } diff --git a/lib/Model/Paste.php b/lib/Model/Paste.php index 66684d8b..a42ab35e 100644 --- a/lib/Model/Paste.php +++ b/lib/Model/Paste.php @@ -111,7 +111,7 @@ class Paste extends AbstractModel $this->_data ) === false ) { - throw new Exception('Error saving paste. Sorry.', 76); + throw new Exception('Error saving document. Sorry.', 76); } } diff --git a/tst/ControllerTest.php b/tst/ControllerTest.php index fc4b16c6..41aad6e9 100644 --- a/tst/ControllerTest.php +++ b/tst/ControllerTest.php @@ -671,7 +671,7 @@ class ControllerTest extends TestCase ob_end_clean(); $response = json_decode($content, true); $this->assertEquals(1, $response['status'], 'outputs error status'); - $this->assertEquals('Invalid paste ID.', $response['message'], 'outputs error message'); + $this->assertEquals('Invalid document ID.', $response['message'], 'outputs error message'); } /** @@ -825,7 +825,7 @@ class ControllerTest extends TestCase $content = ob_get_contents(); ob_end_clean(); $this->assertMatchesRegularExpression( - '#