Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11605

Order of files and directories given to phpbb_test_case_helpers->remove_files() matters.

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: None
    • Labels:
      None

      Description

      The order of files and directories given to phpbb_test_case_helpers->remove_files() matters.

      PHP Warning:  rmdir(phpBB/ext/./foo): Directory not empty in /var/www/projects/phpbb3/tests/test_framework/phpbb_test_case_helpers.php on line 269
      PHP Stack trace:
      PHP   1. {main}() /usr/bin/phpunit:0
      PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
      PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
      PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:176
      PHP   5. PHPUnit_Framework_TestSuite->run() /var/www/projects/phpbb3/phpBB/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349
      PHP   6. PHPUnit_Framework_TestSuite->run() /var/www/projects/phpbb3/phpBB/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:705
      PHP   7. call_user_func() /var/www/projects/phpbb3/phpBB/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:756
      PHP   8. phpbb_functional_extension_acp_test::tearDownAfterClass() /var/www/projects/phpbb3/phpBB/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:756
      PHP   9. phpbb_test_case_helpers->restore_original_ext_dir() /var/www/projects/phpbb3/tests/functional/extension_acp_test.php:33
      PHP  10. phpbb_test_case_helpers->remove_files() /var/www/projects/phpbb3/tests/test_framework/phpbb_test_case_helpers.php:64
      PHP  11. rmdir() /var/www/projects/phpbb3/tests/test_framework/phpbb_test_case_helpers.php:269
      

      A solution could be using empty_dir() instead and removing remove_files().

        Attachments

          Activity

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              bantu Andreas Fischer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: