mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Message
This commit is contained in:
+1
-1
@@ -11,4 +11,4 @@ modules:
|
||||
- AcceptanceHelper
|
||||
config:
|
||||
PhpBrowser:
|
||||
url: 'http://localhost/myapp/'
|
||||
url: 'http://localhost/build/'
|
||||
@@ -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
|
||||
@@ -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']);
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Here you can initialize variables that will be available to your tests
|
||||
Reference in New Issue
Block a user