Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ablota
Tools
Laravel Threema Notification Channel
Commits
6309b728
Verified
Commit
6309b728
authored
Mar 17, 2022
by
FabioWidmer
Browse files
Fix unit tests
parent
df9c3beb
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Messages/ThreemaAudioMessage.php
View file @
6309b728
...
...
@@ -53,7 +53,7 @@ private function calculateDuration(): int
$ffmpeg
=
FFProbe
::
create
();
$audio
=
$ffmpeg
->
format
(
$this
->
path
);
return
$audio
->
get
(
'duration'
);
return
(
int
)
$audio
->
get
(
'duration'
);
}
catch
(
Exception
$exception
)
{
throw
new
ThreemaChannelException
(
'The underlying FFMpeg has thrown an exception.'
,
0
,
$exception
);
}
...
...
src/Messages/ThreemaVideoMessage.php
View file @
6309b728
...
...
@@ -92,7 +92,7 @@ private function calculateDuration(): int
$ffmpeg
=
FFProbe
::
create
();
$audio
=
$ffmpeg
->
format
(
$this
->
path
);
return
$audio
->
get
(
'duration'
);
return
(
int
)
$audio
->
get
(
'duration'
);
}
catch
(
Exception
$exception
)
{
throw
new
ThreemaChannelException
(
'The underlying FFMpeg has thrown an exception.'
,
0
,
$exception
);
}
...
...
tests/Unit/Channels/ThreemaChannelTest.php
View file @
6309b728
...
...
@@ -620,7 +620,7 @@ public function routeNotificationForThreema(mixed $notification): Receiver
class
ThreemaChannelTextMessageNotificationTest
extends
Notification
{
public
function
toThreema
(
mixed
$notifiable
):
ThreemaMessage
public
function
toThreema
(
mixed
$notifiable
):
Threema
Text
Message
{
$message
=
new
ThreemaTextMessage
(
'Hello World'
);
$message
->
setText
(
'Hello World!'
);
...
...
@@ -749,7 +749,7 @@ public function __construct(ThreemaChannel $channel)
$this
->
channel
=
$channel
;
}
public
function
toThreema
(
mixed
$notifiable
):
ThreemaMessage
public
function
toThreema
(
mixed
$notifiable
):
Threema
Text
Message
{
$message
=
new
ThreemaTextMessage
(
'Hello World!'
,
null
);
$message
->
setChannel
(
$this
->
channel
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment