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

Database Test Case Must Purge Extension Schema When Done

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.0-dev, 3.1.0-b4
    • 3.1.0-RC1
    • Test Suite
    • 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

            nickvergessen Joas Schilling
            VSE Matt Friedman [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: