Commit 900506f7 authored by Fabien Potencier's avatar Fabien Potencier

minor #1454 fixed deprecation warnings (fabpot)

This PR was merged into the 1.3 branch.

Discussion
----------

fixed deprecation warnings

Commits
-------

dee8492b fixed deprecation warnings
parents 59fb2562 dee8492b
...@@ -11,7 +11,7 @@ before_install: ...@@ -11,7 +11,7 @@ before_install:
before_script: before_script:
# symfony/* # symfony/*
- sh -c "if [ '$TWIG_VERSION' != '2.0' ]; then sed -i 's/~1.8|~2.0/~1.8/g' composer.json; composer update; fi" - sh -c "if [ '$TWIG_VERSION' != '2.0' ]; then sed -i 's/~1\.28|~2\.0/~1.28/g' composer.json; php -d memory_limit=-1 `which composer` update; fi"
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.0' ]; then sed -i 's/~2\.3|3\.0\.\*/3.0.*@dev/g' composer.json; composer update; fi" - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.0' ]; then sed -i 's/~2\.3|3\.0\.\*/3.0.*@dev/g' composer.json; composer update; fi"
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.8' ]; then sed -i 's/~2\.3|3\.0\.\*/2.8.*@dev/g' composer.json; composer update; fi" - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.8' ]; then sed -i 's/~2\.3|3\.0\.\*/2.8.*@dev/g' composer.json; composer update; fi"
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '' ]; then sed -i 's/~2\.3|3\.0\.\*/2.7.*@dev/g' composer.json; composer update; fi" - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '' ]; then sed -i 's/~2\.3|3\.0\.\*/2.7.*@dev/g' composer.json; composer update; fi"
......
...@@ -76,10 +76,10 @@ class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase ...@@ -76,10 +76,10 @@ class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase
'twig.templates' => array('foo' => 'foo'), 'twig.templates' => array('foo' => 'foo'),
)); ));
$loader = $this->getMockBuilder('\Twig_LoaderInterface')->getMock(); $loader = $this->getMockBuilder('\Twig_LoaderInterface')->getMock();
$loader->expects($this->never())->method('getSource'); $loader->expects($this->never())->method('getSourceContext');
$app['twig.loader.filesystem'] = $app->share(function ($app) use ($loader) { $app['twig.loader.filesystem'] = $app->share(function ($app) use ($loader) {
return $loader; return $loader;
}); });
$this->assertEquals('foo', $app['twig.loader']->getSource('foo')); $this->assertEquals('foo', $app['twig.loader']->getSourceContext('foo')->getCode());
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment