Skip to content

Commit

Permalink
used environment variable for language setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Talank committed Feb 22, 2021
1 parent df5e095 commit fbbf33c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ def acceptance(ctx):
'replaceUsernames': False,
'extraSetup': [],
'extraServices': [],
'extraEnvironment': {},
'extraEnvironment': {'OC_LANGUAGE':'en-EN'},
'extraCommandsBeforeTestRun': [],
'extraApps': {},
'useBundledApp': False,
Expand Down
5 changes: 5 additions & 0 deletions tests/acceptance/features/bootstrap/OCSContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,11 @@ public function theOcsStatusCodeShouldBeOr($statusCode1, $statusCode2) {
* @return void
*/
public function theOCSStatusMessageShouldBe($statusMessage, $language=null) {
if (!isset($language)) {
if (\getenv('OC_LANGUAGE') !== false) {
$language = \getenv('OC_LANGUAGE');
}
}
$statusMessage = $this->getActualStatusMessage($statusMessage, $language);

Assert::assertEquals(
Expand Down
5 changes: 5 additions & 0 deletions tests/acceptance/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,11 @@ public function theUserGetsInfoOfLastShareUsingTheSharingApi() {
*/
public function userGetsInfoOfLastShareUsingTheSharingApi($user, $language=null) {
$share_id = $this->getLastShareIdOf($user);
if (!isset($language)) {
if (\getenv('OC_LANGUAGE') !== false) {
$language = \getenv('OC_LANGUAGE');
}
}
$this->getShareData($user, $share_id, $language);
}

Expand Down

0 comments on commit fbbf33c

Please sign in to comment.