Merge branch '3.4' into 4.2
* 3.4: [TwigBridge] fix tests
This commit is contained in:
commit
1d02ef2ccb
@ -48,6 +48,8 @@ before_install:
|
|||||||
# Enable Sury ppa
|
# Enable Sury ppa
|
||||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157
|
||||||
sudo add-apt-repository -y ppa:ondrej/php
|
sudo add-apt-repository -y ppa:ondrej/php
|
||||||
|
sudo rm /etc/apt/sources.list.d/google-chrome.list
|
||||||
|
sudo rm /etc/apt/sources.list.d/mongodb-3.4.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y librabbitmq-dev libsodium-dev
|
sudo apt install -y librabbitmq-dev libsodium-dev
|
||||||
|
|
||||||
|
@ -30,9 +30,14 @@ class FormThemeTokenParserTest extends TestCase
|
|||||||
{
|
{
|
||||||
$env = new Environment($this->getMockBuilder('Twig\Loader\LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
|
$env = new Environment($this->getMockBuilder('Twig\Loader\LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
|
||||||
$env->addTokenParser(new FormThemeTokenParser());
|
$env->addTokenParser(new FormThemeTokenParser());
|
||||||
$stream = $env->tokenize(new Source($source, ''));
|
$source = new Source($source, '');
|
||||||
|
$stream = $env->tokenize($source);
|
||||||
$parser = new Parser($env);
|
$parser = new Parser($env);
|
||||||
|
|
||||||
|
if (method_exists($expected, 'setSourceContext')) {
|
||||||
|
$expected->setSourceContext($source);
|
||||||
|
}
|
||||||
|
|
||||||
$this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0));
|
$this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user