First commit of Codeception files

This commit is contained in:
Alex Bilbie
2015-04-05 17:05:49 +01:00
parent 1e39f1d84a
commit 7a3670523d
9 changed files with 2439 additions and 0 deletions

2389
tests/api/ApiTester.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('get an access token using the client credentials grant');
$I->sendPOST(
'access_token',
[
'grant_type' => 'client_credentials',
'client_id' => 'myawesomeapp',
'client_secret' => 'abc123',
'scope' => 'basic'
]
);
$I->canSeeResponseCodeIs(200);
$I->canSeeResponseIsJson();
$I->seeResponseJsonMatchesJsonPath('$.token_type');
$I->seeResponseJsonMatchesJsonPath('$.expires_in');
$I->seeResponseJsonMatchesJsonPath('$.access_token');

2
tests/api/_bootstrap.php Normal file
View File

@@ -0,0 +1,2 @@
<?php
// Here you can initialize variables that will be available to your tests