18 define(
'INDEX_FILE_LOCATION', dirname(dirname(__FILE__)) .
'/index.php');
20 require(
'lib/pkp/includes/bootstrap.inc.php');
26 import(
'classes.core.PageRouter');
29 $request->setRouter($router);
31 import(
'classes.template.TemplateManager');
32 import(
'lib.pkp.classes.form.Form');
43 parent::__construct();
49 $test_template_dir = $baseDir . DIRECTORY_SEPARATOR . PKP_LIB_PATH . DIRECTORY_SEPARATOR .
'tests' . DIRECTORY_SEPARATOR .
'ui' . DIRECTORY_SEPARATOR .
'fbv';
50 $this->template_dir[] = $test_template_dir;
54 $uriComponents = explode(
'/', $_SERVER[
'REQUEST_URI']);
56 for ($i=0, $count=count($uriComponents); $i<$count; $i++) {
57 if ($uriComponents[$i] ==
'tools' && $uriComponents[$i+1] ==
'fbvVisualResults.php')
break;
58 else if (empty($uriComponents[$i]))
continue;
59 else $baseUrl .=
'/' . $uriComponents[$i];
62 $this->assign(
'baseUrl', $baseUrl);
67 $this->initialized =
true;
74 if ($instance ===
null) {
95 if (isset($_GET[
'display'])) {
96 switch ($_GET[
'display']) {
98 $testForm =
new Form(
'fbvTestForm.tpl');
101 $testForm =
new Form(
'fbvTestFormWrapper.tpl');
104 $testForm =
new Form(
'fbvTestFormWrapper.tpl');
107 $testForm->display();