/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakedc/auth/tests/TestCase/Social/Mapper
NameSizeModeActions
CognitoTest.php26370644editdlrm
FacebookTest.php29460644editdlrm
GoogleTest.php21860644editdlrm
InstagramTest.php21050644editdlrm
LinkedInTest.php23340644editdlrm
TwitterTest.php20620644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakedc/auth/tests/TestCase/Social/Mapper/CognitoTest.php (2637B)
'test-token', 'expires' => 1490988496, ]); $rawData = [ 'token' => $token, 'sub' => '10', 'zoneinfo' => 'Abcd Pong', 'email' => 'test@gmail.com', 'website' => 'https://user.Cognito.com/+TestUser', 'name' => 'John Doe', 'family_name' => 'Kent', 'given_name' => 'Clark', 'profile' => 'I am the best test user in the world.', 'picture' => 'https://lh3.Cognitousercontent.com/photo.jpg', ]; $expected = [ 'id' => '10', 'username' => null, 'full_name' => 'John Doe', 'first_name' => 'Clark', 'last_name' => 'Kent', 'email' => 'test@gmail.com', 'avatar' => 'https://lh3.Cognitousercontent.com/photo.jpg', 'gender' => null, 'link' => 'https://user.Cognito.com/+TestUser', 'bio' => 'I am the best test user in the world.', 'locale' => null, 'zoneinfo' => 'Abcd Pong', 'validated' => true, 'credentials' => [ 'token' => 'test-token', 'secret' => null, 'expires' => 1490988496, ], 'raw' => $rawData, ]; $providerMapper = new Cognito(); $user = $providerMapper($rawData); $this->assertEquals($expected, $user); //Check _firstName and _lastName methods uses the 'name' field when needed unset($rawData['family_name'], $rawData['given_name']); $expected['last_name'] = 'Doe'; $expected['first_name'] = 'John'; $expected['raw'] = $rawData; $providerMapper = new Cognito(); $user = $providerMapper($rawData); $this->assertEquals($expected, $user); } }