Skip to content

Commit

Permalink
Adjust theUsersOwnNameShouldNotBeListedInTheAutocompleteList
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jun 11, 2019
1 parent c6a148d commit a1e9bc7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/acceptance/features/bootstrap/WebUISharingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,9 @@ public function allUsersAndGroupsThatContainTheStringInTheirNameShouldBeListedIn
*/
public function theUsersOwnNameShouldNotBeListedInTheAutocompleteList() {
PHPUnit\Framework\Assert::assertNotContains(
$this->filesPage->getMyDisplayname(),
$this->sharingDialog->userStringsToMatchAutoComplete(
$this->filesPage->getMyDisplayname()
),
$this->sharingDialog->getAutocompleteItemsList()
);
}
Expand Down Expand Up @@ -1034,9 +1036,10 @@ public function userShouldBeListedInTheAutocompleteListOnTheWebui($username) {
public function userShouldNotBeListedInTheAutocompleteListOnTheWebui($username) {
$names = $this->sharingDialog->getAutocompleteItemsList();
$userString = $this->sharingDialog->userStringsToMatchAutoComplete($username);
if (\in_array($userString, $names)) {
throw new Exception("$username ($userString) found in autocomplete list but not expected");
}
PHPUnit\Framework\Assert::assertFalse(
\in_array($userString, $names),
"$username ($userString) found in autocomplete list but not expected"
);
}

/**
Expand Down

0 comments on commit a1e9bc7

Please sign in to comment.