Skip to content

Commit

Permalink
Remove hard-coded file count in language server test.
Browse files Browse the repository at this point in the history
  • Loading branch information
John S Long committed Apr 30, 2017
1 parent 929ea30 commit ad077ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/LanguageServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function testIndexingWithDirectFileAccess()
if ($msg->body->method === 'window/logMessage' && $promise->state === Promise::PENDING) {
if ($msg->body->params->type === MessageType::ERROR) {
$promise->reject(new Exception($msg->body->params->message));
} else if (strpos($msg->body->params->message, 'All 27 PHP files parsed') !== false) {
} else if (preg_match('/All [0-9]+ PHP files parsed/', $msg->body->params->message)) {
$promise->fulfill();
}
}
Expand Down Expand Up @@ -103,7 +103,7 @@ public function testIndexingWithFilesAndContentRequests()
if ($promise->state === Promise::PENDING) {
$promise->reject(new Exception($msg->body->params->message));
}
} else if (strpos($msg->body->params->message, 'All 27 PHP files parsed') !== false) {
} else if (preg_match('/All [0-9]+ PHP files parsed/', $msg->body->params->message)) {
$promise->fulfill();
}
}
Expand Down

0 comments on commit ad077ba

Please sign in to comment.