示例#1
0
 public function listFiles(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/files');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->dontSeeResponseJsonMatchesJsonPath('$.[*].*');
 }
示例#2
0
 public function showUser(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/users/admin');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.username');
     $I->dontSeeResponseJsonMatchesJsonPath('$.password');
 }
示例#3
0
 public function showConfig(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/config/site');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.title');
     $I->seeResponseJsonMatchesJsonPath('$.theme');
 }
示例#4
0
 public function showTheme(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/themes/galaxy');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.name');
     $I->seeResponseJsonMatchesJsonPath('$.layouts.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.infos.[*]');
     $I->dontSeeResponseJsonMatchesJsonPath('$.layouts.[*].[*]');
 }
示例#5
0
 public function cannotDeleteAPage(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendDelete('/pages/' . $this->page1['slug']);
     $I->seeResponseCodeIs(404);
 }