Skip to content
Merged
Changes from all commits
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
9 changes: 4 additions & 5 deletions tests/lib/SetupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ public function testSetupHasEventDispatcher(): void {

/**
* Helper method to extract event parameters from install options
* This mirrors the logic in Setup::install() at line 329 for dataDir and lines 502-503 for admin parameters
* This mirrors the logic in Setup::install() for extracting dataDir and admin parameters
*
* Note: This assumes 'directory' key is present in options. Setup::install() has a fallback at lines 321-323
* Note: This assumes 'directory' key is present in options. Setup::install() has a fallback
* that sets a default directory if empty, but our tests always provide this key.
*/
private function extractInstallationEventParameters(array $options): array {
Expand All @@ -208,8 +208,7 @@ private function extractInstallationEventParameters(array $options): array {
* Test that InstallationCompletedEvent can be created with parameters from install options
*
* This test verifies that the InstallationCompletedEvent can be properly constructed with
* the parameters that Setup::install() extracts from the options array (see Setup.php line 329
* for dataDir and lines 502-503 for admin parameters).
* the parameters that Setup::install() extracts from the options array for dataDir and admin parameters.
*
* Note: Testing that Setup::install() actually dispatches this event requires a full integration
* test with database setup, file system operations, and app installation, which is beyond the
Expand All @@ -226,7 +225,7 @@ public function testInstallationCompletedEventParametersFromInstallOptions(): vo
// Extract parameters the same way Setup::install() does
[$dataDir, $adminUsername, $adminEmail] = $this->extractInstallationEventParameters($options);

// Create the event as Setup::install() does at lines 504-506
// Create the event as Setup::install() does after successful installation
$event = new InstallationCompletedEvent($dataDir, $adminUsername, $adminEmail);

// Verify the event contains the expected values
Expand Down
Loading