oauth2-server/tests/resourceServer/GetUsersBasicEmailFieldsCept.php

19 lines
528 B
PHP

<?php
$I = new ResourceServerTester($scenario);
$I->wantTo('get all users with all basic and email fields');
$I->sendGET('api.php/users?access_token=iamphil');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
[
'username' => 'alexbilbie',
'name' => 'Alex Bilbie',
'email' => 'hello@alexbilbie.com'
],
[
'username' => 'philsturgeon',
'name' => 'Phil Sturgeon',
'email' => 'email@philsturgeon.co.uk'
]
]);