Skip to content

Conversation

@ScottVerbeek
Copy link
Contributor

@ScottVerbeek ScottVerbeek commented Jan 10, 2024

Added default value for settings, resolving the failing unit test in core. Doesn't a empty string cause a problem? No the following line will take care of the empty string: https://github.com/catalyst/moodle-local_datacleaner/blob/MOODLE_311_STABLE/classes/clean.php#L383C18-L383C18

Unit test result of test test_admin_output_new_settings_by_page on Moodle 4.3
root@c3e2c38a9c70:/var/www/vanilla-403# vendor/bin/phpunit --filter test_admin_output_new_settings_by_page Moodle 4.3.2+ (Build: 20240104), 40890bf181407b0a84990916070ff1b9b0357716
Php: 8.1.24, pgsql: 14.0 (Debian 14.0-1.pgdg110+1), OS: Linux 6.4.12-060412-generic x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 00:01.375, Memory: 366.00 MB

OK (1 test, 2 assertions)
root@c3e2c38a9c70:/var/www/vanilla-403# vendor/bin/phpunit --list-suites
Moodle 4.3.2+ (Build: 20240104), 40890bf181407b0a84990916070ff1b9b0357716
Php: 8.1.24, pgsql: 14.0 (Debian 14.0-1.pgdg110+1), OS: Linux 6.4.12-060412-generic x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
Unit test result of testsuites cleaner_backup_testsuite, cleaner_config_testsuite, cleaner_email_testsuite, cleaner_orphaned_sitedata_testsuite, cleaner_replace_urls_testsuite, local_datacleaner_testsuite on Moodle 4.3
Moodle 4.3.2+ (Build: 20240104), 40890bf181407b0a84990916070ff1b9b0357716
Php: 8.1.24, pgsql: 14.0 (Debian 14.0-1.pgdg110+1), OS: Linux 6.4.12-060412-generic x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

..................................................                50 / 50 (100%)

Time: 00:04.641, Memory: 72.50 MB

OK (50 tests, 141 assertions)

Closes #169

@ScottVerbeek ScottVerbeek linked an issue Jan 10, 2024 that may be closed by this pull request
@ScottVerbeek ScottVerbeek force-pushed the 169-failing-core-unit-tests-duo-to-incorrect-default-value branch from a9d0675 to 2fa8474 Compare January 10, 2024 23:30
@ScottVerbeek ScottVerbeek changed the title issue #51: Add default settings for cleaner_custom_sql_pre and _post issue #169: Add default settings for cleaner_custom_sql_pre and _post Jan 10, 2024
@keevan keevan merged commit eafa2e6 into MOODLE_311_STABLE Jan 10, 2024
@keevan keevan deleted the 169-failing-core-unit-tests-duo-to-incorrect-default-value branch January 10, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing core unit tests duo to incorrect default value

3 participants