我通過從引導文件切換到擴展來解決了這個問題。例子:在 codeception.yml 中:extensions: enabled: - Bootstrapper該類可lib/Bootstrapper.php通過 Composer 的類列表功能找到composer.json:{ "autoload": { "classmap": [ "lib/" ] }}看起來像這樣:<?phpuse Codeception\Events;use Codeception\Extension;class Bootstrapper extends Extension { public static $events = [ Events::SUITE_BEFORE => 'beforeSuite', ]; public function beforeSuite() { $module = 'PhpBrowser'; if ($this->hasModule('WebDriver')) { $module = 'WebDriver'; } /* expose info, if we're in real-browser context */ define('IS_REAL_BROWSER', $module === 'WebDriver'); /* make sure the helper functions are loaded */ require_once __DIR__.'/../tests/acceptance/_helpers.php'; }}
如何從 gcloud 數據存儲中檢索有序數據(使用 php)?
慕的地6264312
2023-03-04 18:03:40