New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.3.0 #47

Merged
merged 74 commits into from Sep 25, 2016
Commits
Jump to file or symbol
Failed to load files and symbols.
+16 −19
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Uncomment test, now working

  • Loading branch information...
emulienfou committed Sep 22, 2016
commit 76f44a15484284c347c58e01ac0788298789a3e3
View
@@ -1,7 +1,4 @@
<?php
/**
*/
namespace Dwoo\Tests
{
@@ -217,22 +214,22 @@ public function testGettersSetters()
$this->dwoo->setDefaultCompilerFactory('file', array('Dwoo\Compiler', 'compilerFactory'));
}
// public function testAddAndRemoveResource()
// {
// $this->dwoo->addResource('news', 'Dwoo\Template\File', array('Dwoo\Compiler', 'compilerFactory'));
// $tpl = new TemplateString('{include file="news:' . __DIR__ . '/resources/test.html" foo=3 bar=4}');
// $tpl->forceCompilation();
//
// $compiler = new Compiler();
// $this->assertEquals('34', $this->dwoo->get($tpl, array(), $compiler));
// $this->dwoo->removeResource('news');
//
// $this->dwoo->addResource('file', 'Dwoo\Template\String', 'Fake');
// $this->dwoo->removeResource('file');
// $tpl = new TemplateString('{include file="file:' . __DIR__ . '/resources/test.html" foo=3 bar=4}');
// $tpl->forceCompilation();
// $this->assertEquals('34', $this->dwoo->get($tpl, array()));
// }
public function testAddAndRemoveResource()
{
$this->dwoo->addResource('news', 'Dwoo\Template\File', array('Dwoo\Compiler', 'compilerFactory'));
$tpl = new TemplateString('{include file="news:' . __DIR__ . '/resources/test.html" foo=3 bar=4}');
$tpl->forceCompilation();
$compiler = new Compiler();
$this->assertEquals('34', $this->dwoo->get($tpl, array(), $compiler));
$this->dwoo->removeResource('news');
$this->dwoo->addResource('file', 'Dwoo\Template\String', 'Fake');
$this->dwoo->removeResource('file');
$tpl = new TemplateString('{include file="file:' . __DIR__ . '/resources/test.html" foo=3 bar=4}');
$tpl->forceCompilation();
$this->assertEquals('34', $this->dwoo->get($tpl));
}
public function testTemplateFile()
{
ProTip! Use n and p to navigate between commits in a pull request.