|
@@ 41-54 (lines=14) @@
|
| 38 |
|
SiteConfig::class => [ContentReviewDefaultSettings::class], |
| 39 |
|
]; |
| 40 |
|
|
| 41 |
|
public function testReviewedThrowsExceptionWithNoRecordID() |
| 42 |
|
{ |
| 43 |
|
$this->setExpectedException(HTTPResponse_Exception::class); |
| 44 |
|
|
| 45 |
|
/** @var CMSPageEditController|ContentReviewCMSExtension $controller */ |
| 46 |
|
$controller = new CMSPageEditController(); |
| 47 |
|
|
| 48 |
|
$dummyForm = new Form($controller, "EditForm", new FieldList(), new FieldList()); |
| 49 |
|
|
| 50 |
|
$controller->savereview(array( |
| 51 |
|
"ID" => null, |
| 52 |
|
"Message" => null, |
| 53 |
|
), $dummyForm); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
public function testReviewedThrowsExceptionWithWrongRecordID() |
| 57 |
|
{ |
|
@@ 56-69 (lines=14) @@
|
| 53 |
|
), $dummyForm); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
public function testReviewedThrowsExceptionWithWrongRecordID() |
| 57 |
|
{ |
| 58 |
|
$this->setExpectedException(HTTPResponse_Exception::class); |
| 59 |
|
|
| 60 |
|
/** @var CMSPageEditController|ContentReviewCMSExtension $controller */ |
| 61 |
|
$controller = new CMSPageEditController(); |
| 62 |
|
|
| 63 |
|
$dummyForm = new Form($controller, "EditForm", new FieldList(), new FieldList()); |
| 64 |
|
|
| 65 |
|
$controller->savereview(array( |
| 66 |
|
"ID" => "FAIL", |
| 67 |
|
"Message" => null, |
| 68 |
|
), $dummyForm); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
public function testReviewedWithAuthor() |
| 72 |
|
{ |