Skip to content

Commit

Permalink
Add comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Oct 2, 2024
1 parent ad1c76f commit a85b55e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function testDisabledSearch()
]
);
$session = $this->getMinkSession();
// We expect an error, so let's act like production mode for realistic testing:
$session->setWhoopsDisabled(true);
$session->visit($this->getVuFindUrl() . '/Blender/Results');
$page = $session->getPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ public function testOAuth2InvalidClient(): void
'state' => $state,
];
$session = $this->getMinkSession();
// We expect an error, so let's act like production mode for realistic testing:
$session->setWhoopsDisabled(true);
$session->visit(
$this->getVuFindUrl() . '/OAuth2/Authorize?' . http_build_query($params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public function testSavedSearchSecurity(): void

// Use user A's delete link, but try to execute it as user B:
[, $params] = explode('?', $delete);
// We expect an error, so let's act like production mode for realistic testing:
$session->setWhoopsDisabled(true);
$session->visit($this->getVuFindUrl() . '/MyResearch/SaveSearch?' . $params);
$page = $session->getPage();
Expand All @@ -253,8 +254,9 @@ public function testSavedSearchSecurity(): void
$this->waitForPageLoad($page);
$this->findAndAssertLink($page, 'Log Out')->click();

// Go back in as user A -- see if the saved search still exists.
// Go back to stricter error handling:
$session->setWhoopsDisabled(false);
// Go back in as user A -- see if the saved search still exists.
$this->findAndAssertLink($page, 'Search History')->click();
$this->clickCss($page, '#loginOptions a');
$this->fillInLoginForm($page, 'username1', 'test');
Expand Down

0 comments on commit a85b55e

Please sign in to comment.