1
0
Fork 0

Support document formatting #8

pull/10/head
Michal Niewrzal 2016-09-06 12:04:47 +02:00
parent 9e9744a6c2
commit 0c0dfed573
1 changed files with 2 additions and 2 deletions

View File

@ -206,11 +206,11 @@ class TextDocumentTest extends TestCase
$textDocumentItem->uri = 'whatever'; $textDocumentItem->uri = 'whatever';
$textDocumentItem->languageId = 'php'; $textDocumentItem->languageId = 'php';
$textDocumentItem->version = 1; $textDocumentItem->version = 1;
$textDocumentItem->text = file_get_contents(__DIR__ . '/../../fixtures/Format.php'); $textDocumentItem->text = file_get_contents(__DIR__ . '/../../fixtures/format.php');
$textDocument->didOpen($textDocumentItem); $textDocument->didOpen($textDocumentItem);
// how code should look after formatting // how code should look after formatting
$expected = file_get_contents(__DIR__ . '/../../fixtures/Format_expected.php'); $expected = file_get_contents(__DIR__ . '/../../fixtures/format_expected.php');
// Request formatting // Request formatting
$result = $textDocument->formatting(new TextDocumentIdentifier('whatever'), new FormattingOptions()); $result = $textDocument->formatting(new TextDocumentIdentifier('whatever'), new FormattingOptions());
$this->assertEquals([0 => [ $this->assertEquals([0 => [