-
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
- Loading branch information
1 parent
156b39f
commit 7bc7e21
Showing
6 changed files
with
38 additions
and
52 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 |
---|---|---|
|
@@ -18,6 +18,9 @@ | |
use SilverStripe\Security\Member; | ||
use SilverStripe\SiteConfig\SiteConfig; | ||
use SilverStripe\ContentReview\Models\ContentReviewLog; | ||
use SilverStripe\HybridExecution\HybridOutput; | ||
use Symfony\Component\Console\Input\ArrayInput; | ||
use Symfony\Component\Console\Output\BufferedOutput; | ||
|
||
class ContentReviewNotificationTest extends SapphireTest | ||
{ | ||
|
@@ -58,7 +61,11 @@ public function testContentReviewEmails() | |
$childParentPage->write(); | ||
|
||
$task = new ContentReviewEmails(); | ||
$task->run(new HTTPRequest('GET', '/dev/tasks/ContentReviewEmails')); | ||
$buffer = new BufferedOutput(); | ||
$output = new HybridOutput(HybridOutput::FORMAT_ANSI, wrappedOutput: $buffer); | ||
$input = new ArrayInput([]); | ||
$input->setInteractive(false); | ||
$task->run($input, $output); | ||
|
||
// Set template variables (as per variable case) | ||
$ToEmail = '[email protected]'; | ||
|
@@ -124,7 +131,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 HybridOutput(HybridOutput::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); | ||
|