Skip to content

Commit

Permalink
Update EventRequestParserTest.php
Browse files Browse the repository at this point in the history
Add test getMessageType
  • Loading branch information
tamucola authored Nov 21, 2016
1 parent 3dfce57 commit 284a6a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/LINEBot/EventRequestParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public function testParseEventRequest()
/** @var TextMessage $event */
$this->assertEquals('replytoken', $event->getReplyToken());
$this->assertEquals('contentid', $event->getMessageId());
$this->assertEquals('text', $event->getMessageType());
$this->assertEquals('message', $event->getText());
}

Expand All @@ -218,6 +219,7 @@ public function testParseEventRequest()
$this->assertInstanceOf('LINE\LINEBot\Event\MessageEvent\ImageMessage', $event);
/** @var ImageMessage $event */
$this->assertEquals('replytoken', $event->getReplyToken());
$this->assertEquals('image', $event->getMessageType());
}

{
Expand All @@ -229,6 +231,7 @@ public function testParseEventRequest()
$this->assertInstanceOf('LINE\LINEBot\Event\MessageEvent\VideoMessage', $event);
/** @var VideoMessage $event */
$this->assertEquals('replytoken', $event->getReplyToken());
$this->assertEquals('video', $event->getMessageType());
}

{
Expand All @@ -237,6 +240,7 @@ public function testParseEventRequest()
$this->assertInstanceOf('LINE\LINEBot\Event\MessageEvent\AudioMessage', $event);
/** @var AudioMessage $event */
$this->assertEquals('replytoken', $event->getReplyToken());
$this->assertEquals('audio', $event->getMessageType());
}

{
Expand All @@ -245,6 +249,7 @@ public function testParseEventRequest()
$this->assertInstanceOf('LINE\LINEBot\Event\MessageEvent\LocationMessage', $event);
/** @var LocationMessage $event */
$this->assertEquals('replytoken', $event->getReplyToken());
$this->assertEquals('location', $event->getMessageType());
$this->assertEquals('label', $event->getTitle());
$this->assertEquals('tokyo', $event->getAddress());
$this->assertEquals('-34.12', $event->getLatitude());
Expand All @@ -257,6 +262,7 @@ public function testParseEventRequest()
$this->assertInstanceOf('LINE\LINEBot\Event\MessageEvent\StickerMessage', $event);
/** @var StickerMessage $event */
$this->assertEquals('replytoken', $event->getReplyToken());
$this->assertEquals('sticker', $event->getMessageType());
$this->assertEquals(1, $event->getPackageId());
$this->assertEquals(2, $event->getStickerId());
}
Expand Down

0 comments on commit 284a6a4

Please sign in to comment.