mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Update to 1.1
Read CHANGELOG.md#1.1.0
This commit is contained in:
@@ -9,20 +9,45 @@ class TestCase extends \PHPUnit_Framework_TestCase {
|
||||
public $fenom;
|
||||
|
||||
public $values = array(
|
||||
"one" => 1,
|
||||
"zero" => 0,
|
||||
"one" => 1,
|
||||
"two" => 2,
|
||||
"three" => 3,
|
||||
"float" => 4.5,
|
||||
"bool" => true,
|
||||
0 => "empty value",
|
||||
1 => "one value",
|
||||
2 => "two value",
|
||||
3 => "three value",
|
||||
);
|
||||
|
||||
public static function getVars() {
|
||||
return array(
|
||||
"zero" => 0,
|
||||
"one" => 1,
|
||||
"two" => 2,
|
||||
"three" => 3,
|
||||
"float" => 4.5,
|
||||
"bool" => true,
|
||||
"obj" => new \StdClass,
|
||||
"list" => array(
|
||||
"a" => 1,
|
||||
"b" => 2
|
||||
),
|
||||
0 => "empty value",
|
||||
1 => "one value",
|
||||
2 => "two value",
|
||||
3 => "three value",
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
if(!file_exists(FENOM_RESOURCES.'/compile')) {
|
||||
mkdir(FENOM_RESOURCES.'/compile', 0777, true);
|
||||
} else {
|
||||
FS::clean(FENOM_RESOURCES.'/compile/');
|
||||
}
|
||||
|
||||
$this->fenom = Fenom::factory(FENOM_RESOURCES.'/template', FENOM_RESOURCES.'/compile');
|
||||
$this->fenom->addModifier('dots', __CLASS__.'::dots');
|
||||
$this->fenom->addModifier('concat', __CLASS__.'::concat');
|
||||
|
||||
Reference in New Issue
Block a user