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

Database Test Case Must Purge Extension Schema When Done

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-RC1
    • 3.1.0-dev, 3.1.0-b4
    • Test Suite
    • None

      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.

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

              Created:
              Updated:
              Resolved: