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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.0-a1
    • 3.1.0-dev
    • None
    • None

      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().

            nickvergessen Joas Schilling
            bantu Andreas Fischer [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: