private function assertTokens(Tokens $expectedTokens, Tokens $inputTokens)
{
foreach ($expectedTokens as $index => $expectedToken) {
$inputToken = $inputTokens[$index];
$option = array('JSON_PRETTY_PRINT');
$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)));
}
$this->assertSame($expectedTokens->count(), $inputTokens->count(), 'The collection must have the same length than the expected one.');
$foundTokenKinds = array_keys(AccessibleObject::create($expectedTokens)->foundTokenKinds);
foreach ($foundTokenKinds as $tokenKind) {
$this->assertTrue($inputTokens->isTokenKindFound($tokenKind), sprintf('The token kind %s must be found in fixed tokens collection.', $tokenKind));
}
}