Skip to content
Snippets Groups Projects
Commit cc6b461c authored by Mark Harding's avatar Mark Harding
Browse files

(chore): for now, do not send notifications

parent 05dc7e13
No related branches found
No related tags found
Loading
......@@ -42,9 +42,9 @@ class NotificationDelegate
$status = $this->transcodeStates->getStatus($video);
if ($status === TranscodeStates::COMPLETED) {
$this->emitCompletedNotification($video);
// $this->emitCompletedNotification($video);
} elseif ($status === TranscodeStates::FAILED) {
$this->emitFailedNotification($video);
// $this->emitFailedNotification($video);
}
}
......
......@@ -41,43 +41,43 @@ class NotificationDelegateSpec extends ObjectBehavior
$this->shouldHaveType(NotificationDelegate::class);
}
public function it_should_send_notification_of_completed()
{
$transcode = new Transcode();
$transcode->setGuid('123');
// public function it_should_send_notification_of_completed()
// {
// $transcode = new Transcode();
// $transcode->setGuid('123');
$this->mockFetchVideo();
// $this->mockFetchVideo();
$this->transcodeStates->getStatus(Argument::that(function ($video) {
return $video->getGuid() === '123';
}))
->shouldBeCalled()
->willReturn('completed');
// $this->transcodeStates->getStatus(Argument::that(function ($video) {
// return $video->getGuid() === '123';
// }))
// ->shouldBeCalled()
// ->willReturn('completed');
$this->eventsDispatcher->trigger('notification', 'transcoder', Argument::type('array'))
->shouldBeCalled();
// $this->eventsDispatcher->trigger('notification', 'transcoder', Argument::type('array'))
// ->shouldBeCalled();
$this->onTranscodeCompleted($transcode);
}
// $this->onTranscodeCompleted($transcode);
// }
public function it_should_send_notification_of_failed()
{
$transcode = new Transcode();
$transcode->setGuid('123');
// public function it_should_send_notification_of_failed()
// {
// $transcode = new Transcode();
// $transcode->setGuid('123');
$this->mockFetchVideo();
// $this->mockFetchVideo();
$this->transcodeStates->getStatus(Argument::that(function ($video) {
return $video->getGuid() === '123';
}))
->shouldBeCalled()
->willReturn('failed');
// $this->transcodeStates->getStatus(Argument::that(function ($video) {
// return $video->getGuid() === '123';
// }))
// ->shouldBeCalled()
// ->willReturn('failed');
$this->eventsDispatcher->trigger('notification', 'transcoder', Argument::type('array'))
->shouldBeCalled();
// $this->eventsDispatcher->trigger('notification', 'transcoder', Argument::type('array'))
// ->shouldBeCalled();
$this->onTranscodeCompleted($transcode);
}
// $this->onTranscodeCompleted($transcode);
// }
public function it_should_do_nothing()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment