Skip to content

Fix default value#1

Merged
vithushau merged 2 commits into
catalyst:master-catalystfrom
TomoTsuyuki:fix-default-value
Oct 10, 2025
Merged

Fix default value#1
vithushau merged 2 commits into
catalyst:master-catalystfrom
TomoTsuyuki:fix-default-value

Conversation

@TomoTsuyuki
Copy link
Copy Markdown

@vithushau
Copy link
Copy Markdown

image

After applying the changes, I can see the default option in the settings! that seems to be correct. However, I’m still getting the failure.

root@b8c70a1b12b5:/var/www/ltu-45# vendor/bin/phpunit --testsuite=core_testsuite --filter=adminlib_test::test_admin_apply_default_settings
Moodle 4.5.6+ (Build: 20250919), 6e3fc8e752487a818bd77e1069f684fb8d6ff884
Php: 8.3.19, pgsql: 16.0 (Debian 16.0-1.pgdg120+1), OS: Linux 6.14.0-33-generic x86_64
PHPUnit 9.6.18 by Sebastian Bergmann and contributors.

F                                                                   1 / 1 (100%)

Time: 00:03.013, Memory: 194.00 MB

There was 1 failure:

1) core\adminlib_test::test_admin_apply_default_settings
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 ()
+Array &0 (
+    'local_learning_analytics/student_enrols_groupby' => 'id'
+)

/var/www/ltu-45/lib/tests/adminlib_test.php:174
/var/www/ltu-45/lib/phpunit/classes/advanced_testcase.php:76

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

@TomoTsuyuki
Copy link
Copy Markdown
Author

Thanks @vithushau for review!

It looks like we need to clean the cache before testing.

I updated the version so the system forced to clear the cache.

@vithushau
Copy link
Copy Markdown

Merging this one. Thanks @TomoTsuyuki

root@b8c70a1b12b5:/var/www/ltu-45# vendor/bin/phpunit --testsuite=core_testsuite --filter=adminlib_test::test_admin_apply_default_settings
Moodle 4.5.6+ (Build: 20250919), 6e3fc8e752487a818bd77e1069f684fb8d6ff884
Php: 8.3.19, pgsql: 16.0 (Debian 16.0-1.pgdg120+1), OS: Linux 6.14.0-33-generic x86_64
PHPUnit 9.6.18 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 00:07.628, Memory: 200.00 MB

OK (1 test, 6 assertions)

@vithushau vithushau merged commit 4128b30 into catalyst:master-catalyst Oct 10, 2025
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.

2 participants