-def run_website_script(envdir, config):
- config.lib_dir.php = envdir / 'php'
- config.project_dir = envdir
- refresh.setup_website(envdir, config)
+@pytest.fixture
+def run_website_script(tmp_path, def_config, temp_db_conn):
+ def_config.lib_dir.php = tmp_path / 'php'
+ def_config.project_dir = tmp_path
+
+ def _runner():
+ refresh.setup_website(tmp_path, def_config, temp_db_conn)
+
+ proc = subprocess.run(['/usr/bin/env', 'php', '-Cq',
+ tmp_path / 'search.php'], check=False)