Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX: AbstractFixerTestCase - drop testing method already provided by trait #3952

Merged
merged 1 commit into from Jul 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 0 additions & 21 deletions tests/Test/AbstractFixerTestCase.php
Expand Up @@ -182,27 +182,6 @@ protected function lintSource($source)
}
}

private function assertTokens(Tokens $expectedTokens, Tokens $inputTokens)
{
foreach ($expectedTokens as $index => $expectedToken) {
$option = ['JSON_PRETTY_PRINT'];
$inputToken = $inputTokens[$index];

$this->assertTrue(
$expectedToken->equals($inputToken),
sprintf("The token at index %d must be:\n%s,\ngot:\n%s.", $index, $expectedToken->toJson($option), $inputToken->toJson($option))
);

$expectedTokenKind = $expectedToken->isArray() ? $expectedToken->getId() : $expectedToken->getContent();
$this->assertTrue(
$inputTokens->isTokenKindFound($expectedTokenKind),
sprintf('The token kind %s must be found in fixed tokens collection.', $expectedTokenKind)
);
}

$this->assertSame($expectedTokens->count(), $inputTokens->count(), 'Both collections must have the same length.');
}

/**
* @return LinterInterface
*/
Expand Down