This commit is contained in:
Paminger
2016-04-05 09:36:24 +02:00
parent 3c1bcfa999
commit c124348484
52 changed files with 3175 additions and 856 deletions
@@ -11,4 +11,4 @@ modules:
- AcceptanceHelper
config:
PhpBrowser:
url: 'http://localhost/myapp/'
url: 'http://localhost/build/'
+11
View File
@@ -0,0 +1,11 @@
class_name: ApiTester
modules:
enabled:
- \Helper\Api
- REST:
# API URL
url: http://localhost/build/index.ci.php/api/v1/
# Can also be a framework module name
depends: PhpBrowser
# Limits PhpBrowser to JSON or XML
part: Json
+11
View File
@@ -0,0 +1,11 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('test the Login API');
$I->haveHttpHeader('FHC-API-KEY', 'testapikey@fhcomplete.org');
$I->sendGET('/userauth/login/username/codeception%40whisperocity.com/password/secret/device_id/abcdef123');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson([
'success' => true,
'message' => 'User successfully logged in']);
+2
View File
@@ -0,0 +1,2 @@
<?php
// Here you can initialize variables that will be available to your tests