コード例 #1
0
ファイル: UsersCrudCest.php プロジェクト: bafs/parvula
 public function showUser(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/users/admin');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.username');
     $I->dontSeeResponseJsonMatchesJsonPath('$.password');
 }
コード例 #2
0
ファイル: ConfigCrudCest.php プロジェクト: bafs/parvula
 public function showConfig(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/config/site');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.title');
     $I->seeResponseJsonMatchesJsonPath('$.theme');
 }
コード例 #3
0
ファイル: PageCrudCest.php プロジェクト: bafs/parvula
 public function indexPages(APITester $I)
 {
     $I->sendGET('/pages');
     $I->seeResponseCodeIs(200);
     // Should be deeper than an array
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->seeResponseJsonMatchesJsonPath('$.[*].*');
     $I->seeResponseJsonMatchesJsonPath('$.[0].slug');
     $I->seeResponseJsonMatchesJsonPath('$.[0].title');
 }
コード例 #4
0
ファイル: ThemesCrudCest.php プロジェクト: bafs/parvula
 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
ファイル: FilesCrudCest.php プロジェクト: bafs/parvula
 public function listFiles(APITester $I)
 {
     $I->amBearerAuthenticated($this->token);
     $I->sendGET('/files');
     $I->seeResponseCodeIs(200);
     $I->seeResponseJsonMatchesJsonPath('$.[*]');
     $I->dontSeeResponseJsonMatchesJsonPath('$.[*].*');
 }