Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9592

Test suite does not run on SQLite

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.8-RC1
    • 3.0.7-PL1, 3.1.0-dev
    • None
    • None
    • PHP 5.3.1, PDO enabled, SQLite 2 and 3 enabled, PHPUnit 3.4.11.

      tests/test_framework/phpbb_database_test_case.php does not handle SQLite databases very well. It doesn't open the database correctly, the DSN is wrong.

      Some of the CREATE queries can lead to issues, see: http://bugs.php.net/bug.php?id=51492

      The PDO connection uses sqlite3, phpBB's DBAL only supports sqlite2. The two are not compatible, therefore phpBB cannot open the database.

      PHPUnit does not support sqlite2. I have created a patch to add support and sent a pull request: http://github.com/evil3/phpunit/compare/3.4...sqlite2-mapping

      You can use my fork of PHPUnit to run the tests. Just do:

      cd phpbb3/tests/
      /path/to/evil3/phpunit/phpunit.php dbal/all_tests.php

        1. patched-output.txt
          14 kB
        2. test_config.php
          0.1 kB
        3. unpatched-output.txt
          0.2 kB

            igorw Igor Wiedler [X] (Inactive)
            igorw Igor Wiedler [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: