Nelmio\Alice\FixtureBuilder\ExpressionLanguage\Lexer\LexerIntegrationTest::testTestCanLexValues PHP Method

testTestCanLexValues() public method

public testTestCanLexValues ( string $value, $expected )
$value string
    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);
    }