Skip to content

Commit ad077ba

Browse files
committed
Remove hard-coded file count in language server test.
1 parent 929ea30 commit ad077ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/LanguageServerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testIndexingWithDirectFileAccess()
5757
if ($msg->body->method === 'window/logMessage' && $promise->state === Promise::PENDING) {
5858
if ($msg->body->params->type === MessageType::ERROR) {
5959
$promise->reject(new Exception($msg->body->params->message));
60-
} else if (strpos($msg->body->params->message, 'All 27 PHP files parsed') !== false) {
60+
} else if (preg_match('/All [0-9]+ PHP files parsed/', $msg->body->params->message)) {
6161
$promise->fulfill();
6262
}
6363
}
@@ -103,7 +103,7 @@ public function testIndexingWithFilesAndContentRequests()
103103
if ($promise->state === Promise::PENDING) {
104104
$promise->reject(new Exception($msg->body->params->message));
105105
}
106-
} else if (strpos($msg->body->params->message, 'All 27 PHP files parsed') !== false) {
106+
} else if (preg_match('/All [0-9]+ PHP files parsed/', $msg->body->params->message)) {
107107
$promise->fulfill();
108108
}
109109
}

0 commit comments

Comments
 (0)