Exemple #1
0
 public function getListOfParentFolderWhenFolderHasTypo(\Step\Api\User $I)
 {
     $params = $this->params;
     // The correct path is /folder1/shared1/shared1.1, containing testimage.png
     $params['location'] = '/folder1/shared1/shared1.2';
     $I->am('an app');
     $I->wantTo('get the list of files of the parent folder when the last folder contains a typo');
     $I->getUserCredentialsAndUseHttpAuthentication();
     $I->sendGET($this->apiUrl, $params);
     $I->seeResponseCodeIs(200);
     $I->seeResponseIsJson();
     // /folder1/shared1 only contains 2 files. Warning, alphabetical order
     $I->seeResponseJsonMatchesXpath('//files[path[1]="folder1/shared1/testimage.eps"]');
     // This is weird and might come from a bug in Codeception
     $I->seeResponseJsonMatchesXpath('//files[path[1][1]="folder1/shared1/testimage.gif"]');
     $I->seeResponseContainsJson(['locationhaschanged' => true]);
 }