[ticket/15214] Fix Windows tests

PHPBB3-15214
This commit is contained in:
rxu 2023-12-10 23:24:11 +07:00 committed by toxyy
parent d38d59c8d9
commit 01ae4ed1f7
8 changed files with 4 additions and 32 deletions

View file

@ -543,10 +543,9 @@ jobs:
New-WebHandler -Name "PHP-FastCGI" -Path "*.php" -Modules FastCgiModule -ScriptProcessor "C:\tools\php\php-cgi.exe" -Verb '*' -ResourceType Either New-WebHandler -Name "PHP-FastCGI" -Path "*.php" -Modules FastCgiModule -ScriptProcessor "C:\tools\php\php-cgi.exe" -Verb '*' -ResourceType Either
iisreset iisreset
NET START W3SVC NET START W3SVC
icacls "${env:GITHUB_WORKSPACE}\phpBB\cache" /grant "Users:(OI)(CI)F" /T
mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test" mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test"
mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test\twig"
mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\installer" mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\installer"
icacls "${env:GITHUB_WORKSPACE}\phpBB\cache" /grant Users:F /T
icacls "${env:GITHUB_WORKSPACE}\phpBB\files" /grant Users:F /T icacls "${env:GITHUB_WORKSPACE}\phpBB\files" /grant Users:F /T
icacls "${env:GITHUB_WORKSPACE}\phpBB\store" /grant Users:F /T icacls "${env:GITHUB_WORKSPACE}\phpBB\store" /grant Users:F /T
icacls "${env:GITHUB_WORKSPACE}\phpBB\images\avatars\upload" /grant Users:F /T icacls "${env:GITHUB_WORKSPACE}\phpBB\images\avatars\upload" /grant Users:F /T

View file

@ -55,13 +55,6 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
$this->purge_cache(); $this->purge_cache();
} }
protected function tearDown(): void
{
$this->purge_cache();
parent::tearDown();
}
/** /**
* Check a controller for extension foo/bar. * Check a controller for extension foo/bar.
*/ */

View file

@ -52,13 +52,6 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_
$this->purge_cache(); $this->purge_cache();
} }
protected function tearDown(): void
{
$this->purge_cache();
parent::tearDown();
}
public function test_load_extension_lang_globally() public function test_load_extension_lang_globally()
{ {
$this->phpbb_extension_manager->enable('foo/bar'); $this->phpbb_extension_manager->enable('foo/bar');

View file

@ -43,7 +43,6 @@ class phpbb_functional_extension_module_test extends phpbb_functional_test_case
protected function tearDown(): void protected function tearDown(): void
{ {
$this->phpbb_extension_manager->purge('foo/bar'); $this->phpbb_extension_manager->purge('foo/bar');
$this->purge_cache();
parent::tearDown(); parent::tearDown();
} }

View file

@ -41,13 +41,6 @@ class phpbb_functional_extension_permission_lang_test extends phpbb_functional_t
self::$helper->restore_original_ext_dir(); self::$helper->restore_original_ext_dir();
} }
protected function tearDown(): void
{
$this->purge_cache();
parent::tearDown();
}
protected function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View file

@ -39,13 +39,6 @@ class phpbb_functional_extension_template_event_order_test extends phpbb_functio
self::$helper->restore_original_ext_dir(); self::$helper->restore_original_ext_dir();
} }
protected function tearDown(): void
{
$this->purge_cache();
parent::tearDown();
}
protected function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View file

@ -27,7 +27,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
protected function tearDown(): void protected function tearDown(): void
{ {
$this->phpbb_extension_manager->purge('foo/bar'); $this->phpbb_extension_manager->purge('foo/bar');
$this->purge_cache();
parent::tearDown(); parent::tearDown();
} }

View file

@ -123,6 +123,9 @@ class phpbb_functional_test_case extends phpbb_test_case
// Close the database connections again this test // Close the database connections again this test
$this->db->sql_close(); $this->db->sql_close();
} }
$this->purge_cache();
sleep(3); // Give it some time to delete all the files correctly
} }
/** /**