lsuonline / lsuce-block_quickmail

6 stars 37 forks source link

4.5 - numerous PHPUnit test failures #101

Open aspark21 opened 6 days ago

aspark21 commented 6 days ago

Moodle 4.5 Quickmail master


block_quickmail_messenger_compose_testcase/test_messenger_sends_composed_email_nowblock_quickmail_messenger_compose_testcase::test_messenger_sends_composed_email_now Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:55 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
--
10 | block_quickmail_messenger_compose_testcase/test_messenger_sends_composed_email_including_mentors_nowblock_quickmail_messenger_compose_testcase::test_messenger_sends_composed_email_including_mentors_now Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:86 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_compose_testcase/test_messenger_sends_composed_message_nowblock_quickmail_messenger_compose_testcase::test_messenger_sends_composed_message_now Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:140 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_compose_testcase/test_skips_invalid_user_ids_when_sendingblock_quickmail_messenger_compose_testcase::test_skips_invalid_user_ids_when_sending Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:163 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_compose_testcase/test_messenger_does_not_send_scheduled_composed_email_nowblock_quickmail_messenger_compose_testcase::test_messenger_does_not_send_scheduled_composed_email_now Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:192 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_compose_testcase/test_messenger_sends_to_additional_emailsblock_quickmail_messenger_compose_testcase::test_messenger_sends_to_additional_emails Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:218 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_compose_testcase/test_messenger_sends_a_receipt_if_askedblock_quickmail_messenger_compose_testcase::test_messenger_sends_a_receipt_if_asked Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:252 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_compose_testcase/test_messenger_sends_with_signature_appendedblock_quickmail_messenger_compose_testcase::test_messenger_sends_with_signature_appended Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_compose_test.php:294 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_drafting_testcase/test_messenger_saves_draft_emailblock_quickmail_messenger_drafting_testcase::test_messenger_saves_draft_email Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_drafting_test.php:56 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_drafting_testcase/test_cannot_duplicate_a_draft_that_not_created_by_the_given_userblock_quickmail_messenger_drafting_testcase::test_cannot_duplicate_a_draft_that_not_created_by_the_given_user Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_drafting_test.php:85 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_messenger_drafting_testcase/test_duplicates_draftsblock_quickmail_messenger_drafting_testcase::test_duplicates_drafts Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/messenger_drafting_test.php:112 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_save_draft_message_validator_testcase/test_subject_is_not_requiredblock_quickmail_save_draft_message_validator_testcase::test_subject_is_not_required Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/save_draft_message_validator_test.php:48 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_save_draft_message_validator_testcase/test_body_is_not_requiredblock_quickmail_save_draft_message_validator_testcase::test_body_is_not_required Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/save_draft_message_validator_test.php:70 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_save_draft_message_validator_testcase/test_validate_additional_email_list_is_validblock_quickmail_save_draft_message_validator_testcase::test_validate_additional_email_list_is_valid Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/save_draft_message_validator_test.php:235 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_save_draft_message_validator_testcase/test_validate_additional_email_list_is_invalidblock_quickmail_save_draft_message_validator_testcase::test_validate_additional_email_list_is_invalid Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/save_draft_message_validator_test.php:257 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_save_draft_message_validator_testcase/test_validate_invalid_message_type_is_invalidblock_quickmail_save_draft_message_validator_testcase::test_validate_invalid_message_type_is_invalid Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/save_draft_message_validator_test.php:279 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_send_all_ready_messages_task_testcase/test_send_all_ready_messages_task_sends_messagesblock_quickmail_send_all_ready_messages_task_testcase::test_send_all_ready_messages_task_sends_messages Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/send_all_ready_messages_task_test.php:98 /var/www/html/blocks/quickmail/tests/unit/send_all_ready_messages_task_test.php:48 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
10 | block_quickmail_send_message_adhoc_task_testcase/test_send_message_adhoc_task_sendsblock_quickmail_send_message_adhoc_task_testcase::test_send_message_adhoc_task_sends Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/send_message_adhoc_task_test.php:69 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76

14 | core_privacy.privacy.provider_test/test_all_providers_compliant with data set "block_quickmail"core_privacy\privacy\provider_test::test_all_providers_compliant with data set "block_quickmail" ('block_quickmail', 'block_quickmail\privacy\provider') Failed asserting that false is true.  /var/www/html/privacy/tests/privacy/provider_test.php:179 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_message_form_validator_testcase/test_validate_unsupported_message_type_is_invalidblock_quickmail_message_form_validator_testcase::test_validate_unsupported_message_type_is_invalid Failed asserting that false is true.  /var/www/html/blocks/quickmail/tests/unit/message_form_validator_test.php:289 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_message_persistent_testcase/test_get_all_message_recipientsblock_quickmail_message_persistent_testcase::test_get_all_message_recipients Undefined variable $checkedrecipients  /var/www/html/blocks/quickmail/classes/persistents/message.php:273 /var/www/html/blocks/quickmail/classes/persistents/message.php:276 /var/www/html/blocks/quickmail/tests/unit/message_persistent_test.php:147 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_message_persistent_testcase/test_get_message_recipients_by_statusblock_quickmail_message_persistent_testcase::test_get_message_recipients_by_status Undefined variable $checkedrecipients  /var/www/html/blocks/quickmail/classes/persistents/message.php:273 /var/www/html/blocks/quickmail/classes/persistents/message.php:276 /var/www/html/blocks/quickmail/tests/unit/message_persistent_test.php:183 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_message_persistent_testcase/test_sync_recipientsblock_quickmail_message_persistent_testcase::test_sync_recipients Undefined variable $checkedrecipients  /var/www/html/blocks/quickmail/classes/persistents/message.php:273 /var/www/html/blocks/quickmail/classes/persistents/message.php:276 /var/www/html/blocks/quickmail/tests/unit/message_persistent_test.php:277 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_queued_repo_testcase/test_get_all_messages_to_sendblock_quickmail_queued_repo_testcase::test_get_all_messages_to_send Failed asserting that actual size 3 matches expected size 2.  /var/www/html/blocks/quickmail/tests/unit/queued_repo_test.php:391 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_save_draft_message_validator_testcase/test_validate_unsupported_message_type_is_invalidblock_quickmail_save_draft_message_validator_testcase::test_validate_unsupported_message_type_is_invalid Error: [] operator not supported for strings  /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:89 /var/www/html/blocks/quickmail/tests/unit/traits/submits_compose_message_form.php:34 /var/www/html/blocks/quickmail/tests/unit/save_draft_message_validator_test.php:302 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_subject_prepender_testcase/test_format_course_subject_with_idnumber_settingblock_quickmail_subject_prepender_testcase::test_format_course_subject_with_idnumber_setting Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'[] Hello world!' +'Hello world!'  /var/www/html/blocks/quickmail/tests/unit/subject_prepender_test.php:58 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_subject_prepender_testcase/test_format_course_subject_with_shortname_settingblock_quickmail_subject_prepender_testcase::test_format_course_subject_with_shortname_setting Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'[tc_1] Hello world!' +'Hello world!'  /var/www/html/blocks/quickmail/tests/unit/subject_prepender_test.php:72 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
14 | block_quickmail_subject_prepender_testcase/test_format_course_subject_with_fullname_settingblock_quickmail_subject_prepender_testcase::test_format_course_subject_with_fullname_setting Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'[Test course 1] Hello world!' +'Hello world!'  /var/www/html/blocks/quickmail/tests/unit/subject_prepender_test.php:86 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76
leonstr commented 1 day ago

Pull request #102 has proposed fixes which should cover all of these except:

14 | core_privacy.privacy.provider_test/test_all_providers_compliant with data set "block_quickmail"core_privacy\privacy\provider_test::test_all_providers_compliant with data set "block_quickmail" ('block_quickmail', 'block_quickmail\privacy\provider') Failed asserting that false is true.  /var/www/html/privacy/tests/privacy/provider_test.php:179 /var/www/html/lib/phpunit/classes/advanced_testcase.php:76

which is covered by #35.