public function testTestCanLexValues(string $value, $expected)
{
try {
$actual = $this->lexer->lex($value);
if (null === $expected) {
$this->fail(sprintf('Expected exception to be thrown for "%s", got "%s" instead.', $value, var_export($actual, true)));
}
} catch (\InvalidArgumentException $exception) {
if (null === $expected) {
return;
}
throw $exception;
} catch (LexException $exception) {
if (null === $expected) {
return;
}
throw $exception;
}
$this->assertEquals($expected, $actual, var_export($actual, true));
$this->assertSameSize($expected, $actual);
}