Skip to content

Commit

Permalink
API-Testing m/origin
Browse files Browse the repository at this point in the history
test class added
slightly changed json output format: renamed status to meta
  • Loading branch information
disc5 committed Jul 8, 2015
1 parent 5bfc4e9 commit 5fe659b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
$result['calendar']['events'] = $data;

$t_end = microtime();
$result['status']['duration'] = abs($t_end-$t_start);
$result['status']['tstamp'] = time();

$result['meta']['duration'] = abs($t_end-$t_start);
$result['meta']['tstamp'] = time();
$resp = array("mdeskinit" => $result);
$app->success($result);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,29 @@ class MobileRoutesCest
{
public function _before(ApiTester $I)
{
//TestCommons::logMeIn($I);
require_once('tests/api/scenarios/kalamaria/KalamariaUpCest.php');
$scenario = new KalamariaUpCest();
$scenario->createTestClient($I);
$scenario->createSystemTestUsers($I);
$scenario->createTestingCourse($I);
TestScenarios::admAddPermissionToTestApiClient($I,TestScenarios::$test_api_key,'/v1/m/origin','GET');
}

public function _after(ApiTester $I)
{
require_once('tests/api/scenarios/kalamaria/KalamariaDownCest.php');
$scenario = new KalamariaDownCest();
$scenario->removeTestUsers($I);
$scenario->removeTestingCourse($I);
$scenario->removeTestClient($I);
}

/* public function getMobileProfile(ApiTester $I)
public function getInitialMobileDesktop(ApiTester $I)
{
$I->wantTo('get mobile profile of test user');
$I->amBearerAuthenticated(TestCommons::$token);
//$I->sendGET('clients');
//$success = array_search($this->client_id,$I->grabDataFromResponseByJsonPath('$.clients[*].id'));
//\PHPUnit_Framework_Assert::assertTrue($success);
$I->sendGET('v1/m/origin');
$I->seeResponseContainsJson(array('status' => 'success'));
}
*/

}

0 comments on commit 5fe659b

Please sign in to comment.