Viewing File: /opt/alt/tests/alt-php83-pecl-yaf_3.3.6-1.el8/tests/issue303.phpt

--TEST--
ISSUE #303 (local variable is overrided by view renderring)
--SKIPIF--
<?php if (!extension_loaded("yaf")) print "skip"; ?>
--INI--
yaf.use_spl_autoload=0
yaf.lowcase_path=0
yaf.use_namespace=0
--FILE--
<?php
require "build.inc";
startup();

$config = array(
	"application" => array(
		"directory" => APPLICATION_PATH,
	),
);

file_put_contents(APPLICATION_PATH . "/controllers/Index.php", <<<PHP
<?php
   class IndexController extends Yaf_Controller_Abstract {
         public function indexAction() {
            \$local = true;
            \$this->display("index", array());;
            var_dump(\$local);
			return false;
         }
   }
PHP
);

file_put_contents(APPLICATION_PATH . "/views/index/index.phtml", "<?php \$local = false; ?>");

$app = new Yaf_Application($config);
$app->run();

?>
--CLEAN--
<?php
/* unlink foo2.phtml permission denied */
require "build.inc"; 
shutdown();
?>
--EXPECTF--
bool(true)
Back to Directory File Manager
<