Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65089

Glossary - Case sensitive comparison should be enforced in SQL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5.6, 3.6.4
    • 3.5.5, 3.6.3
    • Glossary

      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.

            dvdcastro David Castro
            dvdcastro David Castro
            Shamim Rezaie Shamim Rezaie
            Jake Dallimore Jake Dallimore
            CiBoT CiBoT
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.