Commit cc6b461c authored by Mark Harding's avatar Mark Harding

(chore): for now, do not send notifications

1 merge request!414New transcoder
Pipeline #102335803 failed with stages
in 43 seconds
......@@ -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()
{
......
Please register or to comment