-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API Update API to reflect changes to CLI interaction (#255)
- Loading branch information
1 parent
ef588a5
commit 47245c3
Showing
6 changed files
with
38 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ | |
use SilverStripe\Security\Member; | ||
use SilverStripe\SiteConfig\SiteConfig; | ||
use SilverStripe\ContentReview\Models\ContentReviewLog; | ||
use SilverStripe\PolyExecution\PolyOutput; | ||
use Symfony\Component\Console\Input\ArrayInput; | ||
use Symfony\Component\Console\Output\BufferedOutput; | ||
|
||
class ContentReviewNotificationTest extends SapphireTest | ||
{ | ||
|
@@ -59,7 +62,11 @@ public function testContentReviewEmails() | |
$childParentPage->write(); | ||
|
||
$task = new ContentReviewEmails(); | ||
$task->run(new HTTPRequest('GET', '/dev/tasks/ContentReviewEmails')); | ||
$buffer = new BufferedOutput(); | ||
$output = new PolyOutput(PolyOutput::FORMAT_ANSI, wrappedOutput: $buffer); | ||
$input = new ArrayInput([]); | ||
$input->setInteractive(false); | ||
$task->run($input, $output); | ||
|
||
// Set template variables (as per variable case) | ||
$ToEmail = '[email protected]'; | ||
|
@@ -125,7 +132,11 @@ public function testContentReviewNeeded() | |
$this->assertCount(1, $childParentPage->ReviewLogs()); | ||
|
||
$task = new ContentReviewEmails(); | ||
$task->run(new HTTPRequest('GET', '/dev/tasks/ContentReviewEmails')); | ||
$buffer = new BufferedOutput(); | ||
$output = new PolyOutput(PolyOutput::FORMAT_ANSI, wrappedOutput: $buffer); | ||
$input = new ArrayInput([]); | ||
$input->setInteractive(false); | ||
$task->run($input, $output); | ||
|
||
// Expecting to not send the email as content review for page is done | ||
$email = $this->findEmail($member->Email); | ||
|