Skip to content

Commit

Permalink
AbstractFixerTestCase - drop testing method already provided by trait
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Jul 30, 2018
1 parent 1c9553a commit 9b0ae9c
Showing 1 changed file with 0 additions and 21 deletions.
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

0 comments on commit 9b0ae9c

Please sign in to comment.