33namespace TelegramBot \Api \Test ;
44
55use TelegramBot \Api \Types \Chat ;
6+ use TelegramBot \Api \Types \Dice ;
67use TelegramBot \Api \Types \Document ;
78use TelegramBot \Api \Types \Location ;
89use TelegramBot \Api \Types \Audio ;
@@ -304,6 +305,7 @@ public function testSetVoice()
304305 $ item = new Message ();
305306 $ voice = Voice::fromResponse (array (
306307 'file_id ' => 'testFileId1 ' ,
308+ 'file_unique_id ' => 'testUniqueFileId ' ,
307309 'duration ' => 1 ,
308310 'mime_type ' => 'audio/mp3 ' ,
309311 'file_size ' => 3
@@ -317,6 +319,7 @@ public function testGetVoice()
317319 $ item = new Message ();
318320 $ voice = Voice::fromResponse (array (
319321 'file_id ' => 'testFileId1 ' ,
322+ 'file_unique_id ' => 'testUniqueFileId ' ,
320323 'duration ' => 1 ,
321324 'mime_type ' => 'audio/mp3 ' ,
322325 'file_size ' => 3
@@ -369,6 +372,29 @@ public function testGetVideo()
369372 $ this ->assertInstanceOf ('\TelegramBot\Api\Types\Video ' , $ item ->getVideo ());
370373 }
371374
375+ public function testSetDice ()
376+ {
377+ $ item = new Message ();
378+ $ dice = Dice::fromResponse (array (
379+ 'emoji ' => '🎲 ' ,
380+ 'value ' => 3
381+ ));
382+ $ item ->setDice ($ dice );
383+ $ this ->assertAttributeEquals ($ dice , 'dice ' , $ item );
384+ }
385+
386+ public function testGetDice ()
387+ {
388+ $ item = new Message ();
389+ $ dice = Dice::fromResponse (array (
390+ 'emoji ' => '🎲 ' ,
391+ 'value ' => 3
392+ ));
393+ $ item ->setDice ($ dice );
394+ $ this ->assertEquals ($ dice , $ item ->getDice ());
395+ $ this ->assertInstanceOf ('\TelegramBot\Api\Types\Dice ' , $ item ->getDice ());
396+ }
397+
372398 public function testSetSticker ()
373399 {
374400 $ item = new Message ();
0 commit comments