Permalink
Browse files

Update tests/index.php

  • Loading branch information...
hugokernel committed Feb 29, 2012
1 parent acd2db8 commit 15fc764cea5815fbddac1a0c3b7b22e40e4efd4c
Showing with 7 additions and 24 deletions.
  1. +7 −24 tests/index.php
View
@@ -111,6 +111,12 @@ function hello($name = null) {
'lang_switch' => ($lang == 'en' ? 'fr' : 'en'),
));
$t->setVars(array(
'var_default_null' => null,
'var_default_false' => false,
'var_default_0' => 0,
));
// Ouvre le dossier
if (!$files = @scandir($dir)) {
exit("Unable to open « $dir »");
@@ -141,30 +147,7 @@ function hello($name = null) {
$t->render('block.always.called');
$lines = array(
0 => array(
'text' => null
),
1 => array(
'text' => ''
),
2 => array(
'text' => false
),
3 => array(
'text' => 0
),
4 => array(
'text' => 'some text'
),
);
foreach ($lines as $line) {
$t->setVar('line', $line);
$t->render('block_with_defaults');
}
// Affiche le résultat
echo $t->render();
?>
?>

0 comments on commit 15fc764

Please sign in to comment.