1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Moved off of deprecated Twig classes

This commit is contained in:
Deltik
2019-03-29 10:14:27 -05:00
parent 024287d821
commit ddb88c726d
3 changed files with 8 additions and 5 deletions

2
e107

Submodule e107 updated: a8d1541b9d...c060d5ace2

View File

@@ -6,6 +6,9 @@ include_once(codecept_root_dir() . "lib/preparers/PreparerFactory.php");
// all public methods declared in helper class will be available in $I // all public methods declared in helper class will be available in $I
use Codeception\Lib\ModuleContainer; use Codeception\Lib\ModuleContainer;
use PreparerFactory;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
abstract class E107Base extends Base abstract class E107Base extends Base
{ {
@@ -16,7 +19,7 @@ abstract class E107Base extends Base
public function __construct(ModuleContainer $moduleContainer, $config = null) public function __construct(ModuleContainer $moduleContainer, $config = null)
{ {
parent::__construct($moduleContainer, $config); parent::__construct($moduleContainer, $config);
$this->preparer = \PreparerFactory::create(); $this->preparer = PreparerFactory::create();
} }
public function _beforeSuite($settings = array()) public function _beforeSuite($settings = array())
@@ -37,10 +40,10 @@ abstract class E107Base extends Base
protected function writeLocalE107Config() protected function writeLocalE107Config()
{ {
$twig_loader = new \Twig_Loader_Array([ $twig_loader = new ArrayLoader([
'e107_config.php' => file_get_contents(codecept_data_dir()."/e107_config.php.sample") 'e107_config.php' => file_get_contents(codecept_data_dir()."/e107_config.php.sample")
]); ]);
$twig = new \Twig_Environment($twig_loader); $twig = new Environment($twig_loader);
$db = $this->getModule('\Helper\DelayedDb'); $db = $this->getModule('\Helper\DelayedDb');