From 070d3553662c70a616a0eb67f46c7903fd83c776 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sun, 30 Jun 2019 22:55:17 -0400 Subject: [PATCH] [#14213] - Fixed references --- tests/_data/fixtures/Mvc/View/Engine/Mustache.php | 4 ++-- tests/_data/fixtures/views/macro/conditionaldate.volt.php | 1 + tests/_data/fixtures/views/macro/form_row.volt.php | 4 ++++ tests/_data/fixtures/views/macro/hello.volt.php | 1 + tests/_data/fixtures/views/macro/list.volt.php | 1 + tests/_data/fixtures/views/macro/my_input.volt.php | 1 + tests/_data/fixtures/views/partials/footer.volt.php | 1 + tests/_data/fixtures/views/partials/header.volt.php | 1 + tests/_data/fixtures/views/partials/header2.volt.php | 1 + tests/_data/fixtures/views/partials/header3.volt.php | 1 + tests/cli/Di/FactoryDefault/Cli/ConstructCest.php | 4 ++-- tests/integration/Mvc/Micro/GetServiceCest.php | 2 +- tests/integration/Mvc/Micro/HasServiceCest.php | 2 +- tests/integration/Mvc/Micro/OffsetExistsCest.php | 2 +- tests/integration/Mvc/Micro/OffsetGetCest.php | 2 +- tests/integration/Mvc/Micro/OffsetUnsetCest.php | 2 +- tests/integration/Mvc/View/Engine/Volt/CompilerCest.php | 2 +- 17 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 tests/_data/fixtures/views/macro/conditionaldate.volt.php create mode 100644 tests/_data/fixtures/views/macro/form_row.volt.php create mode 100644 tests/_data/fixtures/views/macro/hello.volt.php create mode 100644 tests/_data/fixtures/views/macro/list.volt.php create mode 100644 tests/_data/fixtures/views/macro/my_input.volt.php create mode 100644 tests/_data/fixtures/views/partials/footer.volt.php create mode 100644 tests/_data/fixtures/views/partials/header.volt.php create mode 100644 tests/_data/fixtures/views/partials/header2.volt.php create mode 100644 tests/_data/fixtures/views/partials/header3.volt.php diff --git a/tests/_data/fixtures/Mvc/View/Engine/Mustache.php b/tests/_data/fixtures/Mvc/View/Engine/Mustache.php index 4d73865ad0d..278cca605a5 100644 --- a/tests/_data/fixtures/Mvc/View/Engine/Mustache.php +++ b/tests/_data/fixtures/Mvc/View/Engine/Mustache.php @@ -13,8 +13,8 @@ use Mustache_Engine; use Phalcon\DiInterface; -use Phalcon\Mvc\View\Engine; -use Phalcon\Mvc\View\EngineInterface; +use Phalcon\Mvc\View\Engine\AbstractEngine; +use Phalcon\Mvc\View\Engine\EngineInterface; use Phalcon\Mvc\ViewBaseInterface; class Mustache extends Engine implements EngineInterface diff --git a/tests/_data/fixtures/views/macro/conditionaldate.volt.php b/tests/_data/fixtures/views/macro/conditionaldate.volt.php new file mode 100644 index 00000000000..b3bf4db561c --- /dev/null +++ b/tests/_data/fixtures/views/macro/conditionaldate.volt.php @@ -0,0 +1 @@ +macros['conditionaldate'] = function($__p = null) { if (isset($__p[0])) { $condition = $__p[0]; } else { if (array_key_exists("condition", $__p)) { $condition = $__p["condition"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: condition"); } } if (isset($__p[1])) { $tdate = $__p[1]; } else { if (array_key_exists("tdate", $__p)) { $tdate = $__p["tdate"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: tdate"); } } if (isset($__p[2])) { $ttime = $__p[2]; } else { if (array_key_exists("ttime", $__p)) { $ttime = $__p["ttime"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: ttime"); } } if (isset($__p[3])) { $tz = $__p[3]; } else { if (array_key_exists("tz", $__p)) { $tz = $__p["tz"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'conditionaldate' was called without parameter: tz"); } } ?>from
, macros['conditionaldate'] = \Closure::bind($this->macros['conditionaldate'], $this); ?>callMacro('conditionaldate', [true, $tdate, $ttime, $tz]) ?> \ No newline at end of file diff --git a/tests/_data/fixtures/views/macro/form_row.volt.php b/tests/_data/fixtures/views/macro/form_row.volt.php new file mode 100644 index 00000000000..2f8beab0908 --- /dev/null +++ b/tests/_data/fixtures/views/macro/form_row.volt.php @@ -0,0 +1,4 @@ +macros['formRow'] = function($__p = null) { if (isset($__p[0])) { $form = $__p[0]; } else { if (array_key_exists("form", $__p)) { $form = $__p["form"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'formRow' was called without parameter: form"); } } if (isset($__p[1])) { $tag = $__p[1]; } else { if (array_key_exists("tag", $__p)) { $tag = $__p["tag"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'formRow' was called without parameter: tag"); } } if (isset($__p[2])) { $attributes = $__p[2]; } else { if (array_key_exists("attributes", $__p)) { $attributes = $__p["attributes"]; } else { $attributes = ''; } } if (isset($__p[3])) { $col = $__p[3]; } else { if (array_key_exists("col", $__p)) { $col = $__p["col"]; } else { $col = 6; } } ?> $value) { ?>
+ +
render($tag, $attr) ?>
+
macros['formRow'] = \Closure::bind($this->macros['formRow'], $this); ?>callMacro('formRow', [$formLogin, 'password']) ?> \ No newline at end of file diff --git a/tests/_data/fixtures/views/macro/hello.volt.php b/tests/_data/fixtures/views/macro/hello.volt.php new file mode 100644 index 00000000000..42b38138a48 --- /dev/null +++ b/tests/_data/fixtures/views/macro/hello.volt.php @@ -0,0 +1 @@ +macros['hello'] = function($__p = null) { if (isset($__p[0])) { $name = $__p[0]; } else { if (array_key_exists("name", $__p)) { $name = $__p["name"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'hello' was called without parameter: name"); } } ?>macros['hello'] = \Closure::bind($this->macros['hello'], $this); ?>callMacro('hello', ['World']) ?> \ No newline at end of file diff --git a/tests/_data/fixtures/views/macro/list.volt.php b/tests/_data/fixtures/views/macro/list.volt.php new file mode 100644 index 00000000000..bb428fcdd3f --- /dev/null +++ b/tests/_data/fixtures/views/macro/list.volt.php @@ -0,0 +1 @@ +macros['list'] = function($__p = null) { if (isset($__p[0])) { $var = $__p[0]; } else { if (array_key_exists("var", $__p)) { $var = $__p["var"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'list' was called without parameter: var"); } } ?>macros['list'] = \Closure::bind($this->macros['list'], $this); ?>callMacro('list', [$object]) ?> \ No newline at end of file diff --git a/tests/_data/fixtures/views/macro/my_input.volt.php b/tests/_data/fixtures/views/macro/my_input.volt.php new file mode 100644 index 00000000000..a57d4e2cfbe --- /dev/null +++ b/tests/_data/fixtures/views/macro/my_input.volt.php @@ -0,0 +1 @@ +macros['my_input'] = function($__p = null) { if (isset($__p[0])) { $name = $__p[0]; } else { if (array_key_exists("name", $__p)) { $name = $__p["name"]; } else { throw new \Phalcon\Mvc\View\Exception("Macro 'my_input' was called without parameter: name"); } } if (isset($__p[1])) { $class = $__p[1]; } else { if (array_key_exists("class", $__p)) { $class = $__p["class"]; } else { $class = 'input-text'; } } ?>tag->textField([$name, 'class' => $class]); ?>macros['my_input'] = \Closure::bind($this->macros['my_input'], $this); ?>' . $this->callMacro('my_input', ['name']) . '

' ?> \ No newline at end of file diff --git a/tests/_data/fixtures/views/partials/footer.volt.php b/tests/_data/fixtures/views/partials/footer.volt.php new file mode 100644 index 00000000000..031988e5b1c --- /dev/null +++ b/tests/_data/fixtures/views/partials/footer.volt.php @@ -0,0 +1 @@ +

This is the footer

\ No newline at end of file diff --git a/tests/_data/fixtures/views/partials/header.volt.php b/tests/_data/fixtures/views/partials/header.volt.php new file mode 100644 index 00000000000..67249e04933 --- /dev/null +++ b/tests/_data/fixtures/views/partials/header.volt.php @@ -0,0 +1 @@ +

This is the header

\ No newline at end of file diff --git a/tests/_data/fixtures/views/partials/header2.volt.php b/tests/_data/fixtures/views/partials/header2.volt.php new file mode 100644 index 00000000000..ad9097516bd --- /dev/null +++ b/tests/_data/fixtures/views/partials/header2.volt.php @@ -0,0 +1 @@ +

This is the title

\ No newline at end of file diff --git a/tests/_data/fixtures/views/partials/header3.volt.php b/tests/_data/fixtures/views/partials/header3.volt.php new file mode 100644 index 00000000000..24dff719bfe --- /dev/null +++ b/tests/_data/fixtures/views/partials/header3.volt.php @@ -0,0 +1 @@ +This is the title \ No newline at end of file diff --git a/tests/cli/Di/FactoryDefault/Cli/ConstructCest.php b/tests/cli/Di/FactoryDefault/Cli/ConstructCest.php index 584d0b9fc1a..2d9862ff12f 100644 --- a/tests/cli/Di/FactoryDefault/Cli/ConstructCest.php +++ b/tests/cli/Di/FactoryDefault/Cli/ConstructCest.php @@ -17,11 +17,11 @@ use Phalcon\Cli\Dispatcher; use Phalcon\Cli\Router; use Phalcon\Di\FactoryDefault\Cli; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Filter\Filter; use Phalcon\Mvc\Model\MetaData\Memory; use Phalcon\Mvc\Model\Transaction\Manager; -use Phalcon\Security; +use Phalcon\Security\Security; class ConstructCest { diff --git a/tests/integration/Mvc/Micro/GetServiceCest.php b/tests/integration/Mvc/Micro/GetServiceCest.php index 2f7eccf4ab9..ddc7cee5833 100644 --- a/tests/integration/Mvc/Micro/GetServiceCest.php +++ b/tests/integration/Mvc/Micro/GetServiceCest.php @@ -14,7 +14,7 @@ use IntegrationTester; use Phalcon\Di; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Mvc\Dispatcher; use Phalcon\Mvc\Micro; use Phalcon\Mvc\Router; diff --git a/tests/integration/Mvc/Micro/HasServiceCest.php b/tests/integration/Mvc/Micro/HasServiceCest.php index b23882c6712..03c80449d14 100644 --- a/tests/integration/Mvc/Micro/HasServiceCest.php +++ b/tests/integration/Mvc/Micro/HasServiceCest.php @@ -14,7 +14,7 @@ use IntegrationTester; use Phalcon\Di; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Mvc\Dispatcher; use Phalcon\Mvc\Micro; use Phalcon\Mvc\Router; diff --git a/tests/integration/Mvc/Micro/OffsetExistsCest.php b/tests/integration/Mvc/Micro/OffsetExistsCest.php index 59ae7a69298..e012ff861ad 100644 --- a/tests/integration/Mvc/Micro/OffsetExistsCest.php +++ b/tests/integration/Mvc/Micro/OffsetExistsCest.php @@ -14,7 +14,7 @@ use IntegrationTester; use Phalcon\Di; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Mvc\Dispatcher; use Phalcon\Mvc\Micro; use Phalcon\Mvc\Router; diff --git a/tests/integration/Mvc/Micro/OffsetGetCest.php b/tests/integration/Mvc/Micro/OffsetGetCest.php index b0896e0973c..5e73565944c 100644 --- a/tests/integration/Mvc/Micro/OffsetGetCest.php +++ b/tests/integration/Mvc/Micro/OffsetGetCest.php @@ -14,7 +14,7 @@ use IntegrationTester; use Phalcon\Di; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Mvc\Dispatcher; use Phalcon\Mvc\Micro; use Phalcon\Mvc\Router; diff --git a/tests/integration/Mvc/Micro/OffsetUnsetCest.php b/tests/integration/Mvc/Micro/OffsetUnsetCest.php index 9921d5491ff..701760cae91 100644 --- a/tests/integration/Mvc/Micro/OffsetUnsetCest.php +++ b/tests/integration/Mvc/Micro/OffsetUnsetCest.php @@ -14,7 +14,7 @@ use IntegrationTester; use Phalcon\Di; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Mvc\Micro; class OffsetUnsetCest diff --git a/tests/integration/Mvc/View/Engine/Volt/CompilerCest.php b/tests/integration/Mvc/View/Engine/Volt/CompilerCest.php index 5309ff1f0fc..513fd33c1d3 100644 --- a/tests/integration/Mvc/View/Engine/Volt/CompilerCest.php +++ b/tests/integration/Mvc/View/Engine/Volt/CompilerCest.php @@ -20,7 +20,7 @@ use DateTime; use IntegrationTester; use Phalcon\Di; -use Phalcon\Escaper; +use Phalcon\Escaper\Escaper; use Phalcon\Forms\Element\Password; use Phalcon\Forms\Form; use Phalcon\Mvc\View;