SignatureValidatorTest
extends TestCase
Table of Contents
-
$channelSecret
: mixed
-
$json
: mixed
-
testValidateSignature()
: mixed
$channelSecret
private
static mixed
$channelSecret
= 'testsecret'
$json
private
static mixed
$json
= <<<JSON
{
"events":[
{
"type":"message",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken",
"message":{
"id":"contentid",
"type":"text",
"text":"message"
}
},
{
"type":"message",
"timestamp":12345678901234,
"source":{
"type":"group",
"groupId":"groupid"
},
"replyToken":"replytoken",
"message":{
"id":"contentid",
"type":"image"
}
},
{
"type":"message",
"timestamp":12345678901234,
"source":{
"type":"room",
"roomId":"roomid"
},
"replyToken":"replytoken",
"message":{
"id":"contentid",
"type":"video"
}
},
{
"type":"message",
"timestamp":12345678901234,
"source":{
"type":"room",
"roomId":"roomid"
},
"replyToken":"replytoken",
"message":{
"id":"contentid",
"type":"audio"
}
},
{
"type":"message",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken",
"message":{
"id":"contentid",
"type":"location",
"title":"label",
"address":"tokyo",
"latitude":-34.12,
"longitude":134.23
}
},
{
"type":"message",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken",
"message":{
"id":"contentid",
"type":"sticker",
"packageId":"1",
"stickerId":"2"
}
},
{
"type":"follow",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken"
},
{
"type":"unfollow",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
}
},
{
"type":"join",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken"
},
{
"type":"leave",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
}
},
{
"type":"postback",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken",
"postback":{
"data":"postback"
}
},
{
"type":"beacon",
"timestamp":12345678901234,
"source":{
"type":"user",
"userId":"userid"
},
"replyToken":"replytoken",
"beacon":{
"hwid":"bid",
"type":"enter"
}
}
]
}
JSON