8000 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported by maidmaid · Pull Request #21722 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported #21722

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

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
maidmaid committed Feb 22, 2017
commit 7a5d047ff3de3dd453886bded7ddb578f499e07f
12 changes: 8 additions & 4 deletions src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class ParserTest extends TestCase
public function testParseWithInvalidName()
{
$lexer = new Lexer();
$parser = new Parser(array());
$functions = array();
$parser = new Parser($functions);
$parser->parse($lexer->tokenize('foo'));
}

Expand All @@ -36,7 +37,8 @@ public function testParseWithInvalidName()
public function testParseWithZeroInNames()
{
$lexer = new Lexer();
$parser = new Parser(array());
$functions = array();
$parser = new Parser($functions);
$parser->parse($lexer->tokenize('foo'), array(0));
}

Expand All @@ -46,7 +48,8 @@ public function testParseWithZeroInNames()
public function testParse($node, $expression, $names = array())
{
$lexer = new Lexer();
$parser = new Parser(array());
$functions = array();
$parser = new Parser($functions);
$this->assertEquals($node, $parser->parse($lexer->tokenize($expression), $names));
}

Expand Down Expand Up @@ -170,7 +173,8 @@ private function createGetAttrNode($node, $item, $type)
public function testParseWithInvalidPostfixData($expr, $names = array())
{
$lexer = new Lexer();
$parser = new Parser(array());
$functions = array();
$parser = new Parser($functions);
$parser->parse($lexer->tokenize($expr), $names);
}

Expand Down
0