diff --git a/src/Action/User.php b/src/Action/User.php index e8e74fe..f3ca7a2 100644 --- a/src/Action/User.php +++ b/src/Action/User.php @@ -7,9 +7,6 @@ class User { - /** @var string */ - protected $id; - /** @var null|Dialogflow\Action\User\Name */ protected $name; @@ -21,8 +18,6 @@ class User */ public function __construct($data) { - $this->id = $data['userId']; - if (isset($data['profile'])) { $this->name = new Name($data['profile']); } @@ -31,17 +26,7 @@ public function __construct($data) $this->lastSeen = new Carbon($data['lastSeen']); } } - - /** - * Random string ID for Google user. - * - * @return string - */ - public function getId() - { - return $this->id; - } - + /** * User's permissioned name info. * diff --git a/tests/Action/ConversationTest.php b/tests/Action/ConversationTest.php index 9633fea..b8c59a5 100644 --- a/tests/Action/ConversationTest.php +++ b/tests/Action/ConversationTest.php @@ -370,7 +370,6 @@ public function testGetUser() $user = $conv->getUser(); - $this->assertEquals('ABwppHEW9NgaT5S1NmZYR42yhs0FW1hawZHSjC_xW8FwkoZU1GMoIRAWWoThwUcA7VNX22Jzj8-KqA', $user->getId()); $this->assertEquals(null, $user->getName()); $agent = $this->getAgent('googleuserfull'); @@ -378,7 +377,6 @@ public function testGetUser() $user = $conv->getUser(); - $this->assertEquals('ABwppHHRq4M6ZiJzBoAwy8WalWejgJDTZpHSj61TlzGgC1yJkQqA6OKsel7bvB-agBZiw', $user->getId()); $this->assertInstanceOf('\Dialogflow\Action\User\Name', $user->getName()); $this->assertEquals('Eris Ristemena', $user->getName()->getDisplay()); $this->assertEquals('Eris', $user->getName()->getGiven()); diff --git a/tests/stubs/request-v2-google-userfull.json b/tests/stubs/request-v2-google-userfull.json index 6bcdc1c..35cb3bc 100644 --- a/tests/stubs/request-v2-google-userfull.json +++ b/tests/stubs/request-v2-google-userfull.json @@ -87,8 +87,7 @@ "givenName":"Eris", "familyName":"Ristemena" }, - "locale":"en-US", - "userId":"ABwppHHRq4M6ZiJzBoAwy8WalWejgJDTZpHSj61TlzGgC1yJkQqA6OKsel7bvB-agBZiw" + "locale":"en-US" }, "device":{ "location":{ diff --git a/tests/stubs/request-v2-google.json b/tests/stubs/request-v2-google.json index caf0739..cfe68bd 100644 --- a/tests/stubs/request-v2-google.json +++ b/tests/stubs/request-v2-google.json @@ -121,8 +121,7 @@ "user":{ "userStorage":"{\"data\":{}}", "lastSeen":"2018-05-06T02:54:10Z", - "locale":"id-ID", - "userId":"ABwppHEW9NgaT5S1NmZYR42yhs0FW1hawZHSjC_xW8FwkoZU1GMoIRAWWoThwUcA7VNX22Jzj8-KqA" + "locale":"id-ID" }, "conversation":{ "conversationId":"1525587949165",