Skip to content

Commit 43b8e15

Browse files
committed
docs: fix README — await loadFile and use builder.toString()
1 parent 0a8e50e commit 43b8e15

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/phpunit/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ await initTreeSitter();
107107

108108
// 2. Load configuration
109109
const phpUnitXML = new PHPUnitXML();
110-
phpUnitXML.loadFile('/path/to/phpunit.xml');
110+
await phpUnitXML.loadFile('/path/to/phpunit.xml');
111111

112112
// 3. Create parser with AST chain (tree-sitter → php-parser fallback)
113113
const astParser = new ChainAstParser([
@@ -181,7 +181,7 @@ runner.on(TeamcityEvent.testResultSummary, (result) => {
181181

182182
// Runner lifecycle events
183183
runner.on(TestRunnerEvent.run, (builder) => {
184-
console.log('Command:', builder.getRuntime(), builder.getArguments());
184+
console.log('Command:', builder.toString());
185185
});
186186
runner.on(TestRunnerEvent.close, (code) => {
187187
console.log('Exit code:', code);

packages/phpunit/README.zh-TW.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ await initTreeSitter();
106106

107107
// 2. 載入設定
108108
const phpUnitXML = new PHPUnitXML();
109-
phpUnitXML.loadFile('/path/to/phpunit.xml');
109+
await phpUnitXML.loadFile('/path/to/phpunit.xml');
110110

111111
// 3. 建立解析器,使用 AST 鏈(tree-sitter → php-parser 備援)
112112
const astParser = new ChainAstParser([
@@ -180,7 +180,7 @@ runner.on(TeamcityEvent.testResultSummary, (result) => {
180180

181181
// Runner 生命週期事件
182182
runner.on(TestRunnerEvent.run, (builder) => {
183-
console.log('命令:', builder.getRuntime(), builder.getArguments());
183+
console.log('命令:', builder.toString());
184184
});
185185
runner.on(TestRunnerEvent.close, (code) => {
186186
console.log('結束代碼:', code);

0 commit comments

Comments
 (0)