Skip to content
Snippets Groups Projects
Commit d98f6acb authored by catch's avatar catch
Browse files

Revert "Issue #3069415 by bomoko, voleger: Call to deprecated method...

Revert "Issue #3069415 by bomoko, voleger: Call to deprecated method getSource() of class Drupal\twig_loader_test\Loader\TestLoader in core/modules/system/tests/modules/twig_loader_test/src/Loader/TestLoader.php on line 17"

This reverts commit dabe7a91.
parent dabe7a91
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ class TestLoader implements \Twig_LoaderInterface, \Twig_ExistsLoaderInterface,
*/
public function getSourceContext($name) {
$name = (string) $name;
$value = $name === 'kittens' ? 'kittens' : 'cats';
$value = $this->getSource($name);
return new Source($value, $name);
}
......@@ -22,7 +22,12 @@ public function getSourceContext($name) {
* {@inheritdoc}
*/
public function getSource($name) {
return $this->getSourceContext($name)->getCode();
if ($name == 'kittens') {
return $name;
}
else {
return 'cats';
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment