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

Database Test Case Must Purge Extension Schema When Done

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev, 3.1.0-b4
    • Fix Version/s: 3.1.0-RC1
    • Component/s: Test Suite
    • Labels:
      None

      Description

      The schema.json files created for extensions by the database test case need to be erased/purged after tests are run. If not, then they become stale on locally run tests, which can lead to false test failures during extension development.

      I think this just needs an

      unlink(self::$schema_file);

      in the tearDownAfterClass method, like:

      	static public function tearDownAfterClass()
      	{
      		if (self::$schema_file !== '')
      		{
      			copy(self::$phpbb_schema_copy, self::$install_schema_file);
      			unlink(self::$schema_file);
      		}
       
      		parent::tearDownAfterClass();
      	}
      

      Otherwise, perhaps storing these files in the phpBB/cache will work too, as that is a regularly purged.

        Attachments

          Activity

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              VSE Matt Friedman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: