+ @staticmethod
+ def test_custom_phpcgi(tmp_path, capfd):
+ assert exec_utils.run_api_script('test', tmp_path, phpcgi_bin='env',
+ params={'q' : 'Berlin'}) == 0
+ captured = capfd.readouterr()
+
+ assert '?q=Berlin' in captured.out
+
+ @staticmethod
+ def test_fail_on_error_output(tmp_path):
+ (tmp_path / 'website' / 'bad.php').write_text("<?php\nfwrite(STDERR, 'WARNING'.PHP_EOL);")
+
+ assert exec_utils.run_api_script('bad', tmp_path) == 1