Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/events/*.php - Allow optional runtime enforcement #28723

Merged
merged 6 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
(REF) EventCheck - Drop unused methods setUp(), tearDown()
  • Loading branch information
totten committed Dec 19, 2023
commit 19d7b4ab4a19fcde4bd59fca07729718e25e6ced
6 changes: 0 additions & 6 deletions Civi/Test/EventCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,4 @@ public function assertType($types, $value, ?string $msg = NULL) {
}
}

public function setUp() {
}

public function tearDown() {
}

}
5 changes: 0 additions & 5 deletions Civi/Test/EventChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function start($test) {
if ($template->isSupported($test)) {
$checker = clone $template;
$this->activeChecks[] = $checker;
$checker->setUp();
}
}
}
Expand Down Expand Up @@ -75,10 +74,6 @@ public function addListeners() {
*/
public function stop() {
// NOTE: In test environment, dispatcher will be removed regardless.
foreach ($this->activeChecks ?? [] as $checker) {
/** @var \Civi\Test\EventCheck $checker */
Invasive::call([$checker, 'tearDown']);
}
$this->activeChecks = NULL;
return $this;
}
Expand Down