-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.5, 3.6.3
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MDL-65089_master -
When running glossary entries search test, if the DB is not correctly configured for case sensitivity, which MySQL isn't by default, the search will not work. Hence, the unit test will fail.
$ vendor/bin/phpunit --filter test_glossary_get_entries_search mod/glossary/tests/lib_test.php
|
Moodle 3.6.3 (Build: 20190311), 0c3e8dd277bc521985f86cdc33756bcb15d0ad83
|
Php: 7.1.20.1.16.04.1.1, mysqli: 5.7.23-0ubuntu0.16.04.1, OS: Linux 4.4.0-116-generic x86_64
|
PHPUnit 6.5.8 by Sebastian Bergmann and contributors.
|
|
F 1 / 1 (100%)
|
|
Time: 7.12 seconds, Memory: 120.00MB
|
|
There was 1 failure:
|
|
1) mod_glossary_lib_testcase::test_glossary_get_entries_search
|
Failed asserting that actual size 1 matches expected size 0.
|
|
/vagrant/www/moodle/mod/glossary/tests/lib_test.php:504
|
/vagrant/www/moodle/lib/phpunit/classes/advanced_testcase.php:91
|
|
To re-run:
|
vendor/bin/phpunit "mod_glossary_lib_testcase" mod/glossary/tests/lib_test.php
|
|
FAILURES!
|
Tests: 1, Assertions: 7, Failures: 1.
|
Using $DB->sql_equal instead of direct comparison will fix this issue.