Skip to content

Commit

Permalink
Add special test step for issue-35484
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jun 9, 2020
1 parent 07c047b commit a46fdca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ Feature: sharing
#And user "brian" should see the following elements
# | /randomfile.txt |
#And the content of file "randomfile.txt" for user "brian" should be "Random data"
And user "brian" should not see the following elements
And user "brian" should not see the following elements if the upper and lower case username are different
| /randomfile.txt |

@skipOnLDAP
Expand Down
20 changes: 20 additions & 0 deletions tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,26 @@ public function userShouldSeeTheElements($user, $shouldOrNot, $elements) {
$this->checkElementList($user, $elements, $should);
}

/**
* @Then /^user "([^"]*)" should not see the following elements if the upper and lower case username are different/
*
* @param string $user
* @param TableNode $elements
*
* @return void
* @throws InvalidArgumentException
*
*/
public function userShouldNotSeeTheElementsIfUpperAndLowerCaseUsernameDifferent($user, $elements) {
$effectiveUser = $this->getActualUsername($user);
if (\strtoupper($effectiveUser) === \strtolower($effectiveUser)) {
$expectedToBeListed = true;
} else {
$expectedToBeListed = false;
}
$this->checkElementList($user, $elements, $expectedToBeListed);
}

/**
* asserts that a the user can or cannot see a list of files/folders by propfind
*
Expand Down

0 comments on commit a46fdca

Please sign in to comment.