Skip to content

Commit 5425ecf

Browse files
committed
Update unit test
1 parent 33b9dc2 commit 5425ecf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/phpunit/modules/core/output_modules.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,9 @@ public function test_content_section_end() {
984984
public function test_modals() {
985985
$test = new Output_Test('modals', 'core');
986986
$res = $test->run();
987-
$this->assertEquals(array('<div class="modal fade" id="shareFolderModal" tabindex="-1" aria-labelledby="shareFolderModalLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="shareFolderModalLabel">Edit Permissions</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><div class="row"><div class="col-lg-8 col-md-12"><div id="loadingSpinner" class="text-center"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Loading...</span></div></div><table class="table table-striped" id="permissionTable" style="display:none;"><thead><tr><th>User</th><th>Permissions</th><th>Actions</th></tr></thead><tbody></tbody></table></div><div class="col-lg-4 col-md-12"><form id="shareForm" action="" method="POST"><input type="hidden" name="server_id" id="server_id" value=""><input type="hidden" name="folder_uid" id="folder_uid" value=""><input type="hidden" name="folder" id="folder" value=""><div class="mb-3 row"><div class="col-12"><label class="form-label">Identifier</label><div><input type="radio" name="identifier" value="user" id="identifierUser" checked><label for="identifierUser">User:</label><input type="text" class="form-control d-inline-block" id="email" name="email" required placeholder="Enter email"></div><div><input type="radio" name="identifier" value="all" id="identifierAll"><label for="identifierAll">All users (anyone)</label></div><div><input type="radio" name="identifier" value="guests" id="identifierGuests"><label for="identifierGuests">Guests (anonymous)</label></div></div></div><div class="mb-3 row"><div class="col-12"><label class="form-label">Access Rights</label><div><input type="checkbox" name="access_read" id="accessRead" checked><label for="accessRead">Read</label></div><div><input type="checkbox" name="access_write" id="accessWrite"><label for="accessWrite">Write</label></div><div><input type="checkbox" name="access_delete" id="accessDelete"><label for="accessDelete">Delete</label></div><div><input type="checkbox" name="access_other" id="accessOther"><label for="accessOther">Other</label></div></div></div><div class="modal-footer"><button type="submit" class="btn btn-primary">Save</button><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button></div></form></div></div></div></div></div></div>'), $res->output_response);
987+
$share_folder_modal = '<div class="modal fade" id="shareFolderModal" tabindex="-1" aria-labelledby="shareFolderModalLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="shareFolderModalLabel">Edit Permissions</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><div class="row"><div class="col-lg-8 col-md-12"><div id="loadingSpinner" class="text-center"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Loading...</span></div></div><table class="table table-striped" id="permissionTable" style="display:none;"><thead><tr><th>User</th><th>Permissions</th><th>Actions</th></tr></thead><tbody></tbody></table></div><div class="col-lg-4 col-md-12"><form id="shareForm" action="" method="POST"><input type="hidden" name="server_id" id="server_id" value=""><input type="hidden" name="folder_uid" id="folder_uid" value=""><input type="hidden" name="folder" id="folder" value=""><div class="mb-3 row"><div class="col-12"><label class="form-label">Identifier</label><div><input type="radio" name="identifier" value="user" id="identifierUser" checked><label for="identifierUser">User:</label><input type="text" class="form-control d-inline-block" id="email" name="email" required placeholder="Enter email"></div><div><input type="radio" name="identifier" value="all" id="identifierAll"><label for="identifierAll">All users (anyone)</label></div><div><input type="radio" name="identifier" value="guests" id="identifierGuests"><label for="identifierGuests">Guests (anonymous)</label></div></div></div><div class="mb-3 row"><div class="col-12"><label class="form-label">Access Rights</label><div><input type="checkbox" name="access_read" id="accessRead" checked><label for="accessRead">Read</label></div><div><input type="checkbox" name="access_write" id="accessWrite"><label for="accessWrite">Write</label></div><div><input type="checkbox" name="access_delete" id="accessDelete"><label for="accessDelete">Delete</label></div><div><input type="checkbox" name="access_other" id="accessOther"><label for="accessOther">Other</label></div></div></div><div class="modal-footer"><button type="submit" class="btn btn-primary">Save</button><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button></div></form></div></div></div></div></div></div>';
988+
$report_spam_modal = '<div class="modal fade" id="reportSpamModal" tabindex="-1" aria-labelledby="reportSpamModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="reportSpamModalLabel">Report Spam</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><p>Please tell us why you\'re reporting this email:</p><form id="reportSpamForm"><div class="mb-3"><label for="spam_reason_select" class="form-label">Select one or more reasons:</label><select class="form-select" id="spam_reason_select" name="spam_reason[]" multiple size="7"><option value="unsolicited">Unsolicited / Spam</option><option value="phishing">Phishing or scam attempt</option><option value="malicious">Malicious or harmful content</option><option value="advertising">Advertising / Promotional</option><option value="offensive">Offensive or inappropriate</option><option value="wrong_recipient">Sent to the wrong recipient</option><option value="other">Other – please specify</option></select><small class="form-text text-muted">Hold Ctrl (or Cmd on Mac) to select multiple options.</small></div><div class="mb-3" id="spam_reason_other_input" style="display: none;"><label for="spam_reason_other_text" class="form-label">Please specify:</label><input type="text" class="form-control" id="spam_reason_other_text" placeholder="Please specify"></div></form></div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button><button type="button" class="btn btn-warning" id="confirm_report_spam">Report as Spam</button></div></div></div></div></div>';
989+
$this->assertEquals(array($share_folder_modal . $report_spam_modal), $res->output_response);
988990
}
989991
/**
990992
* @preserveGlobalState disabled

0 commit comments

Comments
 (0)