Skip to content

Commit

Permalink
Merge pull request #1334 from sjinks/view-engines
Browse files Browse the repository at this point in the history
Fix 'expected object implementing Phalcon\Mvc\View\EngineInterface' bug in the tests
  • Loading branch information
Phalcon committed Oct 4, 2013
2 parents ba60297 + d2d22e2 commit 75313f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions unit-tests/ViewEnginesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
/**
* Adapter to use Mustache library as templating engine
*/
class My_Mustache_Engine extends \Phalcon\Mvc\View\Engine
class My_Mustache_Engine extends \Phalcon\Mvc\View\Engine implements \Phalcon\Mvc\View\EngineInterface
{

protected $_mustache;

protected $_params;

public function __construct(Phalcon\Mvc\View $view, Phalcon\DI $di)
public function __construct($view, $di = null)
{
$this->_mustache = new Mustache_Engine();
parent::__construct($view, $di);
Expand All @@ -53,12 +53,12 @@ public function render($path, $params, $mustClean=false)
/**
* Adapter to use Twig library as templating engine
*/
class My_Twig_Engine extends \Phalcon\Mvc\View\Engine
class My_Twig_Engine extends \Phalcon\Mvc\View\Engine implements \Phalcon\Mvc\View\EngineInterface
{

protected $_twig;

public function __construct(Phalcon\Mvc\View $view, Phalcon\DI $di)
public function __construct($view, $di = null)
{
$loader = new Twig_Loader_Filesystem($view->getViewsDir());
$this->_twig = new Twig_Environment($loader);
Expand Down
Empty file added unit-tests/engines/.gitignore
Empty file.

0 comments on commit 75313f4

Please sign in to comment.