From f06c1c2906833c93cbdbccc69df4d737d49f3917 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sun, 9 Dec 2018 20:39:03 -0500 Subject: [PATCH 01/19] [#12379] - Added .zephir folder in the gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ed9e4e552e6..1c4e48634aa 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ autom4te.cache/ /vendor /ide/ +.zephir/ boxfile.yml composer.lock php_test_results_*.txt From b62fcbed78c1b20d145d625e3cc091202b2336eb Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sun, 9 Dec 2018 21:00:46 -0500 Subject: [PATCH 02/19] [#12379] - Added new component and base methods --- phalcon/html/exception.zep | 31 +++++ phalcon/html/tag.zep | 279 +++++++++++++++++++++++++++++++++++++ 2 files changed, 310 insertions(+) create mode 100644 phalcon/html/exception.zep create mode 100644 phalcon/html/tag.zep diff --git a/phalcon/html/exception.zep b/phalcon/html/exception.zep new file mode 100644 index 00000000000..f7e6fc178a1 --- /dev/null +++ b/phalcon/html/exception.zep @@ -0,0 +1,31 @@ + +/* + +------------------------------------------------------------------------+ + | Phalcon Framework | + +------------------------------------------------------------------------+ + | Copyright (c) 2011-2017 Phalcon Team (https://phalconphp.com) | + +------------------------------------------------------------------------+ + | This source file is subject to the New BSD License that is bundled | + | with this package in the file LICENSE.txt. | + | | + | If you did not receive a copy of the license and are unable to | + | obtain it through the world-wide-web, please send an email | + | to license@phalconphp.com so we can send you a copy immediately. | + +------------------------------------------------------------------------+ + | Authors: Andres Gutierrez | + | Eduar Carvajal | + +------------------------------------------------------------------------+ + */ + +namespace Phalcon\Html; + +/** + * Phalcon\Tag\Exception + * + * Exceptions thrown in Phalcon\Tag will use this class + * + */ +class Exception extends \Phalcon\Exception +{ + +} diff --git a/phalcon/html/tag.zep b/phalcon/html/tag.zep new file mode 100644 index 00000000000..ad6af6bb4ca --- /dev/null +++ b/phalcon/html/tag.zep @@ -0,0 +1,279 @@ + +/** + * This file is part of the Phalcon Framework. + * + * (c) Phalcon Team + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Html; + +use Phalcon\DiInterface; +use Phalcon\Di\InjectionAwareInterface; +use Phalcon\Html\Exception; + +/** + * Phalcon\Html\Tag + * + * Phalcon\Tag is designed to simplify building of HTML tags. It provides a set + * of helpers to dynamically generate HTML. + */ +class Tag implements InjectionAwareInterface +{ + /** + * @var + */ + protected container; + + const HTML32 = 1; + const HTML401_STRICT = 2; + const HTML401_TRANSITIONAL = 3; + const HTML401_FRAMESET = 4; + const HTML5 = 5; + const XHTML10_STRICT = 6; + const XHTML10_TRANSITIONAL = 7; + const XHTML10_FRAMESET = 8; + const XHTML11 = 9; + const XHTML20 = 10; + const XHTML5 = 11; + + /** + * Sets the dependency injector + */ + public function setDI( container) -> void + { + let this->container = container; + } + + /** + * Returns the internal dependency injector + */ + public function getDI() -> + { + return this->container; + } + + public function getEscaper(array! params) -> | null + { + } + + public function renderAttributes(string! code, array! attributes) -> string + { + } + + public function getUrlService() -> + { + } + + public function getEscaperService() -> + { + } + + public function setAutoescape(bool autoescape) -> void + { + } + + public function setDefault(string! id, value) -> void + { + } + + public function setDefaults(array! values, bool merge = false) -> void + { + } + + public function displayTo(string! id, value) -> void + { + } + + public function hasValue(var name) -> bool + { + } + + public function getValue(var name, array params = []) + { + } + + public function clear() -> void + { + } + + public function linkTo(parameters, text = null, local = true) -> string + { + } + + public function colorField(var parameters) -> string + { + } + + public function textField(var parameters) -> string + { + } + + public function numericField(var parameters) -> string + { + } + + public function rangeField(var parameters) -> string + { + } + + public function emailField(var parameters) -> string + { + } + + public function dateField(var parameters) -> string + { + } + + public function dateTimeField(var parameters) -> string + { + } + + public function dateTimeLocalField(var parameters) -> string + { + } + + public function monthField(var parameters) -> string + { + } + + public function timeField(var parameters) -> string + { + } + + public function weekField(var parameters) -> string + { + } + + public function passwordField(var parameters) -> string + { + } + + public function hiddenField(var parameters) -> string + { + } + + public function fileField(var parameters) -> string + { + } + + public function searchField(var parameters) -> string + { + } + + public function telField(var parameters) -> string + { + } + + public function urlField(var parameters) -> string + { + } + + public function checkField(var parameters) -> string + { + } + + public function radioField(var parameters) -> string + { + } + + public function imageInput(var parameters) -> string + { + } + + public function submitButton(var parameters) -> string + { + } + + public function selectStatic(parameters, data = null) -> string + { + } + + public function select(var parameters, data = null) -> string + { + } + + public function textArea(var parameters) -> string + { + } + + public function form(var parameters) -> string + { + } + + public function endForm() -> string + { + } + + public function setTitle(string title) -> void + { + } + + public function setTitleSeparator(string titleSeparator) -> void + { + } + + public function appendTitle(var title) -> void + { + } + + public function prependTitle(var title) -> void + { + } + + public function getTitle(bool prepend = true, bool append = true) -> string + { + } + + public function renderTitle() -> string + { + } + + public function getTitleSeparator() -> string + { + } + + public function stylesheetLink(var parameters = null, bool local = true) -> string + { + } + + public function javascriptInclude(var parameters = null, bool local = true) -> string + { + } + + public function image(var parameters = null, bool local = true) -> string + { + } + + public function friendlyTitle(string text, string separator = "-", bool lowercase = true, var replace = null) -> string + { + } + + public function setDocType(int doctype) -> void + { + } + + public function getDocType() -> string + { + } + + public function tagHtml(string tagName, var parameters = null, bool selfClose = false, + bool onlyStart = false, bool useEol = false) -> string + { + } + + public function tagHtmlClose(string tagName, bool useEol = false) -> string + { + } + + private function inputField(string type, parameters, bool asValue = false) -> string + { + } + + private function inputFieldChecked(string type, var parameters) -> string + { + } + +} From e660cb733ed86a3fec457859f2301e465f479bff Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sun, 9 Dec 2018 21:01:06 -0500 Subject: [PATCH 03/19] [#12379] - Added test stubs --- tests/unit/Html/Tag/AppendTitleCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/CheckFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/ClearCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/ColorFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/DateFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/DateTimeFieldCest.php | 37 +++++++++++++++++++ .../unit/Html/Tag/DateTimeLocalFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/DisplayToCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/EmailFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/EndFormCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/FileFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/FormCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/FriendlyTitleCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetDICest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetDocTypeCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetEscaperCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetEscaperServiceCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetTitleCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetTitleSeparatorCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetUrlServiceCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/GetValueCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/HasValueCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/HiddenFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/ImageCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/ImageInputCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/JavascriptIncludeCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/LinkToCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/MonthFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/NumericFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/PasswordFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/PrependTitleCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/RadioFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/RangeFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/RenderAttributesCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/RenderTitleCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SearchFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SelectCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SelectStaticCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetAutoescapeCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetDICest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetDefaultCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetDefaultsCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetDocTypeCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetTitleCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SetTitleSeparatorCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/StylesheetLinkCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/SubmitButtonCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/TagHtmlCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/TagHtmlCloseCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/TelFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/TextAreaCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/TextFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/TimeFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/UrlFieldCest.php | 37 +++++++++++++++++++ tests/unit/Html/Tag/WeekFieldCest.php | 37 +++++++++++++++++++ 55 files changed, 2035 insertions(+) create mode 100644 tests/unit/Html/Tag/AppendTitleCest.php create mode 100644 tests/unit/Html/Tag/CheckFieldCest.php create mode 100644 tests/unit/Html/Tag/ClearCest.php create mode 100644 tests/unit/Html/Tag/ColorFieldCest.php create mode 100644 tests/unit/Html/Tag/DateFieldCest.php create mode 100644 tests/unit/Html/Tag/DateTimeFieldCest.php create mode 100644 tests/unit/Html/Tag/DateTimeLocalFieldCest.php create mode 100644 tests/unit/Html/Tag/DisplayToCest.php create mode 100644 tests/unit/Html/Tag/EmailFieldCest.php create mode 100644 tests/unit/Html/Tag/EndFormCest.php create mode 100644 tests/unit/Html/Tag/FileFieldCest.php create mode 100644 tests/unit/Html/Tag/FormCest.php create mode 100644 tests/unit/Html/Tag/FriendlyTitleCest.php create mode 100644 tests/unit/Html/Tag/GetDICest.php create mode 100644 tests/unit/Html/Tag/GetDocTypeCest.php create mode 100644 tests/unit/Html/Tag/GetEscaperCest.php create mode 100644 tests/unit/Html/Tag/GetEscaperServiceCest.php create mode 100644 tests/unit/Html/Tag/GetTitleCest.php create mode 100644 tests/unit/Html/Tag/GetTitleSeparatorCest.php create mode 100644 tests/unit/Html/Tag/GetUrlServiceCest.php create mode 100644 tests/unit/Html/Tag/GetValueCest.php create mode 100644 tests/unit/Html/Tag/HasValueCest.php create mode 100644 tests/unit/Html/Tag/HiddenFieldCest.php create mode 100644 tests/unit/Html/Tag/ImageCest.php create mode 100644 tests/unit/Html/Tag/ImageInputCest.php create mode 100644 tests/unit/Html/Tag/JavascriptIncludeCest.php create mode 100644 tests/unit/Html/Tag/LinkToCest.php create mode 100644 tests/unit/Html/Tag/MonthFieldCest.php create mode 100644 tests/unit/Html/Tag/NumericFieldCest.php create mode 100644 tests/unit/Html/Tag/PasswordFieldCest.php create mode 100644 tests/unit/Html/Tag/PrependTitleCest.php create mode 100644 tests/unit/Html/Tag/RadioFieldCest.php create mode 100644 tests/unit/Html/Tag/RangeFieldCest.php create mode 100644 tests/unit/Html/Tag/RenderAttributesCest.php create mode 100644 tests/unit/Html/Tag/RenderTitleCest.php create mode 100644 tests/unit/Html/Tag/SearchFieldCest.php create mode 100644 tests/unit/Html/Tag/SelectCest.php create mode 100644 tests/unit/Html/Tag/SelectStaticCest.php create mode 100644 tests/unit/Html/Tag/SetAutoescapeCest.php create mode 100644 tests/unit/Html/Tag/SetDICest.php create mode 100644 tests/unit/Html/Tag/SetDefaultCest.php create mode 100644 tests/unit/Html/Tag/SetDefaultsCest.php create mode 100644 tests/unit/Html/Tag/SetDocTypeCest.php create mode 100644 tests/unit/Html/Tag/SetTitleCest.php create mode 100644 tests/unit/Html/Tag/SetTitleSeparatorCest.php create mode 100644 tests/unit/Html/Tag/StylesheetLinkCest.php create mode 100644 tests/unit/Html/Tag/SubmitButtonCest.php create mode 100644 tests/unit/Html/Tag/TagHtmlCest.php create mode 100644 tests/unit/Html/Tag/TagHtmlCloseCest.php create mode 100644 tests/unit/Html/Tag/TelFieldCest.php create mode 100644 tests/unit/Html/Tag/TextAreaCest.php create mode 100644 tests/unit/Html/Tag/TextFieldCest.php create mode 100644 tests/unit/Html/Tag/TimeFieldCest.php create mode 100644 tests/unit/Html/Tag/UrlFieldCest.php create mode 100644 tests/unit/Html/Tag/WeekFieldCest.php diff --git a/tests/unit/Html/Tag/AppendTitleCest.php b/tests/unit/Html/Tag/AppendTitleCest.php new file mode 100644 index 00000000000..c05732f1cae --- /dev/null +++ b/tests/unit/Html/Tag/AppendTitleCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class AppendTitleCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class AppendTitleCest +{ + /** + * Tests Phalcon\Html\Tag :: appendTitle() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagAppendTitle(UnitTester $I) + { + $I->wantToTest('Html\Tag - appendTitle()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/CheckFieldCest.php b/tests/unit/Html/Tag/CheckFieldCest.php new file mode 100644 index 00000000000..8fd8a29d5f2 --- /dev/null +++ b/tests/unit/Html/Tag/CheckFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class CheckFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class CheckFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: checkField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagCheckField(UnitTester $I) + { + $I->wantToTest('Html\Tag - checkField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/ClearCest.php b/tests/unit/Html/Tag/ClearCest.php new file mode 100644 index 00000000000..30e2e754e9c --- /dev/null +++ b/tests/unit/Html/Tag/ClearCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class ClearCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ClearCest +{ + /** + * Tests Phalcon\Html\Tag :: clear() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagClear(UnitTester $I) + { + $I->wantToTest('Html\Tag - clear()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/ColorFieldCest.php b/tests/unit/Html/Tag/ColorFieldCest.php new file mode 100644 index 00000000000..42e1ad5bd5d --- /dev/null +++ b/tests/unit/Html/Tag/ColorFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class ColorFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ColorFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: colorField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagColorField(UnitTester $I) + { + $I->wantToTest('Html\Tag - colorField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/DateFieldCest.php b/tests/unit/Html/Tag/DateFieldCest.php new file mode 100644 index 00000000000..a1fc67410bd --- /dev/null +++ b/tests/unit/Html/Tag/DateFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class DateFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class DateFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: dateField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagDateField(UnitTester $I) + { + $I->wantToTest('Html\Tag - dateField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/DateTimeFieldCest.php b/tests/unit/Html/Tag/DateTimeFieldCest.php new file mode 100644 index 00000000000..fc7dc48b169 --- /dev/null +++ b/tests/unit/Html/Tag/DateTimeFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class DateTimeFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class DateTimeFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: dateTimeField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagDateTimeField(UnitTester $I) + { + $I->wantToTest('Html\Tag - dateTimeField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/DateTimeLocalFieldCest.php b/tests/unit/Html/Tag/DateTimeLocalFieldCest.php new file mode 100644 index 00000000000..d19454caa6c --- /dev/null +++ b/tests/unit/Html/Tag/DateTimeLocalFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class DateTimeLocalFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class DateTimeLocalFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: dateTimeLocalField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagDateTimeLocalField(UnitTester $I) + { + $I->wantToTest('Html\Tag - dateTimeLocalField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/DisplayToCest.php b/tests/unit/Html/Tag/DisplayToCest.php new file mode 100644 index 00000000000..d87934f1c5e --- /dev/null +++ b/tests/unit/Html/Tag/DisplayToCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class DisplayToCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class DisplayToCest +{ + /** + * Tests Phalcon\Html\Tag :: displayTo() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagDisplayTo(UnitTester $I) + { + $I->wantToTest('Html\Tag - displayTo()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/EmailFieldCest.php b/tests/unit/Html/Tag/EmailFieldCest.php new file mode 100644 index 00000000000..2053212a813 --- /dev/null +++ b/tests/unit/Html/Tag/EmailFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class EmailFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class EmailFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: emailField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagEmailField(UnitTester $I) + { + $I->wantToTest('Html\Tag - emailField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/EndFormCest.php b/tests/unit/Html/Tag/EndFormCest.php new file mode 100644 index 00000000000..f8579025c65 --- /dev/null +++ b/tests/unit/Html/Tag/EndFormCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class EndFormCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class EndFormCest +{ + /** + * Tests Phalcon\Html\Tag :: endForm() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagEndForm(UnitTester $I) + { + $I->wantToTest('Html\Tag - endForm()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/FileFieldCest.php b/tests/unit/Html/Tag/FileFieldCest.php new file mode 100644 index 00000000000..f488802b11c --- /dev/null +++ b/tests/unit/Html/Tag/FileFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class FileFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class FileFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: fileField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagFileField(UnitTester $I) + { + $I->wantToTest('Html\Tag - fileField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/FormCest.php b/tests/unit/Html/Tag/FormCest.php new file mode 100644 index 00000000000..a71ec116efd --- /dev/null +++ b/tests/unit/Html/Tag/FormCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class FormCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class FormCest +{ + /** + * Tests Phalcon\Html\Tag :: form() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagForm(UnitTester $I) + { + $I->wantToTest('Html\Tag - form()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/FriendlyTitleCest.php b/tests/unit/Html/Tag/FriendlyTitleCest.php new file mode 100644 index 00000000000..4ad304e99b2 --- /dev/null +++ b/tests/unit/Html/Tag/FriendlyTitleCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class FriendlyTitleCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class FriendlyTitleCest +{ + /** + * Tests Phalcon\Html\Tag :: friendlyTitle() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagFriendlyTitle(UnitTester $I) + { + $I->wantToTest('Html\Tag - friendlyTitle()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetDICest.php b/tests/unit/Html/Tag/GetDICest.php new file mode 100644 index 00000000000..c59c525c8a0 --- /dev/null +++ b/tests/unit/Html/Tag/GetDICest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetDICest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetDICest +{ + /** + * Tests Phalcon\Html\Tag :: getDI() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetDI(UnitTester $I) + { + $I->wantToTest('Html\Tag - getDI()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetDocTypeCest.php b/tests/unit/Html/Tag/GetDocTypeCest.php new file mode 100644 index 00000000000..cdd90be4ff5 --- /dev/null +++ b/tests/unit/Html/Tag/GetDocTypeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetDocTypeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetDocTypeCest +{ + /** + * Tests Phalcon\Html\Tag :: getDocType() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetDocType(UnitTester $I) + { + $I->wantToTest('Html\Tag - getDocType()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetEscaperCest.php b/tests/unit/Html/Tag/GetEscaperCest.php new file mode 100644 index 00000000000..0c5ea8ec589 --- /dev/null +++ b/tests/unit/Html/Tag/GetEscaperCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetEscaperCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetEscaperCest +{ + /** + * Tests Phalcon\Html\Tag :: getEscaper() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetEscaper(UnitTester $I) + { + $I->wantToTest('Html\Tag - getEscaper()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetEscaperServiceCest.php b/tests/unit/Html/Tag/GetEscaperServiceCest.php new file mode 100644 index 00000000000..941da207b40 --- /dev/null +++ b/tests/unit/Html/Tag/GetEscaperServiceCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetEscaperServiceCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetEscaperServiceCest +{ + /** + * Tests Phalcon\Html\Tag :: getEscaperService() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetEscaperService(UnitTester $I) + { + $I->wantToTest('Html\Tag - getEscaperService()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetTitleCest.php b/tests/unit/Html/Tag/GetTitleCest.php new file mode 100644 index 00000000000..d1ca46839f8 --- /dev/null +++ b/tests/unit/Html/Tag/GetTitleCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetTitleCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetTitleCest +{ + /** + * Tests Phalcon\Html\Tag :: getTitle() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetTitle(UnitTester $I) + { + $I->wantToTest('Html\Tag - getTitle()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetTitleSeparatorCest.php b/tests/unit/Html/Tag/GetTitleSeparatorCest.php new file mode 100644 index 00000000000..1012af63e55 --- /dev/null +++ b/tests/unit/Html/Tag/GetTitleSeparatorCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetTitleSeparatorCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetTitleSeparatorCest +{ + /** + * Tests Phalcon\Html\Tag :: getTitleSeparator() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetTitleSeparator(UnitTester $I) + { + $I->wantToTest('Html\Tag - getTitleSeparator()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetUrlServiceCest.php b/tests/unit/Html/Tag/GetUrlServiceCest.php new file mode 100644 index 00000000000..50ad1ea9c65 --- /dev/null +++ b/tests/unit/Html/Tag/GetUrlServiceCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetUrlServiceCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetUrlServiceCest +{ + /** + * Tests Phalcon\Html\Tag :: getUrlService() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetUrlService(UnitTester $I) + { + $I->wantToTest('Html\Tag - getUrlService()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetValueCest.php b/tests/unit/Html/Tag/GetValueCest.php new file mode 100644 index 00000000000..07daa8a125f --- /dev/null +++ b/tests/unit/Html/Tag/GetValueCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class GetValueCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class GetValueCest +{ + /** + * Tests Phalcon\Html\Tag :: getValue() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagGetValue(UnitTester $I) + { + $I->wantToTest('Html\Tag - getValue()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/HasValueCest.php b/tests/unit/Html/Tag/HasValueCest.php new file mode 100644 index 00000000000..0c8d0264fb9 --- /dev/null +++ b/tests/unit/Html/Tag/HasValueCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class HasValueCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class HasValueCest +{ + /** + * Tests Phalcon\Html\Tag :: hasValue() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagHasValue(UnitTester $I) + { + $I->wantToTest('Html\Tag - hasValue()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/HiddenFieldCest.php b/tests/unit/Html/Tag/HiddenFieldCest.php new file mode 100644 index 00000000000..adc012d3e8a --- /dev/null +++ b/tests/unit/Html/Tag/HiddenFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class HiddenFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class HiddenFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: hiddenField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagHiddenField(UnitTester $I) + { + $I->wantToTest('Html\Tag - hiddenField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/ImageCest.php b/tests/unit/Html/Tag/ImageCest.php new file mode 100644 index 00000000000..ee347e48b4b --- /dev/null +++ b/tests/unit/Html/Tag/ImageCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class ImageCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ImageCest +{ + /** + * Tests Phalcon\Html\Tag :: image() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagImage(UnitTester $I) + { + $I->wantToTest('Html\Tag - image()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/ImageInputCest.php b/tests/unit/Html/Tag/ImageInputCest.php new file mode 100644 index 00000000000..b721691adf5 --- /dev/null +++ b/tests/unit/Html/Tag/ImageInputCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class ImageInputCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ImageInputCest +{ + /** + * Tests Phalcon\Html\Tag :: imageInput() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagImageInput(UnitTester $I) + { + $I->wantToTest('Html\Tag - imageInput()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/JavascriptIncludeCest.php b/tests/unit/Html/Tag/JavascriptIncludeCest.php new file mode 100644 index 00000000000..2fe6d3257c8 --- /dev/null +++ b/tests/unit/Html/Tag/JavascriptIncludeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class JavascriptIncludeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class JavascriptIncludeCest +{ + /** + * Tests Phalcon\Html\Tag :: javascriptInclude() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagJavascriptInclude(UnitTester $I) + { + $I->wantToTest('Html\Tag - javascriptInclude()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/LinkToCest.php b/tests/unit/Html/Tag/LinkToCest.php new file mode 100644 index 00000000000..7ac7c707c05 --- /dev/null +++ b/tests/unit/Html/Tag/LinkToCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class LinkToCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class LinkToCest +{ + /** + * Tests Phalcon\Html\Tag :: linkTo() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagLinkTo(UnitTester $I) + { + $I->wantToTest('Html\Tag - linkTo()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/MonthFieldCest.php b/tests/unit/Html/Tag/MonthFieldCest.php new file mode 100644 index 00000000000..cbe29670925 --- /dev/null +++ b/tests/unit/Html/Tag/MonthFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class MonthFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class MonthFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: monthField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagMonthField(UnitTester $I) + { + $I->wantToTest('Html\Tag - monthField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/NumericFieldCest.php b/tests/unit/Html/Tag/NumericFieldCest.php new file mode 100644 index 00000000000..0bd41602de8 --- /dev/null +++ b/tests/unit/Html/Tag/NumericFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class NumericFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class NumericFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: numericField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagNumericField(UnitTester $I) + { + $I->wantToTest('Html\Tag - numericField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/PasswordFieldCest.php b/tests/unit/Html/Tag/PasswordFieldCest.php new file mode 100644 index 00000000000..89bb6d7448e --- /dev/null +++ b/tests/unit/Html/Tag/PasswordFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class PasswordFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class PasswordFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: passwordField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagPasswordField(UnitTester $I) + { + $I->wantToTest('Html\Tag - passwordField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/PrependTitleCest.php b/tests/unit/Html/Tag/PrependTitleCest.php new file mode 100644 index 00000000000..59f4ade3f73 --- /dev/null +++ b/tests/unit/Html/Tag/PrependTitleCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class PrependTitleCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class PrependTitleCest +{ + /** + * Tests Phalcon\Html\Tag :: prependTitle() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagPrependTitle(UnitTester $I) + { + $I->wantToTest('Html\Tag - prependTitle()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/RadioFieldCest.php b/tests/unit/Html/Tag/RadioFieldCest.php new file mode 100644 index 00000000000..740e0b66f65 --- /dev/null +++ b/tests/unit/Html/Tag/RadioFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class RadioFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class RadioFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: radioField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagRadioField(UnitTester $I) + { + $I->wantToTest('Html\Tag - radioField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/RangeFieldCest.php b/tests/unit/Html/Tag/RangeFieldCest.php new file mode 100644 index 00000000000..2630d4a850a --- /dev/null +++ b/tests/unit/Html/Tag/RangeFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class RangeFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class RangeFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: rangeField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagRangeField(UnitTester $I) + { + $I->wantToTest('Html\Tag - rangeField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/RenderAttributesCest.php b/tests/unit/Html/Tag/RenderAttributesCest.php new file mode 100644 index 00000000000..8faa4e1633c --- /dev/null +++ b/tests/unit/Html/Tag/RenderAttributesCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class RenderAttributesCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class RenderAttributesCest +{ + /** + * Tests Phalcon\Html\Tag :: renderAttributes() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagRenderAttributes(UnitTester $I) + { + $I->wantToTest('Html\Tag - renderAttributes()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/RenderTitleCest.php b/tests/unit/Html/Tag/RenderTitleCest.php new file mode 100644 index 00000000000..b92ea7b0848 --- /dev/null +++ b/tests/unit/Html/Tag/RenderTitleCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class RenderTitleCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class RenderTitleCest +{ + /** + * Tests Phalcon\Html\Tag :: renderTitle() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagRenderTitle(UnitTester $I) + { + $I->wantToTest('Html\Tag - renderTitle()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SearchFieldCest.php b/tests/unit/Html/Tag/SearchFieldCest.php new file mode 100644 index 00000000000..353e791c9ac --- /dev/null +++ b/tests/unit/Html/Tag/SearchFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SearchFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SearchFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: searchField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSearchField(UnitTester $I) + { + $I->wantToTest('Html\Tag - searchField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SelectCest.php b/tests/unit/Html/Tag/SelectCest.php new file mode 100644 index 00000000000..852054a030a --- /dev/null +++ b/tests/unit/Html/Tag/SelectCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SelectCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SelectCest +{ + /** + * Tests Phalcon\Html\Tag :: select() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSelect(UnitTester $I) + { + $I->wantToTest('Html\Tag - select()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SelectStaticCest.php b/tests/unit/Html/Tag/SelectStaticCest.php new file mode 100644 index 00000000000..664e44f7f56 --- /dev/null +++ b/tests/unit/Html/Tag/SelectStaticCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SelectStaticCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SelectStaticCest +{ + /** + * Tests Phalcon\Html\Tag :: selectStatic() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSelectStatic(UnitTester $I) + { + $I->wantToTest('Html\Tag - selectStatic()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetAutoescapeCest.php b/tests/unit/Html/Tag/SetAutoescapeCest.php new file mode 100644 index 00000000000..cdd21a1a3a0 --- /dev/null +++ b/tests/unit/Html/Tag/SetAutoescapeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetAutoescapeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetAutoescapeCest +{ + /** + * Tests Phalcon\Html\Tag :: setAutoescape() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetAutoescape(UnitTester $I) + { + $I->wantToTest('Html\Tag - setAutoescape()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetDICest.php b/tests/unit/Html/Tag/SetDICest.php new file mode 100644 index 00000000000..645fc4e7300 --- /dev/null +++ b/tests/unit/Html/Tag/SetDICest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetDICest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetDICest +{ + /** + * Tests Phalcon\Html\Tag :: setDI() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetDI(UnitTester $I) + { + $I->wantToTest('Html\Tag - setDI()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetDefaultCest.php b/tests/unit/Html/Tag/SetDefaultCest.php new file mode 100644 index 00000000000..7ccbd492a0f --- /dev/null +++ b/tests/unit/Html/Tag/SetDefaultCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetDefaultCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetDefaultCest +{ + /** + * Tests Phalcon\Html\Tag :: setDefault() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetDefault(UnitTester $I) + { + $I->wantToTest('Html\Tag - setDefault()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetDefaultsCest.php b/tests/unit/Html/Tag/SetDefaultsCest.php new file mode 100644 index 00000000000..f003e1bff90 --- /dev/null +++ b/tests/unit/Html/Tag/SetDefaultsCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetDefaultsCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetDefaultsCest +{ + /** + * Tests Phalcon\Html\Tag :: setDefaults() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetDefaults(UnitTester $I) + { + $I->wantToTest('Html\Tag - setDefaults()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetDocTypeCest.php b/tests/unit/Html/Tag/SetDocTypeCest.php new file mode 100644 index 00000000000..f4456d2d918 --- /dev/null +++ b/tests/unit/Html/Tag/SetDocTypeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetDocTypeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetDocTypeCest +{ + /** + * Tests Phalcon\Html\Tag :: setDocType() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetDocType(UnitTester $I) + { + $I->wantToTest('Html\Tag - setDocType()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetTitleCest.php b/tests/unit/Html/Tag/SetTitleCest.php new file mode 100644 index 00000000000..5b747cac235 --- /dev/null +++ b/tests/unit/Html/Tag/SetTitleCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetTitleCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetTitleCest +{ + /** + * Tests Phalcon\Html\Tag :: setTitle() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetTitle(UnitTester $I) + { + $I->wantToTest('Html\Tag - setTitle()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SetTitleSeparatorCest.php b/tests/unit/Html/Tag/SetTitleSeparatorCest.php new file mode 100644 index 00000000000..179a7f1cb84 --- /dev/null +++ b/tests/unit/Html/Tag/SetTitleSeparatorCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetTitleSeparatorCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetTitleSeparatorCest +{ + /** + * Tests Phalcon\Html\Tag :: setTitleSeparator() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetTitleSeparator(UnitTester $I) + { + $I->wantToTest('Html\Tag - setTitleSeparator()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/StylesheetLinkCest.php b/tests/unit/Html/Tag/StylesheetLinkCest.php new file mode 100644 index 00000000000..665a4ef6cc2 --- /dev/null +++ b/tests/unit/Html/Tag/StylesheetLinkCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class StylesheetLinkCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class StylesheetLinkCest +{ + /** + * Tests Phalcon\Html\Tag :: stylesheetLink() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagStylesheetLink(UnitTester $I) + { + $I->wantToTest('Html\Tag - stylesheetLink()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/SubmitButtonCest.php b/tests/unit/Html/Tag/SubmitButtonCest.php new file mode 100644 index 00000000000..3503c659ea8 --- /dev/null +++ b/tests/unit/Html/Tag/SubmitButtonCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SubmitButtonCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SubmitButtonCest +{ + /** + * Tests Phalcon\Html\Tag :: submitButton() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSubmitButton(UnitTester $I) + { + $I->wantToTest('Html\Tag - submitButton()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TagHtmlCest.php b/tests/unit/Html/Tag/TagHtmlCest.php new file mode 100644 index 00000000000..dd55c1dc7df --- /dev/null +++ b/tests/unit/Html/Tag/TagHtmlCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TagHtmlCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TagHtmlCest +{ + /** + * Tests Phalcon\Html\Tag :: tagHtml() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTagHtml(UnitTester $I) + { + $I->wantToTest('Html\Tag - tagHtml()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TagHtmlCloseCest.php b/tests/unit/Html/Tag/TagHtmlCloseCest.php new file mode 100644 index 00000000000..e991fb2fb9a --- /dev/null +++ b/tests/unit/Html/Tag/TagHtmlCloseCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TagHtmlCloseCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TagHtmlCloseCest +{ + /** + * Tests Phalcon\Html\Tag :: tagHtmlClose() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTagHtmlClose(UnitTester $I) + { + $I->wantToTest('Html\Tag - tagHtmlClose()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TelFieldCest.php b/tests/unit/Html/Tag/TelFieldCest.php new file mode 100644 index 00000000000..d64b92b08da --- /dev/null +++ b/tests/unit/Html/Tag/TelFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TelFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TelFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: telField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTelField(UnitTester $I) + { + $I->wantToTest('Html\Tag - telField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TextAreaCest.php b/tests/unit/Html/Tag/TextAreaCest.php new file mode 100644 index 00000000000..e782d269159 --- /dev/null +++ b/tests/unit/Html/Tag/TextAreaCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TextAreaCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TextAreaCest +{ + /** + * Tests Phalcon\Html\Tag :: textArea() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTextArea(UnitTester $I) + { + $I->wantToTest('Html\Tag - textArea()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TextFieldCest.php b/tests/unit/Html/Tag/TextFieldCest.php new file mode 100644 index 00000000000..3b2d1a46115 --- /dev/null +++ b/tests/unit/Html/Tag/TextFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TextFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TextFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: textField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTextField(UnitTester $I) + { + $I->wantToTest('Html\Tag - textField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TimeFieldCest.php b/tests/unit/Html/Tag/TimeFieldCest.php new file mode 100644 index 00000000000..38412978484 --- /dev/null +++ b/tests/unit/Html/Tag/TimeFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TimeFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TimeFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: timeField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTimeField(UnitTester $I) + { + $I->wantToTest('Html\Tag - timeField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/UrlFieldCest.php b/tests/unit/Html/Tag/UrlFieldCest.php new file mode 100644 index 00000000000..7f05cad2af0 --- /dev/null +++ b/tests/unit/Html/Tag/UrlFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class UrlFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class UrlFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: urlField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagUrlField(UnitTester $I) + { + $I->wantToTest('Html\Tag - urlField()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/WeekFieldCest.php b/tests/unit/Html/Tag/WeekFieldCest.php new file mode 100644 index 00000000000..d22c1aa166c --- /dev/null +++ b/tests/unit/Html/Tag/WeekFieldCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class WeekFieldCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class WeekFieldCest +{ + /** + * Tests Phalcon\Html\Tag :: weekField() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagWeekField(UnitTester $I) + { + $I->wantToTest('Html\Tag - weekField()'); + $I->skipTest('Need implementation'); + } +} From bc70a4c66d8a55b90a6dc73e242a20d25a9cb884 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sun, 9 Dec 2018 21:54:17 -0500 Subject: [PATCH 04/19] [#12379] - Renamed the methods; Rearranged the test stubs --- phalcon/html/tag.zep | 117 ++++++++---------- tests/unit/Html/Tag/ButtonSubmitCest.php | 37 ++++++ tests/unit/Html/Tag/DateTimeFieldCest.php | 37 ------ .../unit/Html/Tag/DateTimeLocalFieldCest.php | 37 ------ ...{CheckFieldCest.php => DocTypeGetCest.php} | 10 +- ...{ColorFieldCest.php => DocTypeSetCest.php} | 10 +- .../Tag/{EndFormCest.php => ElementCest.php} | 10 +- tests/unit/Html/Tag/ElementCloseCest.php | 37 ++++++ tests/unit/Html/Tag/EmailFieldCest.php | 37 ------ .../Tag/{TagHtmlCest.php => FormEndCest.php} | 10 +- tests/unit/Html/Tag/FriendlyTitleCest.php | 37 ------ .../Html/Tag/{LinkToCest.php => GetCest.php} | 10 +- tests/unit/Html/Tag/GetDocTypeCest.php | 37 ------ tests/unit/Html/Tag/GetEscaperCest.php | 37 ------ tests/unit/Html/Tag/GetEscaperServiceCest.php | 37 ------ tests/unit/Html/Tag/GetTitleSeparatorCest.php | 37 ------ tests/unit/Html/Tag/GetUrlServiceCest.php | 37 ------ .../Tag/{HasValueCest.php => HasCest.php} | 10 +- tests/unit/Html/Tag/HiddenFieldCest.php | 37 ------ tests/unit/Html/Tag/ImageInputCest.php | 37 ------ tests/unit/Html/Tag/InputCheckboxCest.php | 37 ++++++ tests/unit/Html/Tag/InputColorCest.php | 37 ++++++ .../{DisplayToCest.php => InputDateCest.php} | 10 +- tests/unit/Html/Tag/InputDateTimeCest.php | 37 ++++++ .../unit/Html/Tag/InputDateTimeLocalCest.php | 37 ++++++ tests/unit/Html/Tag/InputEmailCest.php | 37 ++++++ .../{FileFieldCest.php => InputFileCest.php} | 10 +- ...ppendTitleCest.php => InputHiddenCest.php} | 10 +- tests/unit/Html/Tag/InputImageCest.php | 37 ++++++ tests/unit/Html/Tag/InputMonthCest.php | 37 ++++++ tests/unit/Html/Tag/InputNumericCest.php | 37 ++++++ tests/unit/Html/Tag/InputPasswordCest.php | 37 ++++++ tests/unit/Html/Tag/InputRadioCest.php | 37 ++++++ tests/unit/Html/Tag/InputRangeCest.php | 37 ++++++ tests/unit/Html/Tag/InputSearchCest.php | 37 ++++++ .../{GetTitleCest.php => InputTelCest.php} | 10 +- .../{DateFieldCest.php => InputTextCest.php} | 10 +- tests/unit/Html/Tag/InputTimeCest.php | 37 ++++++ .../{GetValueCest.php => InputUrlCest.php} | 10 +- tests/unit/Html/Tag/InputWeekCest.php | 37 ++++++ tests/unit/Html/Tag/JavascriptCest.php | 37 ++++++ tests/unit/Html/Tag/JavascriptIncludeCest.php | 37 ------ tests/unit/Html/Tag/LinkCest.php | 37 ++++++ tests/unit/Html/Tag/MonthFieldCest.php | 37 ------ tests/unit/Html/Tag/NumericFieldCest.php | 37 ------ tests/unit/Html/Tag/PasswordFieldCest.php | 37 ------ tests/unit/Html/Tag/PrependTitleCest.php | 37 ------ tests/unit/Html/Tag/RadioFieldCest.php | 37 ------ tests/unit/Html/Tag/RangeFieldCest.php | 37 ------ tests/unit/Html/Tag/RenderTitleCest.php | 37 ------ tests/unit/Html/Tag/SearchFieldCest.php | 37 ------ tests/unit/Html/Tag/SetDocTypeCest.php | 37 ------ tests/unit/Html/Tag/SetTitleCest.php | 37 ------ tests/unit/Html/Tag/SetTitleSeparatorCest.php | 37 ------ tests/unit/Html/Tag/StylesheetCest.php | 37 ++++++ tests/unit/Html/Tag/StylesheetLinkCest.php | 37 ------ tests/unit/Html/Tag/SubmitButtonCest.php | 37 ------ tests/unit/Html/Tag/TagHtmlCloseCest.php | 37 ------ tests/unit/Html/Tag/TelFieldCest.php | 37 ------ tests/unit/Html/Tag/TextFieldCest.php | 37 ------ tests/unit/Html/Tag/TimeFieldCest.php | 37 ------ tests/unit/Html/Tag/TitleAppendCest.php | 37 ++++++ tests/unit/Html/Tag/TitleFriendlyCest.php | 37 ++++++ tests/unit/Html/Tag/TitleGetCest.php | 37 ++++++ tests/unit/Html/Tag/TitlePrependCest.php | 37 ++++++ tests/unit/Html/Tag/TitleRenderCest.php | 37 ++++++ tests/unit/Html/Tag/TitleSeparatorGetCest.php | 37 ++++++ tests/unit/Html/Tag/TitleSeparatorSetCest.php | 37 ++++++ tests/unit/Html/Tag/TitleSetCest.php | 37 ++++++ tests/unit/Html/Tag/UrlFieldCest.php | 37 ------ tests/unit/Html/Tag/WeekFieldCest.php | 37 ------ 71 files changed, 1109 insertions(+), 1274 deletions(-) create mode 100644 tests/unit/Html/Tag/ButtonSubmitCest.php delete mode 100644 tests/unit/Html/Tag/DateTimeFieldCest.php delete mode 100644 tests/unit/Html/Tag/DateTimeLocalFieldCest.php rename tests/unit/Html/Tag/{CheckFieldCest.php => DocTypeGetCest.php} (74%) rename tests/unit/Html/Tag/{ColorFieldCest.php => DocTypeSetCest.php} (74%) rename tests/unit/Html/Tag/{EndFormCest.php => ElementCest.php} (75%) create mode 100644 tests/unit/Html/Tag/ElementCloseCest.php delete mode 100644 tests/unit/Html/Tag/EmailFieldCest.php rename tests/unit/Html/Tag/{TagHtmlCest.php => FormEndCest.php} (75%) delete mode 100644 tests/unit/Html/Tag/FriendlyTitleCest.php rename tests/unit/Html/Tag/{LinkToCest.php => GetCest.php} (76%) delete mode 100644 tests/unit/Html/Tag/GetDocTypeCest.php delete mode 100644 tests/unit/Html/Tag/GetEscaperCest.php delete mode 100644 tests/unit/Html/Tag/GetEscaperServiceCest.php delete mode 100644 tests/unit/Html/Tag/GetTitleSeparatorCest.php delete mode 100644 tests/unit/Html/Tag/GetUrlServiceCest.php rename tests/unit/Html/Tag/{HasValueCest.php => HasCest.php} (75%) delete mode 100644 tests/unit/Html/Tag/HiddenFieldCest.php delete mode 100644 tests/unit/Html/Tag/ImageInputCest.php create mode 100644 tests/unit/Html/Tag/InputCheckboxCest.php create mode 100644 tests/unit/Html/Tag/InputColorCest.php rename tests/unit/Html/Tag/{DisplayToCest.php => InputDateCest.php} (74%) create mode 100644 tests/unit/Html/Tag/InputDateTimeCest.php create mode 100644 tests/unit/Html/Tag/InputDateTimeLocalCest.php create mode 100644 tests/unit/Html/Tag/InputEmailCest.php rename tests/unit/Html/Tag/{FileFieldCest.php => InputFileCest.php} (74%) rename tests/unit/Html/Tag/{AppendTitleCest.php => InputHiddenCest.php} (73%) create mode 100644 tests/unit/Html/Tag/InputImageCest.php create mode 100644 tests/unit/Html/Tag/InputMonthCest.php create mode 100644 tests/unit/Html/Tag/InputNumericCest.php create mode 100644 tests/unit/Html/Tag/InputPasswordCest.php create mode 100644 tests/unit/Html/Tag/InputRadioCest.php create mode 100644 tests/unit/Html/Tag/InputRangeCest.php create mode 100644 tests/unit/Html/Tag/InputSearchCest.php rename tests/unit/Html/Tag/{GetTitleCest.php => InputTelCest.php} (75%) rename tests/unit/Html/Tag/{DateFieldCest.php => InputTextCest.php} (74%) create mode 100644 tests/unit/Html/Tag/InputTimeCest.php rename tests/unit/Html/Tag/{GetValueCest.php => InputUrlCest.php} (75%) create mode 100644 tests/unit/Html/Tag/InputWeekCest.php create mode 100644 tests/unit/Html/Tag/JavascriptCest.php delete mode 100644 tests/unit/Html/Tag/JavascriptIncludeCest.php create mode 100644 tests/unit/Html/Tag/LinkCest.php delete mode 100644 tests/unit/Html/Tag/MonthFieldCest.php delete mode 100644 tests/unit/Html/Tag/NumericFieldCest.php delete mode 100644 tests/unit/Html/Tag/PasswordFieldCest.php delete mode 100644 tests/unit/Html/Tag/PrependTitleCest.php delete mode 100644 tests/unit/Html/Tag/RadioFieldCest.php delete mode 100644 tests/unit/Html/Tag/RangeFieldCest.php delete mode 100644 tests/unit/Html/Tag/RenderTitleCest.php delete mode 100644 tests/unit/Html/Tag/SearchFieldCest.php delete mode 100644 tests/unit/Html/Tag/SetDocTypeCest.php delete mode 100644 tests/unit/Html/Tag/SetTitleCest.php delete mode 100644 tests/unit/Html/Tag/SetTitleSeparatorCest.php create mode 100644 tests/unit/Html/Tag/StylesheetCest.php delete mode 100644 tests/unit/Html/Tag/StylesheetLinkCest.php delete mode 100644 tests/unit/Html/Tag/SubmitButtonCest.php delete mode 100644 tests/unit/Html/Tag/TagHtmlCloseCest.php delete mode 100644 tests/unit/Html/Tag/TelFieldCest.php delete mode 100644 tests/unit/Html/Tag/TextFieldCest.php delete mode 100644 tests/unit/Html/Tag/TimeFieldCest.php create mode 100644 tests/unit/Html/Tag/TitleAppendCest.php create mode 100644 tests/unit/Html/Tag/TitleFriendlyCest.php create mode 100644 tests/unit/Html/Tag/TitleGetCest.php create mode 100644 tests/unit/Html/Tag/TitlePrependCest.php create mode 100644 tests/unit/Html/Tag/TitleRenderCest.php create mode 100644 tests/unit/Html/Tag/TitleSeparatorGetCest.php create mode 100644 tests/unit/Html/Tag/TitleSeparatorSetCest.php create mode 100644 tests/unit/Html/Tag/TitleSetCest.php delete mode 100644 tests/unit/Html/Tag/UrlFieldCest.php delete mode 100644 tests/unit/Html/Tag/WeekFieldCest.php diff --git a/phalcon/html/tag.zep b/phalcon/html/tag.zep index ad6af6bb4ca..1a7812bf9dd 100644 --- a/phalcon/html/tag.zep +++ b/phalcon/html/tag.zep @@ -55,216 +55,199 @@ class Tag implements InjectionAwareInterface return this->container; } - public function getEscaper(array! params) -> | null + public function buttonSubmit(array parameters = []) -> string { } - public function renderAttributes(string! code, array! attributes) -> string - { - } - - public function getUrlService() -> - { - } - - public function getEscaperService() -> - { - } - - public function setAutoescape(bool autoescape) -> void + public function clear() -> void { } - public function setDefault(string! id, value) -> void + public function docTypeGet() -> void { } - public function setDefaults(array! values, bool merge = false) -> void + public function docTypeSet(int doctype) -> void { } - public function displayTo(string! id, value) -> void + public function element(array parameters = []) -> string { } - public function hasValue(var name) -> bool + public function elementClose(array parameters = []) -> string { } - public function getValue(var name, array params = []) + public function form(array parameters = []) -> string { } - public function clear() -> void + public function formEnd() -> string { } - public function linkTo(parameters, text = null, local = true) -> string + public function get(string name, array parameters = []) { } - public function colorField(var parameters) -> string + public function has(string name) -> bool { } - public function textField(var parameters) -> string + public function image(array parameters = []) -> string { } - public function numericField(var parameters) -> string + public function inputCheckbox(array parameters = []) -> string { } - public function rangeField(var parameters) -> string + public function inputColor(array parameters = []) -> string { } - public function emailField(var parameters) -> string + public function inputDate(array parameters = []) -> string { } - public function dateField(var parameters) -> string + public function inputDateTime(array parameters = []) -> string { } - public function dateTimeField(var parameters) -> string + public function inputDateTimeLocal(array parameters = []) -> string { } - public function dateTimeLocalField(var parameters) -> string + public function inputEmail(array parameters = []) -> string { } - public function monthField(var parameters) -> string + public function inputFile(array parameters = []) -> string { } - public function timeField(var parameters) -> string + public function inputHidden(array parameters = []) -> string { } - public function weekField(var parameters) -> string + public function inputImage(array parameters = []) -> string { } - public function passwordField(var parameters) -> string + public function inputMonth(array parameters = []) -> string { } - public function hiddenField(var parameters) -> string + public function inputNumeric(array parameters = []) -> string { } - public function fileField(var parameters) -> string + public function inputPassword(array parameters = []) -> string { } - public function searchField(var parameters) -> string + public function inputRadio(array parameters = []) -> string { } - public function telField(var parameters) -> string + public function inputRange(array parameters = []) -> string { } - public function urlField(var parameters) -> string + public function inputSearch(array parameters = []) -> string { } - public function checkField(var parameters) -> string + public function inputTel(array parameters = []) -> string { } - public function radioField(var parameters) -> string + public function inputText(array parameters = []) -> string { } - public function imageInput(var parameters) -> string + public function inputTime(array parameters = []) -> string { } - public function submitButton(var parameters) -> string + public function inputUrl(array parameters = []) -> string { } - public function selectStatic(parameters, data = null) -> string + public function inputWeek(array parameters = []) -> string { } - public function select(var parameters, data = null) -> string + public function javascript(array parameters = []) -> string { } - public function textArea(var parameters) -> string + public function link(array parameters = []) -> string { } - public function form(var parameters) -> string - { - } - - public function endForm() -> string + public function renderAttributes(string! code, array! attributes) -> string { } - public function setTitle(string title) -> void + public function select(array parameters = [], data = null) -> string { } - public function setTitleSeparator(string titleSeparator) -> void + public function selectStatic(array parameters, data = null) -> string { } - public function appendTitle(var title) -> void + public function setAutoescape(bool autoescape) -> void { } - public function prependTitle(var title) -> void + public function setDefault(string! id, value) -> void { } - public function getTitle(bool prepend = true, bool append = true) -> string + public function setDefaults(array! values, bool merge = false) -> void { } - public function renderTitle() -> string + public function stylesheet(array parameters = []) -> string { } - public function getTitleSeparator() -> string + public function textArea(array parameters = []) -> string { } - public function stylesheetLink(var parameters = null, bool local = true) -> string + public function titleAppend(string title) -> void { } - public function javascriptInclude(var parameters = null, bool local = true) -> string + public function titleFriendly(string text, string separator = "-", bool lowercase = true, var replace = null) -> string { } - public function image(var parameters = null, bool local = true) -> string + public function titleGet(bool prepend = true, bool append = true) -> string { } - public function friendlyTitle(string text, string separator = "-", bool lowercase = true, var replace = null) -> string + public function titlePrepend(string title) -> void { } - public function setDocType(int doctype) -> void + public function titleRender() -> string { } - public function getDocType() -> string + public function titleSeparatorGet() -> string { } - public function tagHtml(string tagName, var parameters = null, bool selfClose = false, - bool onlyStart = false, bool useEol = false) -> string + public function titleSeparatorSet(string separator) -> void { } - public function tagHtmlClose(string tagName, bool useEol = false) -> string + public function titleSet(string title) -> void { } @@ -272,7 +255,7 @@ class Tag implements InjectionAwareInterface { } - private function inputFieldChecked(string type, var parameters) -> string + private function inputFieldChecked(string type, array parameters = []) -> string { } diff --git a/tests/unit/Html/Tag/ButtonSubmitCest.php b/tests/unit/Html/Tag/ButtonSubmitCest.php new file mode 100644 index 00000000000..d893c139175 --- /dev/null +++ b/tests/unit/Html/Tag/ButtonSubmitCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class ButtonSubmitCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ButtonSubmitCest +{ + /** + * Tests Phalcon\Html\Tag :: buttonSubmit() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagButtonSubmit(UnitTester $I) + { + $I->wantToTest('Html\Tag - buttonSubmit()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/DateTimeFieldCest.php b/tests/unit/Html/Tag/DateTimeFieldCest.php deleted file mode 100644 index fc7dc48b169..00000000000 --- a/tests/unit/Html/Tag/DateTimeFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class DateTimeFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class DateTimeFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: dateTimeField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagDateTimeField(UnitTester $I) - { - $I->wantToTest('Html\Tag - dateTimeField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/DateTimeLocalFieldCest.php b/tests/unit/Html/Tag/DateTimeLocalFieldCest.php deleted file mode 100644 index d19454caa6c..00000000000 --- a/tests/unit/Html/Tag/DateTimeLocalFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class DateTimeLocalFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class DateTimeLocalFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: dateTimeLocalField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagDateTimeLocalField(UnitTester $I) - { - $I->wantToTest('Html\Tag - dateTimeLocalField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/CheckFieldCest.php b/tests/unit/Html/Tag/DocTypeGetCest.php similarity index 74% rename from tests/unit/Html/Tag/CheckFieldCest.php rename to tests/unit/Html/Tag/DocTypeGetCest.php index 8fd8a29d5f2..d1e3c0a5b37 100644 --- a/tests/unit/Html/Tag/CheckFieldCest.php +++ b/tests/unit/Html/Tag/DocTypeGetCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class CheckFieldCest + * Class DocTypeGetCest * * @package Phalcon\Test\Unit\Html\Tag */ -class CheckFieldCest +class DocTypeGetCest { /** - * Tests Phalcon\Html\Tag :: checkField() + * Tests Phalcon\Html\Tag :: docTypeGet() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagCheckField(UnitTester $I) + public function htmlTagDocTypeGet(UnitTester $I) { - $I->wantToTest('Html\Tag - checkField()'); + $I->wantToTest('Html\Tag - docTypeGet()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/ColorFieldCest.php b/tests/unit/Html/Tag/DocTypeSetCest.php similarity index 74% rename from tests/unit/Html/Tag/ColorFieldCest.php rename to tests/unit/Html/Tag/DocTypeSetCest.php index 42e1ad5bd5d..0777f3febee 100644 --- a/tests/unit/Html/Tag/ColorFieldCest.php +++ b/tests/unit/Html/Tag/DocTypeSetCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class ColorFieldCest + * Class DocTypeSetCest * * @package Phalcon\Test\Unit\Html\Tag */ -class ColorFieldCest +class DocTypeSetCest { /** - * Tests Phalcon\Html\Tag :: colorField() + * Tests Phalcon\Html\Tag :: docTypeSet() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagColorField(UnitTester $I) + public function htmlTagDocTypeSet(UnitTester $I) { - $I->wantToTest('Html\Tag - colorField()'); + $I->wantToTest('Html\Tag - docTypeSet()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/EndFormCest.php b/tests/unit/Html/Tag/ElementCest.php similarity index 75% rename from tests/unit/Html/Tag/EndFormCest.php rename to tests/unit/Html/Tag/ElementCest.php index f8579025c65..94eb64196fb 100644 --- a/tests/unit/Html/Tag/EndFormCest.php +++ b/tests/unit/Html/Tag/ElementCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class EndFormCest + * Class ElementCest * * @package Phalcon\Test\Unit\Html\Tag */ -class EndFormCest +class ElementCest { /** - * Tests Phalcon\Html\Tag :: endForm() + * Tests Phalcon\Html\Tag :: element() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagEndForm(UnitTester $I) + public function htmlTagElement(UnitTester $I) { - $I->wantToTest('Html\Tag - endForm()'); + $I->wantToTest('Html\Tag - element()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/ElementCloseCest.php b/tests/unit/Html/Tag/ElementCloseCest.php new file mode 100644 index 00000000000..3c2881c94d0 --- /dev/null +++ b/tests/unit/Html/Tag/ElementCloseCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class ElementCloseCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ElementCloseCest +{ + /** + * Tests Phalcon\Html\Tag :: elementClose() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagElementClose(UnitTester $I) + { + $I->wantToTest('Html\Tag - elementClose()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/EmailFieldCest.php b/tests/unit/Html/Tag/EmailFieldCest.php deleted file mode 100644 index 2053212a813..00000000000 --- a/tests/unit/Html/Tag/EmailFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class EmailFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class EmailFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: emailField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagEmailField(UnitTester $I) - { - $I->wantToTest('Html\Tag - emailField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/TagHtmlCest.php b/tests/unit/Html/Tag/FormEndCest.php similarity index 75% rename from tests/unit/Html/Tag/TagHtmlCest.php rename to tests/unit/Html/Tag/FormEndCest.php index dd55c1dc7df..79a0b84291c 100644 --- a/tests/unit/Html/Tag/TagHtmlCest.php +++ b/tests/unit/Html/Tag/FormEndCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class TagHtmlCest + * Class FormEndCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TagHtmlCest +class FormEndCest { /** - * Tests Phalcon\Html\Tag :: tagHtml() + * Tests Phalcon\Html\Tag :: formEnd() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagTagHtml(UnitTester $I) + public function htmlTagFormEnd(UnitTester $I) { - $I->wantToTest('Html\Tag - tagHtml()'); + $I->wantToTest('Html\Tag - formEnd()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/FriendlyTitleCest.php b/tests/unit/Html/Tag/FriendlyTitleCest.php deleted file mode 100644 index 4ad304e99b2..00000000000 --- a/tests/unit/Html/Tag/FriendlyTitleCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class FriendlyTitleCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class FriendlyTitleCest -{ - /** - * Tests Phalcon\Html\Tag :: friendlyTitle() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagFriendlyTitle(UnitTester $I) - { - $I->wantToTest('Html\Tag - friendlyTitle()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/LinkToCest.php b/tests/unit/Html/Tag/GetCest.php similarity index 76% rename from tests/unit/Html/Tag/LinkToCest.php rename to tests/unit/Html/Tag/GetCest.php index 7ac7c707c05..3ae113f607b 100644 --- a/tests/unit/Html/Tag/LinkToCest.php +++ b/tests/unit/Html/Tag/GetCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class LinkToCest + * Class GetCest * * @package Phalcon\Test\Unit\Html\Tag */ -class LinkToCest +class GetCest { /** - * Tests Phalcon\Html\Tag :: linkTo() + * Tests Phalcon\Html\Tag :: get() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagLinkTo(UnitTester $I) + public function htmlTagGet(UnitTester $I) { - $I->wantToTest('Html\Tag - linkTo()'); + $I->wantToTest('Html\Tag - get()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/GetDocTypeCest.php b/tests/unit/Html/Tag/GetDocTypeCest.php deleted file mode 100644 index cdd90be4ff5..00000000000 --- a/tests/unit/Html/Tag/GetDocTypeCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class GetDocTypeCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class GetDocTypeCest -{ - /** - * Tests Phalcon\Html\Tag :: getDocType() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagGetDocType(UnitTester $I) - { - $I->wantToTest('Html\Tag - getDocType()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/GetEscaperCest.php b/tests/unit/Html/Tag/GetEscaperCest.php deleted file mode 100644 index 0c5ea8ec589..00000000000 --- a/tests/unit/Html/Tag/GetEscaperCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class GetEscaperCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class GetEscaperCest -{ - /** - * Tests Phalcon\Html\Tag :: getEscaper() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagGetEscaper(UnitTester $I) - { - $I->wantToTest('Html\Tag - getEscaper()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/GetEscaperServiceCest.php b/tests/unit/Html/Tag/GetEscaperServiceCest.php deleted file mode 100644 index 941da207b40..00000000000 --- a/tests/unit/Html/Tag/GetEscaperServiceCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class GetEscaperServiceCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class GetEscaperServiceCest -{ - /** - * Tests Phalcon\Html\Tag :: getEscaperService() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagGetEscaperService(UnitTester $I) - { - $I->wantToTest('Html\Tag - getEscaperService()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/GetTitleSeparatorCest.php b/tests/unit/Html/Tag/GetTitleSeparatorCest.php deleted file mode 100644 index 1012af63e55..00000000000 --- a/tests/unit/Html/Tag/GetTitleSeparatorCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class GetTitleSeparatorCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class GetTitleSeparatorCest -{ - /** - * Tests Phalcon\Html\Tag :: getTitleSeparator() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagGetTitleSeparator(UnitTester $I) - { - $I->wantToTest('Html\Tag - getTitleSeparator()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/GetUrlServiceCest.php b/tests/unit/Html/Tag/GetUrlServiceCest.php deleted file mode 100644 index 50ad1ea9c65..00000000000 --- a/tests/unit/Html/Tag/GetUrlServiceCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class GetUrlServiceCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class GetUrlServiceCest -{ - /** - * Tests Phalcon\Html\Tag :: getUrlService() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagGetUrlService(UnitTester $I) - { - $I->wantToTest('Html\Tag - getUrlService()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/HasValueCest.php b/tests/unit/Html/Tag/HasCest.php similarity index 75% rename from tests/unit/Html/Tag/HasValueCest.php rename to tests/unit/Html/Tag/HasCest.php index 0c8d0264fb9..0a75382ff84 100644 --- a/tests/unit/Html/Tag/HasValueCest.php +++ b/tests/unit/Html/Tag/HasCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class HasValueCest + * Class HasCest * * @package Phalcon\Test\Unit\Html\Tag */ -class HasValueCest +class HasCest { /** - * Tests Phalcon\Html\Tag :: hasValue() + * Tests Phalcon\Html\Tag :: has() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagHasValue(UnitTester $I) + public function htmlTagHas(UnitTester $I) { - $I->wantToTest('Html\Tag - hasValue()'); + $I->wantToTest('Html\Tag - has()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/HiddenFieldCest.php b/tests/unit/Html/Tag/HiddenFieldCest.php deleted file mode 100644 index adc012d3e8a..00000000000 --- a/tests/unit/Html/Tag/HiddenFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class HiddenFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class HiddenFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: hiddenField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagHiddenField(UnitTester $I) - { - $I->wantToTest('Html\Tag - hiddenField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/ImageInputCest.php b/tests/unit/Html/Tag/ImageInputCest.php deleted file mode 100644 index b721691adf5..00000000000 --- a/tests/unit/Html/Tag/ImageInputCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class ImageInputCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class ImageInputCest -{ - /** - * Tests Phalcon\Html\Tag :: imageInput() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagImageInput(UnitTester $I) - { - $I->wantToTest('Html\Tag - imageInput()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/InputCheckboxCest.php b/tests/unit/Html/Tag/InputCheckboxCest.php new file mode 100644 index 00000000000..20619ef53b7 --- /dev/null +++ b/tests/unit/Html/Tag/InputCheckboxCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputCheckboxCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputCheckboxCest +{ + /** + * Tests Phalcon\Html\Tag :: inputCheckbox() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputCheckbox(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputCheckbox()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputColorCest.php b/tests/unit/Html/Tag/InputColorCest.php new file mode 100644 index 00000000000..3354edec574 --- /dev/null +++ b/tests/unit/Html/Tag/InputColorCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputColorCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputColorCest +{ + /** + * Tests Phalcon\Html\Tag :: inputColor() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputColor(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputColor()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/DisplayToCest.php b/tests/unit/Html/Tag/InputDateCest.php similarity index 74% rename from tests/unit/Html/Tag/DisplayToCest.php rename to tests/unit/Html/Tag/InputDateCest.php index d87934f1c5e..4435aec2ced 100644 --- a/tests/unit/Html/Tag/DisplayToCest.php +++ b/tests/unit/Html/Tag/InputDateCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class DisplayToCest + * Class InputDateCest * * @package Phalcon\Test\Unit\Html\Tag */ -class DisplayToCest +class InputDateCest { /** - * Tests Phalcon\Html\Tag :: displayTo() + * Tests Phalcon\Html\Tag :: inputDate() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagDisplayTo(UnitTester $I) + public function htmlTagInputDate(UnitTester $I) { - $I->wantToTest('Html\Tag - displayTo()'); + $I->wantToTest('Html\Tag - inputDate()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/InputDateTimeCest.php b/tests/unit/Html/Tag/InputDateTimeCest.php new file mode 100644 index 00000000000..68064ed43e9 --- /dev/null +++ b/tests/unit/Html/Tag/InputDateTimeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputDateTimeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputDateTimeCest +{ + /** + * Tests Phalcon\Html\Tag :: inputDateTime() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputDateTime(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputDateTime()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputDateTimeLocalCest.php b/tests/unit/Html/Tag/InputDateTimeLocalCest.php new file mode 100644 index 00000000000..55c3839643a --- /dev/null +++ b/tests/unit/Html/Tag/InputDateTimeLocalCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputDateTimeLocalCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputDateTimeLocalCest +{ + /** + * Tests Phalcon\Html\Tag :: inputDateTimeLocal() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputDateTimeLocal(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputDateTimeLocal()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputEmailCest.php b/tests/unit/Html/Tag/InputEmailCest.php new file mode 100644 index 00000000000..d6f82e420f2 --- /dev/null +++ b/tests/unit/Html/Tag/InputEmailCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputEmailCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputEmailCest +{ + /** + * Tests Phalcon\Html\Tag :: inputEmail() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputEmail(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputEmail()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/FileFieldCest.php b/tests/unit/Html/Tag/InputFileCest.php similarity index 74% rename from tests/unit/Html/Tag/FileFieldCest.php rename to tests/unit/Html/Tag/InputFileCest.php index f488802b11c..48d15601370 100644 --- a/tests/unit/Html/Tag/FileFieldCest.php +++ b/tests/unit/Html/Tag/InputFileCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class FileFieldCest + * Class InputFileCest * * @package Phalcon\Test\Unit\Html\Tag */ -class FileFieldCest +class InputFileCest { /** - * Tests Phalcon\Html\Tag :: fileField() + * Tests Phalcon\Html\Tag :: inputFile() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagFileField(UnitTester $I) + public function htmlTagInputFile(UnitTester $I) { - $I->wantToTest('Html\Tag - fileField()'); + $I->wantToTest('Html\Tag - inputFile()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/AppendTitleCest.php b/tests/unit/Html/Tag/InputHiddenCest.php similarity index 73% rename from tests/unit/Html/Tag/AppendTitleCest.php rename to tests/unit/Html/Tag/InputHiddenCest.php index c05732f1cae..5e1da5145c9 100644 --- a/tests/unit/Html/Tag/AppendTitleCest.php +++ b/tests/unit/Html/Tag/InputHiddenCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class AppendTitleCest + * Class InputHiddenCest * * @package Phalcon\Test\Unit\Html\Tag */ -class AppendTitleCest +class InputHiddenCest { /** - * Tests Phalcon\Html\Tag :: appendTitle() + * Tests Phalcon\Html\Tag :: inputHidden() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagAppendTitle(UnitTester $I) + public function htmlTagInputHidden(UnitTester $I) { - $I->wantToTest('Html\Tag - appendTitle()'); + $I->wantToTest('Html\Tag - inputHidden()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/InputImageCest.php b/tests/unit/Html/Tag/InputImageCest.php new file mode 100644 index 00000000000..687c4f41cb9 --- /dev/null +++ b/tests/unit/Html/Tag/InputImageCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputImageCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputImageCest +{ + /** + * Tests Phalcon\Html\Tag :: inputImage() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputImage(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputImage()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputMonthCest.php b/tests/unit/Html/Tag/InputMonthCest.php new file mode 100644 index 00000000000..625c6e3c45f --- /dev/null +++ b/tests/unit/Html/Tag/InputMonthCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputMonthCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputMonthCest +{ + /** + * Tests Phalcon\Html\Tag :: inputMonth() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputMonth(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputMonth()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputNumericCest.php b/tests/unit/Html/Tag/InputNumericCest.php new file mode 100644 index 00000000000..a2a38d91bbb --- /dev/null +++ b/tests/unit/Html/Tag/InputNumericCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputNumericCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputNumericCest +{ + /** + * Tests Phalcon\Html\Tag :: inputNumeric() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputNumeric(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputNumeric()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputPasswordCest.php b/tests/unit/Html/Tag/InputPasswordCest.php new file mode 100644 index 00000000000..e9fbe6f9abd --- /dev/null +++ b/tests/unit/Html/Tag/InputPasswordCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputPasswordCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputPasswordCest +{ + /** + * Tests Phalcon\Html\Tag :: inputPassword() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputPassword(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputPassword()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputRadioCest.php b/tests/unit/Html/Tag/InputRadioCest.php new file mode 100644 index 00000000000..9ce53022580 --- /dev/null +++ b/tests/unit/Html/Tag/InputRadioCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputRadioCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputRadioCest +{ + /** + * Tests Phalcon\Html\Tag :: inputRadio() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputRadio(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputRadio()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputRangeCest.php b/tests/unit/Html/Tag/InputRangeCest.php new file mode 100644 index 00000000000..39500039b3c --- /dev/null +++ b/tests/unit/Html/Tag/InputRangeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputRangeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputRangeCest +{ + /** + * Tests Phalcon\Html\Tag :: inputRange() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputRange(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputRange()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/InputSearchCest.php b/tests/unit/Html/Tag/InputSearchCest.php new file mode 100644 index 00000000000..250ca93395b --- /dev/null +++ b/tests/unit/Html/Tag/InputSearchCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputSearchCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputSearchCest +{ + /** + * Tests Phalcon\Html\Tag :: inputSearch() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputSearch(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputSearch()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetTitleCest.php b/tests/unit/Html/Tag/InputTelCest.php similarity index 75% rename from tests/unit/Html/Tag/GetTitleCest.php rename to tests/unit/Html/Tag/InputTelCest.php index d1ca46839f8..3298274bb11 100644 --- a/tests/unit/Html/Tag/GetTitleCest.php +++ b/tests/unit/Html/Tag/InputTelCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class GetTitleCest + * Class InputTelCest * * @package Phalcon\Test\Unit\Html\Tag */ -class GetTitleCest +class InputTelCest { /** - * Tests Phalcon\Html\Tag :: getTitle() + * Tests Phalcon\Html\Tag :: inputTel() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagGetTitle(UnitTester $I) + public function htmlTagInputTel(UnitTester $I) { - $I->wantToTest('Html\Tag - getTitle()'); + $I->wantToTest('Html\Tag - inputTel()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/DateFieldCest.php b/tests/unit/Html/Tag/InputTextCest.php similarity index 74% rename from tests/unit/Html/Tag/DateFieldCest.php rename to tests/unit/Html/Tag/InputTextCest.php index a1fc67410bd..6ef38862b11 100644 --- a/tests/unit/Html/Tag/DateFieldCest.php +++ b/tests/unit/Html/Tag/InputTextCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class DateFieldCest + * Class InputTextCest * * @package Phalcon\Test\Unit\Html\Tag */ -class DateFieldCest +class InputTextCest { /** - * Tests Phalcon\Html\Tag :: dateField() + * Tests Phalcon\Html\Tag :: inputText() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagDateField(UnitTester $I) + public function htmlTagInputText(UnitTester $I) { - $I->wantToTest('Html\Tag - dateField()'); + $I->wantToTest('Html\Tag - inputText()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/InputTimeCest.php b/tests/unit/Html/Tag/InputTimeCest.php new file mode 100644 index 00000000000..a8e207d225c --- /dev/null +++ b/tests/unit/Html/Tag/InputTimeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputTimeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputTimeCest +{ + /** + * Tests Phalcon\Html\Tag :: inputTime() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputTime(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputTime()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/GetValueCest.php b/tests/unit/Html/Tag/InputUrlCest.php similarity index 75% rename from tests/unit/Html/Tag/GetValueCest.php rename to tests/unit/Html/Tag/InputUrlCest.php index 07daa8a125f..70b1836b7ca 100644 --- a/tests/unit/Html/Tag/GetValueCest.php +++ b/tests/unit/Html/Tag/InputUrlCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class GetValueCest + * Class InputUrlCest * * @package Phalcon\Test\Unit\Html\Tag */ -class GetValueCest +class InputUrlCest { /** - * Tests Phalcon\Html\Tag :: getValue() + * Tests Phalcon\Html\Tag :: inputUrl() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagGetValue(UnitTester $I) + public function htmlTagInputUrl(UnitTester $I) { - $I->wantToTest('Html\Tag - getValue()'); + $I->wantToTest('Html\Tag - inputUrl()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/InputWeekCest.php b/tests/unit/Html/Tag/InputWeekCest.php new file mode 100644 index 00000000000..ccd90d09f51 --- /dev/null +++ b/tests/unit/Html/Tag/InputWeekCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class InputWeekCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class InputWeekCest +{ + /** + * Tests Phalcon\Html\Tag :: inputWeek() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagInputWeek(UnitTester $I) + { + $I->wantToTest('Html\Tag - inputWeek()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/JavascriptCest.php b/tests/unit/Html/Tag/JavascriptCest.php new file mode 100644 index 00000000000..7c3bb29e1ec --- /dev/null +++ b/tests/unit/Html/Tag/JavascriptCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class JavascriptCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class JavascriptCest +{ + /** + * Tests Phalcon\Html\Tag :: javascript() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagJavascript(UnitTester $I) + { + $I->wantToTest('Html\Tag - javascript()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/JavascriptIncludeCest.php b/tests/unit/Html/Tag/JavascriptIncludeCest.php deleted file mode 100644 index 2fe6d3257c8..00000000000 --- a/tests/unit/Html/Tag/JavascriptIncludeCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class JavascriptIncludeCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class JavascriptIncludeCest -{ - /** - * Tests Phalcon\Html\Tag :: javascriptInclude() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagJavascriptInclude(UnitTester $I) - { - $I->wantToTest('Html\Tag - javascriptInclude()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/LinkCest.php b/tests/unit/Html/Tag/LinkCest.php new file mode 100644 index 00000000000..d5be84c749b --- /dev/null +++ b/tests/unit/Html/Tag/LinkCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class LinkCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class LinkCest +{ + /** + * Tests Phalcon\Html\Tag :: link() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagLink(UnitTester $I) + { + $I->wantToTest('Html\Tag - link()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/MonthFieldCest.php b/tests/unit/Html/Tag/MonthFieldCest.php deleted file mode 100644 index cbe29670925..00000000000 --- a/tests/unit/Html/Tag/MonthFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class MonthFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class MonthFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: monthField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagMonthField(UnitTester $I) - { - $I->wantToTest('Html\Tag - monthField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/NumericFieldCest.php b/tests/unit/Html/Tag/NumericFieldCest.php deleted file mode 100644 index 0bd41602de8..00000000000 --- a/tests/unit/Html/Tag/NumericFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class NumericFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class NumericFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: numericField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagNumericField(UnitTester $I) - { - $I->wantToTest('Html\Tag - numericField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/PasswordFieldCest.php b/tests/unit/Html/Tag/PasswordFieldCest.php deleted file mode 100644 index 89bb6d7448e..00000000000 --- a/tests/unit/Html/Tag/PasswordFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class PasswordFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class PasswordFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: passwordField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagPasswordField(UnitTester $I) - { - $I->wantToTest('Html\Tag - passwordField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/PrependTitleCest.php b/tests/unit/Html/Tag/PrependTitleCest.php deleted file mode 100644 index 59f4ade3f73..00000000000 --- a/tests/unit/Html/Tag/PrependTitleCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class PrependTitleCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class PrependTitleCest -{ - /** - * Tests Phalcon\Html\Tag :: prependTitle() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagPrependTitle(UnitTester $I) - { - $I->wantToTest('Html\Tag - prependTitle()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/RadioFieldCest.php b/tests/unit/Html/Tag/RadioFieldCest.php deleted file mode 100644 index 740e0b66f65..00000000000 --- a/tests/unit/Html/Tag/RadioFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class RadioFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class RadioFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: radioField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagRadioField(UnitTester $I) - { - $I->wantToTest('Html\Tag - radioField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/RangeFieldCest.php b/tests/unit/Html/Tag/RangeFieldCest.php deleted file mode 100644 index 2630d4a850a..00000000000 --- a/tests/unit/Html/Tag/RangeFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class RangeFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class RangeFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: rangeField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagRangeField(UnitTester $I) - { - $I->wantToTest('Html\Tag - rangeField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/RenderTitleCest.php b/tests/unit/Html/Tag/RenderTitleCest.php deleted file mode 100644 index b92ea7b0848..00000000000 --- a/tests/unit/Html/Tag/RenderTitleCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class RenderTitleCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class RenderTitleCest -{ - /** - * Tests Phalcon\Html\Tag :: renderTitle() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagRenderTitle(UnitTester $I) - { - $I->wantToTest('Html\Tag - renderTitle()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/SearchFieldCest.php b/tests/unit/Html/Tag/SearchFieldCest.php deleted file mode 100644 index 353e791c9ac..00000000000 --- a/tests/unit/Html/Tag/SearchFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class SearchFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class SearchFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: searchField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagSearchField(UnitTester $I) - { - $I->wantToTest('Html\Tag - searchField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/SetDocTypeCest.php b/tests/unit/Html/Tag/SetDocTypeCest.php deleted file mode 100644 index f4456d2d918..00000000000 --- a/tests/unit/Html/Tag/SetDocTypeCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class SetDocTypeCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class SetDocTypeCest -{ - /** - * Tests Phalcon\Html\Tag :: setDocType() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagSetDocType(UnitTester $I) - { - $I->wantToTest('Html\Tag - setDocType()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/SetTitleCest.php b/tests/unit/Html/Tag/SetTitleCest.php deleted file mode 100644 index 5b747cac235..00000000000 --- a/tests/unit/Html/Tag/SetTitleCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class SetTitleCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class SetTitleCest -{ - /** - * Tests Phalcon\Html\Tag :: setTitle() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagSetTitle(UnitTester $I) - { - $I->wantToTest('Html\Tag - setTitle()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/SetTitleSeparatorCest.php b/tests/unit/Html/Tag/SetTitleSeparatorCest.php deleted file mode 100644 index 179a7f1cb84..00000000000 --- a/tests/unit/Html/Tag/SetTitleSeparatorCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class SetTitleSeparatorCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class SetTitleSeparatorCest -{ - /** - * Tests Phalcon\Html\Tag :: setTitleSeparator() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagSetTitleSeparator(UnitTester $I) - { - $I->wantToTest('Html\Tag - setTitleSeparator()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/StylesheetCest.php b/tests/unit/Html/Tag/StylesheetCest.php new file mode 100644 index 00000000000..45dcdb5360a --- /dev/null +++ b/tests/unit/Html/Tag/StylesheetCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class StylesheetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class StylesheetCest +{ + /** + * Tests Phalcon\Html\Tag :: stylesheet() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagStylesheet(UnitTester $I) + { + $I->wantToTest('Html\Tag - stylesheet()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/StylesheetLinkCest.php b/tests/unit/Html/Tag/StylesheetLinkCest.php deleted file mode 100644 index 665a4ef6cc2..00000000000 --- a/tests/unit/Html/Tag/StylesheetLinkCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class StylesheetLinkCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class StylesheetLinkCest -{ - /** - * Tests Phalcon\Html\Tag :: stylesheetLink() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagStylesheetLink(UnitTester $I) - { - $I->wantToTest('Html\Tag - stylesheetLink()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/SubmitButtonCest.php b/tests/unit/Html/Tag/SubmitButtonCest.php deleted file mode 100644 index 3503c659ea8..00000000000 --- a/tests/unit/Html/Tag/SubmitButtonCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class SubmitButtonCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class SubmitButtonCest -{ - /** - * Tests Phalcon\Html\Tag :: submitButton() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagSubmitButton(UnitTester $I) - { - $I->wantToTest('Html\Tag - submitButton()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/TagHtmlCloseCest.php b/tests/unit/Html/Tag/TagHtmlCloseCest.php deleted file mode 100644 index e991fb2fb9a..00000000000 --- a/tests/unit/Html/Tag/TagHtmlCloseCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class TagHtmlCloseCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class TagHtmlCloseCest -{ - /** - * Tests Phalcon\Html\Tag :: tagHtmlClose() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagTagHtmlClose(UnitTester $I) - { - $I->wantToTest('Html\Tag - tagHtmlClose()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/TelFieldCest.php b/tests/unit/Html/Tag/TelFieldCest.php deleted file mode 100644 index d64b92b08da..00000000000 --- a/tests/unit/Html/Tag/TelFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class TelFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class TelFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: telField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagTelField(UnitTester $I) - { - $I->wantToTest('Html\Tag - telField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/TextFieldCest.php b/tests/unit/Html/Tag/TextFieldCest.php deleted file mode 100644 index 3b2d1a46115..00000000000 --- a/tests/unit/Html/Tag/TextFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class TextFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class TextFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: textField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagTextField(UnitTester $I) - { - $I->wantToTest('Html\Tag - textField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/TimeFieldCest.php b/tests/unit/Html/Tag/TimeFieldCest.php deleted file mode 100644 index 38412978484..00000000000 --- a/tests/unit/Html/Tag/TimeFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class TimeFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class TimeFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: timeField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagTimeField(UnitTester $I) - { - $I->wantToTest('Html\Tag - timeField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/TitleAppendCest.php b/tests/unit/Html/Tag/TitleAppendCest.php new file mode 100644 index 00000000000..05f0ce54b6e --- /dev/null +++ b/tests/unit/Html/Tag/TitleAppendCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleAppendCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleAppendCest +{ + /** + * Tests Phalcon\Html\Tag :: titleAppend() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleAppend(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleAppend()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitleFriendlyCest.php b/tests/unit/Html/Tag/TitleFriendlyCest.php new file mode 100644 index 00000000000..7302db6c3a1 --- /dev/null +++ b/tests/unit/Html/Tag/TitleFriendlyCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleFriendlyCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleFriendlyCest +{ + /** + * Tests Phalcon\Html\Tag :: titleFriendly() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleFriendly(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleFriendly()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitleGetCest.php b/tests/unit/Html/Tag/TitleGetCest.php new file mode 100644 index 00000000000..1c870287e13 --- /dev/null +++ b/tests/unit/Html/Tag/TitleGetCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleGetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleGetCest +{ + /** + * Tests Phalcon\Html\Tag :: titleGet() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleGet(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleGet()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitlePrependCest.php b/tests/unit/Html/Tag/TitlePrependCest.php new file mode 100644 index 00000000000..4520665bbee --- /dev/null +++ b/tests/unit/Html/Tag/TitlePrependCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitlePrependCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitlePrependCest +{ + /** + * Tests Phalcon\Html\Tag :: titlePrepend() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitlePrepend(UnitTester $I) + { + $I->wantToTest('Html\Tag - titlePrepend()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitleRenderCest.php b/tests/unit/Html/Tag/TitleRenderCest.php new file mode 100644 index 00000000000..271a3234f7e --- /dev/null +++ b/tests/unit/Html/Tag/TitleRenderCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleRenderCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleRenderCest +{ + /** + * Tests Phalcon\Html\Tag :: titleRender() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleRender(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleRender()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitleSeparatorGetCest.php b/tests/unit/Html/Tag/TitleSeparatorGetCest.php new file mode 100644 index 00000000000..104539ae358 --- /dev/null +++ b/tests/unit/Html/Tag/TitleSeparatorGetCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleSeparatorGetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleSeparatorGetCest +{ + /** + * Tests Phalcon\Html\Tag :: titleSeparatorGet() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleSeparatorGet(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleSeparatorGet()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitleSeparatorSetCest.php b/tests/unit/Html/Tag/TitleSeparatorSetCest.php new file mode 100644 index 00000000000..257ad695a2a --- /dev/null +++ b/tests/unit/Html/Tag/TitleSeparatorSetCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleSeparatorSetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleSeparatorSetCest +{ + /** + * Tests Phalcon\Html\Tag :: titleSeparatorSet() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleSeparatorSet(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleSeparatorSet()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/TitleSetCest.php b/tests/unit/Html/Tag/TitleSetCest.php new file mode 100644 index 00000000000..09e0fddcf82 --- /dev/null +++ b/tests/unit/Html/Tag/TitleSetCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class TitleSetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class TitleSetCest +{ + /** + * Tests Phalcon\Html\Tag :: titleSet() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleSet(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleSet()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/UrlFieldCest.php b/tests/unit/Html/Tag/UrlFieldCest.php deleted file mode 100644 index 7f05cad2af0..00000000000 --- a/tests/unit/Html/Tag/UrlFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class UrlFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class UrlFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: urlField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagUrlField(UnitTester $I) - { - $I->wantToTest('Html\Tag - urlField()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/WeekFieldCest.php b/tests/unit/Html/Tag/WeekFieldCest.php deleted file mode 100644 index d22c1aa166c..00000000000 --- a/tests/unit/Html/Tag/WeekFieldCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class WeekFieldCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class WeekFieldCest -{ - /** - * Tests Phalcon\Html\Tag :: weekField() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagWeekField(UnitTester $I) - { - $I->wantToTest('Html\Tag - weekField()'); - $I->skipTest('Need implementation'); - } -} From 9625c85017f1d330170ef84fda2688cc1ecf1256 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Sun, 9 Dec 2018 22:31:08 -0500 Subject: [PATCH 05/19] [#12379] - Work on the elementClose --- phalcon/html/tag.zep | 134 ++++++++++++++++++++++- tests/unit/Html/Tag/ElementCloseCest.php | 50 ++++++++- 2 files changed, 179 insertions(+), 5 deletions(-) diff --git a/phalcon/html/tag.zep b/phalcon/html/tag.zep index 1a7812bf9dd..a4b1fc558a2 100644 --- a/phalcon/html/tag.zep +++ b/phalcon/html/tag.zep @@ -27,6 +27,12 @@ class Tag implements InjectionAwareInterface */ protected container; + /** + * @var int + */ + private docType = 5; // HTML5 + + const HTML32 = 1; const HTML401_STRICT = 2; const HTML401_TRANSITIONAL = 3; @@ -63,20 +69,125 @@ class Tag implements InjectionAwareInterface { } - public function docTypeGet() -> void - { + /** + * Get the document type declaration of content. If the docType has not + * been set properly, XHTML5 is returned + */ + public function docTypeGet() -> string + { + switch this->docType + { + case 1: + return "" . PHP_EOL; + /* no break */ + + case 2: + return "" . PHP_EOL; + /* no break */ + + case 3: + return "" . PHP_EOL; + /* no break */ + + case 4: + return "" . PHP_EOL; + /* no break */ + + case 6: + return "" . PHP_EOL; + /* no break */ + + case 7: + return "" . PHP_EOL; + /* no break */ + + case 8: + return "" . PHP_EOL; + /* no break */ + + case 9: + return "" . PHP_EOL; + /* no break */ + + case 10: + return "" . PHP_EOL; + /* no break */ + } + + return "" . PHP_EOL; } - public function docTypeSet(int doctype) -> void + /** + * Set the document type of content + * + * @param int doctype A valid doctype for the content + * + * @return + */ + public function docTypeSet(int doctype) -> { + if (doctype < self::HTML32 || doctype > self::XHTML5) { + let this->docType = self::HTML5; + } else { + let this->docType = doctype; + } + + return this; } public function element(array parameters = []) -> string { } + /** + * Builds the closing tag of an html element + * + * @param array parameters ["name", "useEol"] + * + * @return string + * + * + * use Phalcon\Html\Tag; + * + * $tab = new Tag(); + * + * echo $tag->elementClose( + * [ + * 'name' => 'aside', + * ] + * ); // + * + * echo $tag->elementClose( + * [ + * 'name' => 'aside', + * 'useEol' => true, + * ] + * ); // "" . PHP_EOL + * + */ public function elementClose(array parameters = []) -> string { + var name, useEol = false; + + if !fetch name, parameters["name"] { + throw new Exception("The 'name' parameter must be specified"); + } + + let useEol = this->arrayGetDefault("useEol", parameters, false); + + if useEol { + return "" . PHP_EOL; + } + return ""; + } public function form(array parameters = []) -> string @@ -251,6 +362,23 @@ class Tag implements InjectionAwareInterface { } + /** + * Helper method to check an array for an element. If it exists it returns it, + * if not, it returns the supplied default value + * + * @param string name + * @param arrays parameters + * @param mixed defaultValue + */ + private function arrayGetDefault(string name, array parameters, var defaultValue = null) -> var + { + if isset(parameters[name]) { + return parameters[name]; + } else { + return defaultValue; + } + } + private function inputField(string type, parameters, bool asValue = false) -> string { } diff --git a/tests/unit/Html/Tag/ElementCloseCest.php b/tests/unit/Html/Tag/ElementCloseCest.php index 3c2881c94d0..0c6cae1e83c 100644 --- a/tests/unit/Html/Tag/ElementCloseCest.php +++ b/tests/unit/Html/Tag/ElementCloseCest.php @@ -12,6 +12,7 @@ namespace Phalcon\Test\Unit\Html\Tag; +use Phalcon\Html\Tag; use UnitTester; /** @@ -27,11 +28,56 @@ class ElementCloseCest * @param UnitTester $I * * @author Phalcon Team - * @since 2018-11-13 + * @since 2014-09-05 */ public function htmlTagElementClose(UnitTester $I) { $I->wantToTest('Html\Tag - elementClose()'); - $I->skipTest('Need implementation'); + $tag = new Tag(); + $parameters = ['name' => 'canvas']; + $expected = ''; + + $actual = $tag + ->docTypeSet(Tag::XHTML10_STRICT) + ->elementClose($parameters) + ; + $I->assertEquals($expected, $actual); + + $actual = $tag + ->docTypeSet(Tag::HTML5) + ->elementClose($parameters) + ; + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: elementClose() - EOL + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2014-09-05 + */ + public function htmlTagElementCloseEol(UnitTester $I) + { + $I->wantToTest('Html\Tag - elementClose()'); + $tag = new Tag(); + $parameters = [ + 'name' => 'canvas', + 'useEol' => true, + ]; + $expected = '' . PHP_EOL; + + $actual = $tag + ->docTypeSet(Tag::XHTML10_STRICT) + ->elementClose($parameters) + ; + $I->assertEquals($expected, $actual); + + $actual = $tag + ->docTypeSet(Tag::HTML5) + ->elementClose($parameters) + ; + $I->assertEquals($expected, $actual); } } From 1bd58e10eddab1bf6d96dabbfc962ada600cfb2f Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 10 Dec 2018 00:40:59 -0500 Subject: [PATCH 06/19] [#12379] - More work on the component and tests --- phalcon/html/tag.zep | 362 +++++++++++++++++- tests/unit/Html/Tag/ConstantsCest.php | 48 +++ tests/unit/Html/Tag/DocTypeGetCest.php | 37 -- tests/unit/Html/Tag/DocTypeGetSetCest.php | 115 ++++++ tests/unit/Html/Tag/DocTypeSetCest.php | 37 -- tests/unit/Html/Tag/FormEndCest.php | 26 +- tests/unit/Html/Tag/TitleGetCest.php | 46 ++- tests/unit/Html/Tag/TitleRenderCest.php | 24 +- ...tCest.php => TitleSeparatorGetSetCest.php} | 19 +- tests/unit/Html/Tag/TitleSeparatorSetCest.php | 37 -- 10 files changed, 622 insertions(+), 129 deletions(-) create mode 100644 tests/unit/Html/Tag/ConstantsCest.php delete mode 100644 tests/unit/Html/Tag/DocTypeGetCest.php create mode 100644 tests/unit/Html/Tag/DocTypeGetSetCest.php delete mode 100644 tests/unit/Html/Tag/DocTypeSetCest.php rename tests/unit/Html/Tag/{TitleSeparatorGetCest.php => TitleSeparatorGetSetCest.php} (53%) delete mode 100644 tests/unit/Html/Tag/TitleSeparatorSetCest.php diff --git a/phalcon/html/tag.zep b/phalcon/html/tag.zep index a4b1fc558a2..800aee78547 100644 --- a/phalcon/html/tag.zep +++ b/phalcon/html/tag.zep @@ -12,6 +12,8 @@ namespace Phalcon\Html; use Phalcon\DiInterface; use Phalcon\Di\InjectionAwareInterface; +use Phalcon\Escaper; +use Phalcon\EscaperInterface; use Phalcon\Html\Exception; /** @@ -27,12 +29,49 @@ class Tag implements InjectionAwareInterface */ protected container; + /** + * @var bool + */ + private autoescape = true; + + /** + * @var array + */ + private append = []; + /** * @var int */ private docType = 5; // HTML5 + /** + * @var + */ + private escaper; + + /** + * @var array + */ + private prepend = []; + + /** + * @var string + */ + private separator = ""; + + /** + * @var string + */ + private title = ""; + + /** + * @var array + */ + private values = []; + /** + * Constants + */ const HTML32 = 1; const HTML401_STRICT = 2; const HTML401_TRANSITIONAL = 3; @@ -65,13 +104,26 @@ class Tag implements InjectionAwareInterface { } + /** + * Resets the request and internal values to avoid those fields will have + * any default value. + */ public function clear() -> void { + let this->autoEscape = true, + this->append = [], + this->docType = self::HTML5, + this->prepend = [], + this->separator = "", + this->title = "", + this->values = []; } /** * Get the document type declaration of content. If the docType has not * been set properly, XHTML5 is returned + * + * @return string */ public function docTypeGet() -> string { @@ -194,16 +246,63 @@ class Tag implements InjectionAwareInterface { } - public function formEnd() -> string + /** + * Returns the closing tag of a form element + * + * @param bool eol + * + * @return string + */ + public function formEnd(bool eol = true) -> string { + if eol { + return "" . PHP_EOL; + } else { + return ""; + } } - public function get(string name, array parameters = []) - { + /** + * Every helper calls this function to check whether a component has a predefined + * value using `setDefault` or value from $_POST + * + * @param string name + * @param array parameters + */ + public function get(string name, array parameters = []) -> var | null + { + var value; + + if !fetch value, parameters["value"] { + /** + * Check if there is a predefined value for it + */ + if !fetch value, this->values[name] { + /** + * Check if there is a post value for the item + */ + if !fetch value, _POST[name] { + return null; + } + } + } + + return value; } + /** + * Check if a helper has a default value set using Phalcon\Tag::setDefault or value from $_POST + * + * @param string name + * + * @return bool + */ public function has(string name) -> bool { + /** + * Check if there is a predefined or a POST value for it + */ + return isset this->values[name] || isset _POST[name]; } public function image(array parameters = []) -> string @@ -310,16 +409,78 @@ class Tag implements InjectionAwareInterface { } - public function setAutoescape(bool autoescape) -> void + /** + * Set autoescape mode in generated html + * + * @param bool autoescape + * + * @return + */ + public function setAutoescape(bool autoescape) -> { + let this->autoescape = autoescape; + + return this; } - public function setDefault(string! id, value) -> void + /** + * Assigns default values to generated tags by helpers + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * // Assigning "peter" to "name" component + * $tag->setDefault("name", "peter"); + * + * // Later in the view + * echo $tag->inputText("name"); // Will have the value "peter" by default + * + * + * @param string value + */ + public function setDefault(string! name, value) -> { + if value !== null { + if typeof value == "array" || typeof value == "object" { + throw new Exception("Only scalar values can be assigned to UI components"); + } + } + + let this->values[name] = value; + + return this; } - public function setDefaults(array! values, bool merge = false) -> void + /** + * Assigns default values to generated tags by helpers + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * // Assigning "peter" to "name" component + * $tag->setDefault( + * [ + * "name" => "peter", + * ] + * ); + * + * // Later in the view + * echo $tag->inputText("name"); // Will have the value "peter" by default + * + */ + public function setDefaults(array! values, bool merge = false) -> { + if merge { + let this->values = array_merge(this->values, values); + } else { + let this->values = values; + } + + return this; } public function stylesheet(array parameters = []) -> string @@ -330,36 +491,177 @@ class Tag implements InjectionAwareInterface { } - public function titleAppend(string title) -> void + /** + * Appends a text to current document title + */ + public function titleAppend(array title) -> { + let this->append = title; + + return this; } public function titleFriendly(string text, string separator = "-", bool lowercase = true, var replace = null) -> string { } + /** + * Gets the current document title. + * The title will be automatically escaped. + * + * + * Tag::prependTitle('Hello'); + * Tag::setTitle('World'); + * Tag::appendTitle('from Phalcon'); + * + * echo Tag::getTitle(); // Hello World from Phalcon + * echo Tag::getTitle(false); // World from Phalcon + * echo Tag::getTitle(true, false); // Hello World + * echo Tag::getTitle(false, false); // World + * + * + * + * {{ get_title() }} + * + */ public function titleGet(bool prepend = true, bool append = true) -> string { + var item, + items, + output, + title, + appendTitle, + prependTitle, + separator, + escaper; + + let escaper = this->getEscaper(["escape": true]), + items = [], + output = "", + title = escaper->escapeHtml(this->title), + separator = escaper->escapeHtml(this->separator); + + if prepend { + let prependTitle = this->prepend; + + if !empty prependTitle { + var prependArray = array_reverse(prependTitle); + for item in prependArray { + let items[] = escaper->escapeHtml(item); + } + } + } + + if !empty title { + let items[] = title; + } + + if append { + let appendTitle = this->append; + + if !empty appendTitle { + for item in appendTitle { + let items[] = escaper->escapeHtml(item); + } + } + } + + if !empty items { + let output = implode(separator, items); + } + + return output; } - public function titlePrepend(string title) -> void + /** + * Prepends a text to current document title + */ + public function titlePrepend(array title) -> { + let this->prepend = title; + + return this; } + /** + * Renders the title with title tags. The title is automaticall escaped + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * $tag + * ->titlePrepend('Hello') + * ->titleSet('World') + * ->titleAppend('from Phalcon'); + * + * echo $tag->titleRender(); // Hello World From Phalcon + * + * + * + * {{ render_title() }} + * + */ public function titleRender() -> string { + return "" . this->titleGet() . "" . PHP_EOL; } + /** + * Gets the current document title separator + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * echo $tag->titleSeparatorGet(); + * + * + * + * {{ title_separator_get() }} + * + */ public function titleSeparatorGet() -> string { + return this->separator; } - public function titleSeparatorSet(string separator) -> void + /** + * Set the title separator of view content + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * echo $tag->titleSeparatorSet('-'); + * + */ + public function titleSeparatorSet(string separator) -> { + let this->separator = separator; + + return this; } - public function titleSet(string title) -> void + /** + * Set the title separator of view content + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * $tag->titleSet('Phalcon Framework'); + * + */ + public function titleSet(string title) -> { + let this->title = title; + + return this; } /** @@ -379,6 +681,46 @@ class Tag implements InjectionAwareInterface } } + /** + * Obtains the 'escaper' service if required + */ + private function getEscaper(array! parameters) -> | null + { + var autoescape; + + if !fetch autoescape, parameters["escape"] { + let autoescape = this->autoescape; + } + + if !autoescape { + return null; + } + + return this->getEscaperService(); + } + + /** + * Returns the escaper service from the DI container + */ + private function getEscaperService() -> + { + var escaper, container; + + let escaper = this->escaper; + if typeof escaper != "object" { + let container = this->getDI(); + + if typeof container != "object" { + throw new Exception("A dependency injector container is required to obtain the 'escaper' service"); + } + + let escaper = container->getShared("escaper"), + this->escaper = escaper; + } + + return escaper; + } + private function inputField(string type, parameters, bool asValue = false) -> string { } diff --git a/tests/unit/Html/Tag/ConstantsCest.php b/tests/unit/Html/Tag/ConstantsCest.php new file mode 100644 index 00000000000..698e30f0dad --- /dev/null +++ b/tests/unit/Html/Tag/ConstantsCest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use Phalcon\Html\Tag; +use UnitTester; + +/** + * Class ConstantsCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ConstantsCest +{ + /** + * Tests Phalcon\Html\Tag :: constants + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2014-09-05 + */ + public function htmlTagConstants(UnitTester $I) + { + $I->wantToTest('Html\Tag - constants()'); + $I->assertEquals(1, Tag::HTML32); + $I->assertEquals(2, Tag::HTML401_STRICT); + $I->assertEquals(3, Tag::HTML401_TRANSITIONAL); + $I->assertEquals(4, Tag::HTML401_FRAMESET); + $I->assertEquals(5, Tag::HTML5); + $I->assertEquals(6, Tag::XHTML10_STRICT); + $I->assertEquals(7, Tag::XHTML10_TRANSITIONAL); + $I->assertEquals(8, Tag::XHTML10_FRAMESET); + $I->assertEquals(9, Tag::XHTML11); + $I->assertEquals(10, Tag::XHTML20); + $I->assertEquals(11, Tag::XHTML5); + } +} diff --git a/tests/unit/Html/Tag/DocTypeGetCest.php b/tests/unit/Html/Tag/DocTypeGetCest.php deleted file mode 100644 index d1e3c0a5b37..00000000000 --- a/tests/unit/Html/Tag/DocTypeGetCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class DocTypeGetCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class DocTypeGetCest -{ - /** - * Tests Phalcon\Html\Tag :: docTypeGet() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagDocTypeGet(UnitTester $I) - { - $I->wantToTest('Html\Tag - docTypeGet()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/DocTypeGetSetCest.php b/tests/unit/Html/Tag/DocTypeGetSetCest.php new file mode 100644 index 00000000000..96181f66bd8 --- /dev/null +++ b/tests/unit/Html/Tag/DocTypeGetSetCest.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use Codeception\Example; +use Phalcon\Html\Tag; +use UnitTester; + +/** + * Class DocTypeGetSetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class DocTypeGetSetCest +{ + /** + * Tests Phalcon\Html\Tag :: docTypeGet() + * + * @param UnitTester $I + * @param Example $examples + * + * @dataProvider getDocTypes + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagDocTypeGetSet(UnitTester $I, Example $examples) + { + $I->skipTest('Need implementation'); + $doctype = $examples['value']; + $I->wantToTest(sprintf('Html\Tag - docTypeGet() - %s', $doctype)); + + $tag = new Tag(); + + $tag->docTypeSet($doctype); + $expected = $examples['string']; + $actual = $tag->docTypeGet(); + $I->assertEquals($expected, $actual); + } + + /** + * @return array + */ + private function getDocTypes(): array + { + return [ + [ + 'value' => 1, + 'string' => "" . PHP_EOL, + ], +// [ +// 'value' => Tag::HTML_32, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::HTML401_STRICT, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::HTML401_TRANSITIONAL, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::HTML401_FRAMESET, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::HTML5, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::XHTML10_STRICT, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::XHTML10_TRANSITIONAL, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::XHTML10_FRAMESET, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::XHTML11, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::XHTML20, +// 'string' => "" . PHP_EOL, +// ], +// [ +// 'value' => Tag::XHTML5, +// 'string' => "" . PHP_EOL, +// ], + ]; + } +} diff --git a/tests/unit/Html/Tag/DocTypeSetCest.php b/tests/unit/Html/Tag/DocTypeSetCest.php deleted file mode 100644 index 0777f3febee..00000000000 --- a/tests/unit/Html/Tag/DocTypeSetCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class DocTypeSetCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class DocTypeSetCest -{ - /** - * Tests Phalcon\Html\Tag :: docTypeSet() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagDocTypeSet(UnitTester $I) - { - $I->wantToTest('Html\Tag - docTypeSet()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/unit/Html/Tag/FormEndCest.php b/tests/unit/Html/Tag/FormEndCest.php index 79a0b84291c..c8ebc541551 100644 --- a/tests/unit/Html/Tag/FormEndCest.php +++ b/tests/unit/Html/Tag/FormEndCest.php @@ -12,7 +12,9 @@ namespace Phalcon\Test\Unit\Html\Tag; +use Phalcon\Html\Tag; use UnitTester; +use const PHP_EOL; /** * Class FormEndCest @@ -32,6 +34,28 @@ class FormEndCest public function htmlTagFormEnd(UnitTester $I) { $I->wantToTest('Html\Tag - formEnd()'); - $I->skipTest('Need implementation'); + $tag = new Tag(); + + $expected = '' . PHP_EOL; + $actual = $tag->formEnd(); + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: formEnd() - no EOL + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagFormEndEol(UnitTester $I) + { + $I->wantToTest('Html\Tag - formEnd() - no EOL'); + $tag = new Tag(); + + $expected = ''; + $actual = $tag->formEnd(false); + $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/TitleGetCest.php b/tests/unit/Html/Tag/TitleGetCest.php index 1c870287e13..0b19fc0ed98 100644 --- a/tests/unit/Html/Tag/TitleGetCest.php +++ b/tests/unit/Html/Tag/TitleGetCest.php @@ -12,6 +12,8 @@ namespace Phalcon\Test\Unit\Html\Tag; +use Phalcon\Html\Tag; +use Phalcon\Test\Fixtures\Traits\DiTrait; use UnitTester; /** @@ -21,6 +23,17 @@ */ class TitleGetCest { + use DiTrait; + + /** + * @param UnitTester $I + */ + public function _before(UnitTester $I) + { + $this->newDi(); + $this->setDiEscaper(); + } + /** * Tests Phalcon\Html\Tag :: titleGet() * @@ -32,6 +45,37 @@ class TitleGetCest public function htmlTagTitleGet(UnitTester $I) { $I->wantToTest('Html\Tag - titleGet()'); - $I->skipTest('Need implementation'); + $tag = new Tag(); + $container = $this->getDi(); + $tag->setDI($container); + $value = "Hello Title"; + + $tag->titleSet($value); + $expected = 'Hello Title'; + $actual = $tag->titleGet(); + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: titleGet() - escape + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagTitleGetEscape(UnitTester $I) + { + $I->wantToTest('Html\Tag - titleGet() - escape'); + $tag = new Tag(); + $container = $this->getDi(); + $tag->setDI($container); + $value = "Hello "; + + $tag->titleSet($value); + $expected = 'Hello </title><script>alert('' + . 'Got your nose!');</script><title>'; + $actual = $tag->titleGet(); + $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/TitleRenderCest.php b/tests/unit/Html/Tag/TitleRenderCest.php index 271a3234f7e..ef9e82c009b 100644 --- a/tests/unit/Html/Tag/TitleRenderCest.php +++ b/tests/unit/Html/Tag/TitleRenderCest.php @@ -12,6 +12,8 @@ namespace Phalcon\Test\Unit\Html\Tag; +use Phalcon\Html\Tag; +use Phalcon\Test\Fixtures\Traits\DiTrait; use UnitTester; /** @@ -21,6 +23,17 @@ */ class TitleRenderCest { + use DiTrait; + + /** + * @param UnitTester $I + */ + public function _before(UnitTester $I) + { + $this->newDi(); + $this->setDiEscaper(); + } + /** * Tests Phalcon\Html\Tag :: titleRender() * @@ -32,6 +45,15 @@ class TitleRenderCest public function htmlTagTitleRender(UnitTester $I) { $I->wantToTest('Html\Tag - titleRender()'); - $I->skipTest('Need implementation'); + $tag = new Tag(); + $container = $this->getDi(); + $tag->setDI($container); + $value = "Hello "; + + $tag->titleSet($value); + $expected = '<title>Hello </title><script>alert('' + . 'Got your nose!');</script><title>' . PHP_EOL; + $actual = $tag->titleRender(); + $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/TitleSeparatorGetCest.php b/tests/unit/Html/Tag/TitleSeparatorGetSetCest.php similarity index 53% rename from tests/unit/Html/Tag/TitleSeparatorGetCest.php rename to tests/unit/Html/Tag/TitleSeparatorGetSetCest.php index 104539ae358..5cfe8a58d15 100644 --- a/tests/unit/Html/Tag/TitleSeparatorGetCest.php +++ b/tests/unit/Html/Tag/TitleSeparatorGetSetCest.php @@ -12,17 +12,18 @@ namespace Phalcon\Test\Unit\Html\Tag; +use Phalcon\Html\Tag; use UnitTester; /** - * Class TitleSeparatorGetCest + * Class TitleSeparatorGetSetCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleSeparatorGetCest +class TitleSeparatorGetSetCest { /** - * Tests Phalcon\Html\Tag :: titleSeparatorGet() + * Tests Phalcon\Html\Tag :: titleSeparatorGet()/titleSeparatorSet() * * @param UnitTester $I * @@ -31,7 +32,15 @@ class TitleSeparatorGetCest */ public function htmlTagTitleSeparatorGet(UnitTester $I) { - $I->wantToTest('Html\Tag - titleSeparatorGet()'); - $I->skipTest('Need implementation'); + $I->wantToTest('Html\Tag - titleSeparatorGet/Set()'); + $tag = new Tag(); + + $actual = $tag->titleSeparatorGet(); + $I->assertEmpty($actual); + + $separator = '--::--'; + $tag->titleSeparatorSet($separator); + $actual = $tag->titleSeparatorGet(); + $I->assertEquals($separator, $actual); } } diff --git a/tests/unit/Html/Tag/TitleSeparatorSetCest.php b/tests/unit/Html/Tag/TitleSeparatorSetCest.php deleted file mode 100644 index 257ad695a2a..00000000000 --- a/tests/unit/Html/Tag/TitleSeparatorSetCest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Unit\Html\Tag; - -use UnitTester; - -/** - * Class TitleSeparatorSetCest - * - * @package Phalcon\Test\Unit\Html\Tag - */ -class TitleSeparatorSetCest -{ - /** - * Tests Phalcon\Html\Tag :: titleSeparatorSet() - * - * @param UnitTester $I - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function htmlTagTitleSeparatorSet(UnitTester $I) - { - $I->wantToTest('Html\Tag - titleSeparatorSet()'); - $I->skipTest('Need implementation'); - } -} From 45555239974fb5a333b169749391ed56c03a6625 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 10 Dec 2018 11:34:29 -0500 Subject: [PATCH 07/19] [#12379] - Reworking the tag; Slowly adding more functionality; Corrected tests --- phalcon/html/tag.zep | 523 +++++++++++------- ...itleAppendCest.php => AppendTitleCest.php} | 10 +- tests/unit/Html/Tag/ElementCloseCest.php | 8 +- .../Tag/{FormEndCest.php => EndFormCest.php} | 24 +- ...FriendlyCest.php => FriendlyTitleCest.php} | 10 +- ...cTypeGetSetCest.php => GetDocTypeCest.php} | 19 +- .../{TitleGetCest.php => GetTitleCest.php} | 32 +- ...tSetCest.php => GetTitleSeparatorCest.php} | 16 +- .../{TitleSetCest.php => GetValueCest.php} | 10 +- .../Tag/{GetCest.php => HasValueCest.php} | 10 +- ...lePrependCest.php => PrependTitleCest.php} | 10 +- ...itleRenderCest.php => RenderTitleCest.php} | 17 +- tests/unit/Html/Tag/SetDocTypeCest.php | 37 ++ .../Tag/{HasCest.php => SetTitleCest.php} | 10 +- ...utesCest.php => SetTitleSeparatorCest.php} | 10 +- 15 files changed, 440 insertions(+), 306 deletions(-) rename tests/unit/Html/Tag/{TitleAppendCest.php => AppendTitleCest.php} (73%) rename tests/unit/Html/Tag/{FormEndCest.php => EndFormCest.php} (68%) rename tests/unit/Html/Tag/{TitleFriendlyCest.php => FriendlyTitleCest.php} (73%) rename tests/unit/Html/Tag/{DocTypeGetSetCest.php => GetDocTypeCest.php} (90%) rename tests/unit/Html/Tag/{TitleGetCest.php => GetTitleCest.php} (67%) rename tests/unit/Html/Tag/{TitleSeparatorGetSetCest.php => GetTitleSeparatorCest.php} (63%) rename tests/unit/Html/Tag/{TitleSetCest.php => GetValueCest.php} (75%) rename tests/unit/Html/Tag/{GetCest.php => HasValueCest.php} (75%) rename tests/unit/Html/Tag/{TitlePrependCest.php => PrependTitleCest.php} (73%) rename tests/unit/Html/Tag/{TitleRenderCest.php => RenderTitleCest.php} (75%) create mode 100644 tests/unit/Html/Tag/SetDocTypeCest.php rename tests/unit/Html/Tag/{HasCest.php => SetTitleCest.php} (75%) rename tests/unit/Html/Tag/{RenderAttributesCest.php => SetTitleSeparatorCest.php} (71%) diff --git a/phalcon/html/tag.zep b/phalcon/html/tag.zep index 800aee78547..ccfb6652f21 100644 --- a/phalcon/html/tag.zep +++ b/phalcon/html/tag.zep @@ -100,6 +100,16 @@ class Tag implements InjectionAwareInterface return this->container; } + /** + * Appends a text to current document title + */ + public function appendTitle(array title) -> + { + let this->append = title; + + return this; + } + public function buttonSubmit(array parameters = []) -> string { } @@ -119,13 +129,84 @@ class Tag implements InjectionAwareInterface this->values = []; } + public function element(array parameters = []) -> string + { + } + /** - * Get the document type declaration of content. If the docType has not - * been set properly, XHTML5 is returned + * Builds the closing tag of an html element + * + * @param array parameters ["name", "useEol"] * * @return string + * + * + * use Phalcon\Html\Tag; + * + * $tab = new Tag(); + * + * echo $tag->elementClose( + * [ + * 'name' => 'aside', + * ] + * ); // + * + * echo $tag->elementClose( + * [ + * 'name' => 'aside', + * 'useEol' => true, + * ] + * ); // "" . PHP_EOL + * + */ + public function elementClose(array parameters = []) -> string + { + var name, useEol = false; + + if !fetch name, parameters["name"] { + throw new Exception("The 'name' parameter must be specified"); + } + + let useEol = this->arrayGetDefault("useEol", parameters, false); + + if useEol { + return "" . PHP_EOL; + } + return ""; + + } + + /** + * Returns the closing tag of a form element + */ + public function endForm(bool eol = true) -> string + { + if eol { + return "" . PHP_EOL; + } else { + return ""; + } + } + + public function form(array parameters = []) -> string + { + } + + /** + * 'text' + * 'separator' + * 'lowercase' + * 'replace' + */ + public function friendlyTitle(array parameters = []) -> string + { + } + + /** + * Get the document type declaration of content. If the docType has not + * been set properly, XHTML5 is returned */ - public function docTypeGet() -> string + public function getDocType() -> string { switch this->docType { @@ -178,88 +259,89 @@ class Tag implements InjectionAwareInterface } /** - * Set the document type of content - * - * @param int doctype A valid doctype for the content - * - * @return - */ - public function docTypeSet(int doctype) -> - { - if (doctype < self::HTML32 || doctype > self::XHTML5) { - let this->docType = self::HTML5; - } else { - let this->docType = doctype; - } - - return this; - } - - public function element(array parameters = []) -> string - { - } - - /** - * Builds the closing tag of an html element - * - * @param array parameters ["name", "useEol"] - * - * @return string + * Gets the current document title. + * The title will be automatically escaped. * - * + * * use Phalcon\Html\Tag; * - * $tab = new Tag(); + * $tag = new Tag(); * - * echo $tag->elementClose( - * [ - * 'name' => 'aside', - * ] - * ); // + * $tag + * ->prependTitle('Hello') + * ->setTitle('World') + * ->appendTitle('from Phalcon'); + * + * echo $tag->getTitle(); // Hello World from Phalcon + * echo $tag->getTitle(false); // World from Phalcon + * echo $tag->getTitle(true, false); // Hello World + * echo $tag->getTitle(false, false); // World + * * - * echo $tag->elementClose( - * [ - * 'name' => 'aside', - * 'useEol' => true, - * ] - * ); // "" . PHP_EOL - * + * + * {{ get_title() }} + * */ - public function elementClose(array parameters = []) -> string + public function getTitle(bool prepend = true, bool append = true) -> string { - var name, useEol = false; + var item, items, output, title, appendTitle, prependTitle, separator, escaper; - if !fetch name, parameters["name"] { - throw new Exception("The 'name' parameter must be specified"); + let escaper = this->getEscaper(["escape": true]), + items = [], + output = "", + title = escaper->escapeHtml(this->title), + separator = escaper->escapeHtml(this->separator); + + if prepend { + let prependTitle = this->prepend; + + if !empty prependTitle { + var prependArray = array_reverse(prependTitle); + for item in prependArray { + let items[] = escaper->escapeHtml(item); + } + } } - let useEol = this->arrayGetDefault("useEol", parameters, false); + if !empty title { + let items[] = title; + } - if useEol { - return "" . PHP_EOL; + if append { + let appendTitle = this->append; + + if !empty appendTitle { + for item in appendTitle { + let items[] = escaper->escapeHtml(item); + } + } } - return ""; - } + if !empty items { + let output = implode(separator, items); + } - public function form(array parameters = []) -> string - { + return output; } /** - * Returns the closing tag of a form element + * Gets the current document title separator * - * @param bool eol + * + * use Phalcon\Html\Tag; * - * @return string + * $tag = new Tag(); + * + * echo $tag->getTitleSeparator(); + * + * + * + * {{ get_title_separator() }} + * */ - public function formEnd(bool eol = true) -> string + public function getTitleSeparator() -> string { - if eol { - return "" . PHP_EOL; - } else { - return ""; - } + return this->separator; } /** @@ -269,7 +351,7 @@ class Tag implements InjectionAwareInterface * @param string name * @param array parameters */ - public function get(string name, array parameters = []) -> var | null + public function getValue(string name, array parameters = []) -> var | null { var value; @@ -297,7 +379,7 @@ class Tag implements InjectionAwareInterface * * @return bool */ - public function has(string name) -> bool + public function hasValue(string name) -> bool { /** * Check if there is a predefined or a POST value for it @@ -315,6 +397,7 @@ class Tag implements InjectionAwareInterface public function inputColor(array parameters = []) -> string { + return this->renderInput("color", parameters); } public function inputDate(array parameters = []) -> string @@ -397,8 +480,39 @@ class Tag implements InjectionAwareInterface { } - public function renderAttributes(string! code, array! attributes) -> string + /** + * Prepends a text to current document title + */ + public function prependTitle(array title) -> { + let this->prepend = title; + + return this; + } + + /** + * Renders the title with title tags. The title is automaticall escaped + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * $tag + * ->prependTitle('Hello') + * ->setTitle('World') + * ->appendTitle('from Phalcon'); + * + * echo $tag->renderTitle(); // Hello World From Phalcon + * + * + * + * {{ render_title() }} + * + */ + public function renderTitle() -> string + { + return "" . this->getTitle() . "" . PHP_EOL; } public function select(array parameters = [], data = null) -> string @@ -483,149 +597,40 @@ class Tag implements InjectionAwareInterface return this; } - public function stylesheet(array parameters = []) -> string - { - } - - public function textArea(array parameters = []) -> string - { - } - - /** - * Appends a text to current document title - */ - public function titleAppend(array title) -> - { - let this->append = title; - - return this; - } - - public function titleFriendly(string text, string separator = "-", bool lowercase = true, var replace = null) -> string - { - } - /** - * Gets the current document title. - * The title will be automatically escaped. + * Set the document type of content * - * - * Tag::prependTitle('Hello'); - * Tag::setTitle('World'); - * Tag::appendTitle('from Phalcon'); - * - * echo Tag::getTitle(); // Hello World from Phalcon - * echo Tag::getTitle(false); // World from Phalcon - * echo Tag::getTitle(true, false); // Hello World - * echo Tag::getTitle(false, false); // World - * + * @param int doctype A valid doctype for the content * - * - * {{ get_title() }} - * + * @return */ - public function titleGet(bool prepend = true, bool append = true) -> string + public function setDocType(int doctype) -> { - var item, - items, - output, - title, - appendTitle, - prependTitle, - separator, - escaper; - - let escaper = this->getEscaper(["escape": true]), - items = [], - output = "", - title = escaper->escapeHtml(this->title), - separator = escaper->escapeHtml(this->separator); - - if prepend { - let prependTitle = this->prepend; - - if !empty prependTitle { - var prependArray = array_reverse(prependTitle); - for item in prependArray { - let items[] = escaper->escapeHtml(item); - } - } - } - - if !empty title { - let items[] = title; - } - - if append { - let appendTitle = this->append; - - if !empty appendTitle { - for item in appendTitle { - let items[] = escaper->escapeHtml(item); - } - } - } - - if !empty items { - let output = implode(separator, items); + if (doctype < self::HTML32 || doctype > self::XHTML5) { + let this->docType = self::HTML5; + } else { + let this->docType = doctype; } - return output; - } - - /** - * Prepends a text to current document title - */ - public function titlePrepend(array title) -> - { - let this->prepend = title; - return this; } /** - * Renders the title with title tags. The title is automaticall escaped + * Set the title separator of view content * * * use Phalcon\Html\Tag; * * $tag = new Tag(); * - * $tag - * ->titlePrepend('Hello') - * ->titleSet('World') - * ->titleAppend('from Phalcon'); - * - * echo $tag->titleRender(); // Hello World From Phalcon - * - * - * - * {{ render_title() }} + * $tag->setTitle('Phalcon Framework'); * */ - public function titleRender() -> string + public function setTitle(string title) -> { - return "" . this->titleGet() . "" . PHP_EOL; - } + let this->title = title; - /** - * Gets the current document title separator - * - * - * use Phalcon\Html\Tag; - * - * $tag = new Tag(); - * - * echo $tag->titleSeparatorGet(); - * - * - * - * {{ title_separator_get() }} - * - */ - public function titleSeparatorGet() -> string - { - return this->separator; + return this; } /** @@ -636,32 +641,22 @@ class Tag implements InjectionAwareInterface * * $tag = new Tag(); * - * echo $tag->titleSeparatorSet('-'); + * echo $tag->setTitleSeparator('-'); * */ - public function titleSeparatorSet(string separator) -> + public function setTitleSeparator(string separator) -> { let this->separator = separator; return this; } - /** - * Set the title separator of view content - * - * - * use Phalcon\Html\Tag; - * - * $tag = new Tag(); - * - * $tag->titleSet('Phalcon Framework'); - * - */ - public function titleSet(string title) -> + public function stylesheet(array parameters = []) -> string { - let this->title = title; + } - return this; + public function textArea(array parameters = []) -> string + { } /** @@ -674,11 +669,13 @@ class Tag implements InjectionAwareInterface */ private function arrayGetDefault(string name, array parameters, var defaultValue = null) -> var { - if isset(parameters[name]) { - return parameters[name]; - } else { - return defaultValue; + var value; + + if likely fetch value, parameters[name] { + return value; } + + return defaultValue; } /** @@ -721,12 +718,116 @@ class Tag implements InjectionAwareInterface return escaper; } - private function inputField(string type, parameters, bool asValue = false) -> string + private function inputFieldChecked(string type, array parameters = []) -> string { } - private function inputFieldChecked(string type, array parameters = []) -> string + private function renderAttributes(string! code, array! attributes) -> string + { + var attrs, escaper, escaped, key, newCode, intersect, order, value; + + let order = [ + "rel" : null, + "type" : null, + "for" : null, + "src" : null, + "href" : null, + "action" : null, + "id" : null, + "name" : null, + "value" : null, + "class" : null + ]; + + let intersect = array_intersect_key(order, attributes), + attrs = array_merge(intersect, attributes), + escaper = this->getEscaper(attributes); + + unset attrs["escape"]; + + let newCode = code; + for key, value in attrs { + if typeof key == "string" && value !== null { + if typeof value == "array" || typeof value == "resource" { + throw new Exception( + "Value at index: '" . key . "' type: '" . gettype(value) . "' cannot be rendered" + ); + } + if escaper { + let escaped = escaper->escapeHtmlAttr(value); + } else { + let escaped = value; + } + let newCode .= " " . key . "=\"" . escaped . "\""; + } + } + + return newCode; + } + + /** + * Returns the closing tag depending on the doctype + */ + private function renderCloseTag() -> string + { + /** + * Check if Doctype is XHTML + */ + if this->docType > self::HTML5 { + return " />"; + } else { + return ">"; + } + } + + /** + * Builds `input` elements + */ + private function renderInput(string type, array parameters = [], bool asValue = false) -> string { + var name, id, output, value; + + if asValue == false { + + if !fetch id, parameters[0] { + let parameters[0] = parameters["id"]; + } + + if fetch name, parameters["name"] { + if empty name { + let parameters["name"] = id; + } + } else { + let parameters["name"] = id; + } + + /** + * Automatically assign the id if the name is not an array + */ + if typeof id == "string" { + if !memstr(id, "[") && !isset parameters["id"] { + let parameters["id"] = id; + } + } + + let parameters["value"] = this->getValue(id, parameters); + + } else { + /** + * Use the "id" as value if the user hadn't set it + */ + if !isset parameters["value"] { + if fetch value, parameters[0] { + let parameters["value"] = value; + } + } + } + + let parameters["type"] = type; + + let output = this->renderAttributes("renderCloseTag(); + + return output; } } diff --git a/tests/unit/Html/Tag/TitleAppendCest.php b/tests/unit/Html/Tag/AppendTitleCest.php similarity index 73% rename from tests/unit/Html/Tag/TitleAppendCest.php rename to tests/unit/Html/Tag/AppendTitleCest.php index 05f0ce54b6e..c05732f1cae 100644 --- a/tests/unit/Html/Tag/TitleAppendCest.php +++ b/tests/unit/Html/Tag/AppendTitleCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class TitleAppendCest + * Class AppendTitleCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleAppendCest +class AppendTitleCest { /** - * Tests Phalcon\Html\Tag :: titleAppend() + * Tests Phalcon\Html\Tag :: appendTitle() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagTitleAppend(UnitTester $I) + public function htmlTagAppendTitle(UnitTester $I) { - $I->wantToTest('Html\Tag - titleAppend()'); + $I->wantToTest('Html\Tag - appendTitle()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/ElementCloseCest.php b/tests/unit/Html/Tag/ElementCloseCest.php index 0c6cae1e83c..25aacf51fe2 100644 --- a/tests/unit/Html/Tag/ElementCloseCest.php +++ b/tests/unit/Html/Tag/ElementCloseCest.php @@ -38,13 +38,13 @@ public function htmlTagElementClose(UnitTester $I) $expected = ''; $actual = $tag - ->docTypeSet(Tag::XHTML10_STRICT) + ->setDocType(Tag::XHTML10_STRICT) ->elementClose($parameters) ; $I->assertEquals($expected, $actual); $actual = $tag - ->docTypeSet(Tag::HTML5) + ->setDocType(Tag::HTML5) ->elementClose($parameters) ; $I->assertEquals($expected, $actual); @@ -69,13 +69,13 @@ public function htmlTagElementCloseEol(UnitTester $I) $expected = '' . PHP_EOL; $actual = $tag - ->docTypeSet(Tag::XHTML10_STRICT) + ->setDocType(Tag::XHTML10_STRICT) ->elementClose($parameters) ; $I->assertEquals($expected, $actual); $actual = $tag - ->docTypeSet(Tag::HTML5) + ->setDocType(Tag::HTML5) ->elementClose($parameters) ; $I->assertEquals($expected, $actual); diff --git a/tests/unit/Html/Tag/FormEndCest.php b/tests/unit/Html/Tag/EndFormCest.php similarity index 68% rename from tests/unit/Html/Tag/FormEndCest.php rename to tests/unit/Html/Tag/EndFormCest.php index c8ebc541551..4b990010725 100644 --- a/tests/unit/Html/Tag/FormEndCest.php +++ b/tests/unit/Html/Tag/EndFormCest.php @@ -17,45 +17,45 @@ use const PHP_EOL; /** - * Class FormEndCest + * Class EndFormCest * * @package Phalcon\Test\Unit\Html\Tag */ -class FormEndCest +class EndFormCest { /** - * Tests Phalcon\Html\Tag :: formEnd() + * Tests Phalcon\Html\Tag :: endForm() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagFormEnd(UnitTester $I) + public function htmlTagEndForm(UnitTester $I) { - $I->wantToTest('Html\Tag - formEnd()'); + $I->wantToTest('Html\Tag - endForm()'); $tag = new Tag(); - $expected = '' . PHP_EOL; - $actual = $tag->formEnd(); + $expected = ''; + $actual = $tag->endForm(false); $I->assertEquals($expected, $actual); } /** - * Tests Phalcon\Html\Tag :: formEnd() - no EOL + * Tests Phalcon\Html\Tag :: endForm() - EOL * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagFormEndEol(UnitTester $I) + public function htmlTagEndFormEol(UnitTester $I) { - $I->wantToTest('Html\Tag - formEnd() - no EOL'); + $I->wantToTest('Html\Tag - endForm() - EOL'); $tag = new Tag(); - $expected = ''; - $actual = $tag->formEnd(false); + $expected = '' . PHP_EOL; + $actual = $tag->endForm(); $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/TitleFriendlyCest.php b/tests/unit/Html/Tag/FriendlyTitleCest.php similarity index 73% rename from tests/unit/Html/Tag/TitleFriendlyCest.php rename to tests/unit/Html/Tag/FriendlyTitleCest.php index 7302db6c3a1..4ad304e99b2 100644 --- a/tests/unit/Html/Tag/TitleFriendlyCest.php +++ b/tests/unit/Html/Tag/FriendlyTitleCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class TitleFriendlyCest + * Class FriendlyTitleCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleFriendlyCest +class FriendlyTitleCest { /** - * Tests Phalcon\Html\Tag :: titleFriendly() + * Tests Phalcon\Html\Tag :: friendlyTitle() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagTitleFriendly(UnitTester $I) + public function htmlTagFriendlyTitle(UnitTester $I) { - $I->wantToTest('Html\Tag - titleFriendly()'); + $I->wantToTest('Html\Tag - friendlyTitle()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/DocTypeGetSetCest.php b/tests/unit/Html/Tag/GetDocTypeCest.php similarity index 90% rename from tests/unit/Html/Tag/DocTypeGetSetCest.php rename to tests/unit/Html/Tag/GetDocTypeCest.php index 96181f66bd8..85edabe44ec 100644 --- a/tests/unit/Html/Tag/DocTypeGetSetCest.php +++ b/tests/unit/Html/Tag/GetDocTypeCest.php @@ -17,34 +17,33 @@ use UnitTester; /** - * Class DocTypeGetSetCest + * Class GetDocTypeCest * * @package Phalcon\Test\Unit\Html\Tag */ -class DocTypeGetSetCest +class GetDocTypeCest { /** - * Tests Phalcon\Html\Tag :: docTypeGet() + * Tests Phalcon\Html\Tag :: getDocType() * * @param UnitTester $I - * @param Example $examples * * @dataProvider getDocTypes * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagDocTypeGetSet(UnitTester $I, Example $examples) + public function htmlTagGetDocType(UnitTester $I, Example $example) { - $I->skipTest('Need implementation'); - $doctype = $examples['value']; + $I->wantToTest('Html\Tag - getDocType()'); + $doctype = $example['value']; $I->wantToTest(sprintf('Html\Tag - docTypeGet() - %s', $doctype)); $tag = new Tag(); - $tag->docTypeSet($doctype); - $expected = $examples['string']; - $actual = $tag->docTypeGet(); + $tag->setDocType($doctype); + $expected = $example['string']; + $actual = $tag->getDocType(); $I->assertEquals($expected, $actual); } diff --git a/tests/unit/Html/Tag/TitleGetCest.php b/tests/unit/Html/Tag/GetTitleCest.php similarity index 67% rename from tests/unit/Html/Tag/TitleGetCest.php rename to tests/unit/Html/Tag/GetTitleCest.php index 0b19fc0ed98..914e9db470f 100644 --- a/tests/unit/Html/Tag/TitleGetCest.php +++ b/tests/unit/Html/Tag/GetTitleCest.php @@ -17,11 +17,11 @@ use UnitTester; /** - * Class TitleGetCest + * Class GetTitleCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleGetCest +class GetTitleCest { use DiTrait; @@ -35,47 +35,45 @@ public function _before(UnitTester $I) } /** - * Tests Phalcon\Html\Tag :: titleGet() + * Tests Phalcon\Html\Tag :: getTitle() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagTitleGet(UnitTester $I) + public function htmlTagGetTitle(UnitTester $I) { - $I->wantToTest('Html\Tag - titleGet()'); + $I->wantToTest('Html\Tag - getTitle()'); $tag = new Tag(); - $container = $this->getDi(); - $tag->setDI($container); + $tag->setDI($this->container); $value = "Hello Title"; - $tag->titleSet($value); + $tag->setTitle($value); $expected = 'Hello Title'; - $actual = $tag->titleGet(); + $actual = $tag->getTitle(); $I->assertEquals($expected, $actual); } - + /** - * Tests Phalcon\Html\Tag :: titleGet() - escape + * Tests Phalcon\Html\Tag :: getTitle() - escape * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagTitleGetEscape(UnitTester $I) + public function htmlTagGetTitleEscape(UnitTester $I) { - $I->wantToTest('Html\Tag - titleGet() - escape'); + $I->wantToTest('Html\Tag - getTitle() - escape'); $tag = new Tag(); - $container = $this->getDi(); - $tag->setDI($container); + $tag->setDI($this->container); $value = "Hello "; - $tag->titleSet($value); + $tag->setTitle($value); $expected = 'Hello </title><script>alert('' . 'Got your nose!');</script><title>'; - $actual = $tag->titleGet(); + $actual = $tag->getTitle(); $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/TitleSeparatorGetSetCest.php b/tests/unit/Html/Tag/GetTitleSeparatorCest.php similarity index 63% rename from tests/unit/Html/Tag/TitleSeparatorGetSetCest.php rename to tests/unit/Html/Tag/GetTitleSeparatorCest.php index 5cfe8a58d15..a888f1a1c82 100644 --- a/tests/unit/Html/Tag/TitleSeparatorGetSetCest.php +++ b/tests/unit/Html/Tag/GetTitleSeparatorCest.php @@ -16,31 +16,31 @@ use UnitTester; /** - * Class TitleSeparatorGetSetCest + * Class GetTitleSeparatorCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleSeparatorGetSetCest +class GetTitleSeparatorCest { /** - * Tests Phalcon\Html\Tag :: titleSeparatorGet()/titleSeparatorSet() + * Tests Phalcon\Html\Tag :: getTitleSeparator() * * @param UnitTester $I * * @author Phalcon Team <team@phalconphp.com> * @since 2018-11-13 */ - public function htmlTagTitleSeparatorGet(UnitTester $I) + public function htmlTagGetTitleSeparator(UnitTester $I) { - $I->wantToTest('Html\Tag - titleSeparatorGet/Set()'); + $I->wantToTest('Html\Tag - getTitleSeparator()'); $tag = new Tag(); - $actual = $tag->titleSeparatorGet(); + $actual = $tag->getTitleSeparator(); $I->assertEmpty($actual); $separator = '--::--'; - $tag->titleSeparatorSet($separator); - $actual = $tag->titleSeparatorGet(); + $tag->setTitleSeparator($separator); + $actual = $tag->getTitleSeparator(); $I->assertEquals($separator, $actual); } } diff --git a/tests/unit/Html/Tag/TitleSetCest.php b/tests/unit/Html/Tag/GetValueCest.php similarity index 75% rename from tests/unit/Html/Tag/TitleSetCest.php rename to tests/unit/Html/Tag/GetValueCest.php index 09e0fddcf82..07daa8a125f 100644 --- a/tests/unit/Html/Tag/TitleSetCest.php +++ b/tests/unit/Html/Tag/GetValueCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class TitleSetCest + * Class GetValueCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleSetCest +class GetValueCest { /** - * Tests Phalcon\Html\Tag :: titleSet() + * Tests Phalcon\Html\Tag :: getValue() * * @param UnitTester $I * * @author Phalcon Team <team@phalconphp.com> * @since 2018-11-13 */ - public function htmlTagTitleSet(UnitTester $I) + public function htmlTagGetValue(UnitTester $I) { - $I->wantToTest('Html\Tag - titleSet()'); + $I->wantToTest('Html\Tag - getValue()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/GetCest.php b/tests/unit/Html/Tag/HasValueCest.php similarity index 75% rename from tests/unit/Html/Tag/GetCest.php rename to tests/unit/Html/Tag/HasValueCest.php index 3ae113f607b..0c8d0264fb9 100644 --- a/tests/unit/Html/Tag/GetCest.php +++ b/tests/unit/Html/Tag/HasValueCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class GetCest + * Class HasValueCest * * @package Phalcon\Test\Unit\Html\Tag */ -class GetCest +class HasValueCest { /** - * Tests Phalcon\Html\Tag :: get() + * Tests Phalcon\Html\Tag :: hasValue() * * @param UnitTester $I * * @author Phalcon Team <team@phalconphp.com> * @since 2018-11-13 */ - public function htmlTagGet(UnitTester $I) + public function htmlTagHasValue(UnitTester $I) { - $I->wantToTest('Html\Tag - get()'); + $I->wantToTest('Html\Tag - hasValue()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/TitlePrependCest.php b/tests/unit/Html/Tag/PrependTitleCest.php similarity index 73% rename from tests/unit/Html/Tag/TitlePrependCest.php rename to tests/unit/Html/Tag/PrependTitleCest.php index 4520665bbee..59f4ade3f73 100644 --- a/tests/unit/Html/Tag/TitlePrependCest.php +++ b/tests/unit/Html/Tag/PrependTitleCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class TitlePrependCest + * Class PrependTitleCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitlePrependCest +class PrependTitleCest { /** - * Tests Phalcon\Html\Tag :: titlePrepend() + * Tests Phalcon\Html\Tag :: prependTitle() * * @param UnitTester $I * * @author Phalcon Team <team@phalconphp.com> * @since 2018-11-13 */ - public function htmlTagTitlePrepend(UnitTester $I) + public function htmlTagPrependTitle(UnitTester $I) { - $I->wantToTest('Html\Tag - titlePrepend()'); + $I->wantToTest('Html\Tag - prependTitle()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/TitleRenderCest.php b/tests/unit/Html/Tag/RenderTitleCest.php similarity index 75% rename from tests/unit/Html/Tag/TitleRenderCest.php rename to tests/unit/Html/Tag/RenderTitleCest.php index ef9e82c009b..ffd511532f5 100644 --- a/tests/unit/Html/Tag/TitleRenderCest.php +++ b/tests/unit/Html/Tag/RenderTitleCest.php @@ -17,11 +17,11 @@ use UnitTester; /** - * Class TitleRenderCest + * Class RenderTitleCest * * @package Phalcon\Test\Unit\Html\Tag */ -class TitleRenderCest +class RenderTitleCest { use DiTrait; @@ -35,25 +35,24 @@ public function _before(UnitTester $I) } /** - * Tests Phalcon\Html\Tag :: titleRender() + * Tests Phalcon\Html\Tag :: renderTitle() * * @param UnitTester $I * * @author Phalcon Team <team@phalconphp.com> * @since 2018-11-13 */ - public function htmlTagTitleRender(UnitTester $I) + public function htmlTagRenderTitle(UnitTester $I) { - $I->wantToTest('Html\Tag - titleRender()'); + $I->wantToTest('Html\Tag - renderTitle()'); $tag = new Tag(); - $container = $this->getDi(); - $tag->setDI($container); + $tag->setDI($this->container); $value = "Hello "; - $tag->titleSet($value); + $tag->setTitle($value); $expected = '<title>Hello </title><script>alert('' . 'Got your nose!');</script><title>' . PHP_EOL; - $actual = $tag->titleRender(); + $actual = $tag->renderTitle(); $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/SetDocTypeCest.php b/tests/unit/Html/Tag/SetDocTypeCest.php new file mode 100644 index 00000000000..f4456d2d918 --- /dev/null +++ b/tests/unit/Html/Tag/SetDocTypeCest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use UnitTester; + +/** + * Class SetDocTypeCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class SetDocTypeCest +{ + /** + * Tests Phalcon\Html\Tag :: setDocType() + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagSetDocType(UnitTester $I) + { + $I->wantToTest('Html\Tag - setDocType()'); + $I->skipTest('Need implementation'); + } +} diff --git a/tests/unit/Html/Tag/HasCest.php b/tests/unit/Html/Tag/SetTitleCest.php similarity index 75% rename from tests/unit/Html/Tag/HasCest.php rename to tests/unit/Html/Tag/SetTitleCest.php index 0a75382ff84..5b747cac235 100644 --- a/tests/unit/Html/Tag/HasCest.php +++ b/tests/unit/Html/Tag/SetTitleCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class HasCest + * Class SetTitleCest * * @package Phalcon\Test\Unit\Html\Tag */ -class HasCest +class SetTitleCest { /** - * Tests Phalcon\Html\Tag :: has() + * Tests Phalcon\Html\Tag :: setTitle() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagHas(UnitTester $I) + public function htmlTagSetTitle(UnitTester $I) { - $I->wantToTest('Html\Tag - has()'); + $I->wantToTest('Html\Tag - setTitle()'); $I->skipTest('Need implementation'); } } diff --git a/tests/unit/Html/Tag/RenderAttributesCest.php b/tests/unit/Html/Tag/SetTitleSeparatorCest.php similarity index 71% rename from tests/unit/Html/Tag/RenderAttributesCest.php rename to tests/unit/Html/Tag/SetTitleSeparatorCest.php index 8faa4e1633c..179a7f1cb84 100644 --- a/tests/unit/Html/Tag/RenderAttributesCest.php +++ b/tests/unit/Html/Tag/SetTitleSeparatorCest.php @@ -15,23 +15,23 @@ use UnitTester; /** - * Class RenderAttributesCest + * Class SetTitleSeparatorCest * * @package Phalcon\Test\Unit\Html\Tag */ -class RenderAttributesCest +class SetTitleSeparatorCest { /** - * Tests Phalcon\Html\Tag :: renderAttributes() + * Tests Phalcon\Html\Tag :: setTitleSeparator() * * @param UnitTester $I * * @author Phalcon Team * @since 2018-11-13 */ - public function htmlTagRenderAttributes(UnitTester $I) + public function htmlTagSetTitleSeparator(UnitTester $I) { - $I->wantToTest('Html\Tag - renderAttributes()'); + $I->wantToTest('Html\Tag - setTitleSeparator()'); $I->skipTest('Need implementation'); } } From 00fe02b76ff0429528c72ce64e75f7880a7fd738 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 10 Dec 2018 19:03:58 -0500 Subject: [PATCH 08/19] [#12379] - More Html\Tag tests --- tests/unit/Html/Tag/AppendTitleCest.php | 154 +++++++++++++- tests/unit/Html/Tag/ElementCest.php | 159 ++++++++++++++- tests/unit/Html/Tag/ElementCloseCest.php | 16 +- tests/unit/Html/Tag/FriendlyTitleCest.php | 190 +++++++++++++++++- tests/unit/Html/Tag/GetTitleCest.php | 11 +- tests/unit/Html/Tag/InputColorCest.php | 23 +-- tests/unit/Html/Tag/InputDateCest.php | 23 +-- tests/unit/Html/Tag/InputDateTimeCest.php | 23 +-- .../unit/Html/Tag/InputDateTimeLocalCest.php | 23 +-- tests/unit/Html/Tag/InputEmailCest.php | 23 +-- tests/unit/Html/Tag/InputFileCest.php | 23 +-- tests/unit/Html/Tag/InputHiddenCest.php | 23 +-- tests/unit/Html/Tag/InputImageCest.php | 23 +-- tests/unit/Html/Tag/InputMonthCest.php | 23 +-- tests/unit/Html/Tag/InputNumericCest.php | 23 +-- tests/unit/Html/Tag/InputPasswordCest.php | 23 +-- tests/unit/Html/Tag/InputRadioCest.php | 23 +-- tests/unit/Html/Tag/InputRangeCest.php | 23 +-- tests/unit/Html/Tag/InputSearchCest.php | 23 +-- tests/unit/Html/Tag/InputTelCest.php | 23 +-- tests/unit/Html/Tag/InputTextCest.php | 23 +-- tests/unit/Html/Tag/InputTimeCest.php | 23 +-- tests/unit/Html/Tag/InputUrlCest.php | 23 +-- tests/unit/Html/Tag/InputWeekCest.php | 23 +-- tests/unit/Html/Tag/RenderTitleCest.php | 11 +- tests/unit/Html/Tag/SetTitleCest.php | 20 +- 26 files changed, 700 insertions(+), 298 deletions(-) diff --git a/tests/unit/Html/Tag/AppendTitleCest.php b/tests/unit/Html/Tag/AppendTitleCest.php index c05732f1cae..77418bbd9a9 100644 --- a/tests/unit/Html/Tag/AppendTitleCest.php +++ b/tests/unit/Html/Tag/AppendTitleCest.php @@ -12,6 +12,9 @@ namespace Phalcon\Test\Unit\Html\Tag; +use Phalcon\Html\Tag; +use Phalcon\Test\Fixtures\Traits\DiTrait; +use Phalcon\Test\Fixtures\Traits\TagSetupTrait; use UnitTester; /** @@ -21,6 +24,9 @@ */ class AppendTitleCest { + use DiTrait; + use TagSetupTrait; + /** * Tests Phalcon\Html\Tag :: appendTitle() * @@ -32,6 +38,152 @@ class AppendTitleCest public function htmlTagAppendTitle(UnitTester $I) { $I->wantToTest('Html\Tag - appendTitle()'); - $I->skipTest('Need implementation'); + $tag = new Tag(); + $tag->setDI($this->container); + $tag + ->setTitle('Title') + ->appendTitle(['Class']) + ; + + $expected = "Title"; + $actual = $tag->getTitle(false, false); + $I->assertEquals($expected, $actual); + + $expected = "TitleClass"; + $actual = $tag->getTitle(false, true); + $I->assertEquals($expected, $actual); + + $expected = "TitleClass" . PHP_EOL; + $actual = $tag->renderTitle(); + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: appendTitle() - separator + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagAppendTitleSeparator(UnitTester $I) + { + $I->wantToTest('Html\Tag - appendTitle() - separator'); + $tag = new Tag(); + $tag->setDI($this->container); + $tag + ->setTitle('Title') + ->setTitleSeparator('|') + ->appendTitle(['Class']) + ; + + $expected = "Title"; + $actual = $tag->getTitle(false, false); + $I->assertEquals($expected, $actual); + + $expected = "Title|Class"; + $actual = $tag->getTitle(false, true); + $I->assertEquals($expected, $actual); + + $expected = "Title|Class" . PHP_EOL; + $actual = $tag->renderTitle(); + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: appendTitle() - double call + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagAppendTitleDoubleCall(UnitTester $I) + { + $I->wantToTest('Html\Tag - appendTitle() - double call'); + $tag = new Tag(); + $tag->setDI($this->container); + $tag + ->setTitle('Main') + ->setTitleSeparator(' - ') + ->appendTitle(['Category']) + ->appendTitle(['Title']) + ; + + $expected = "Main"; + $actual = $tag->getTitle(false, false); + $I->assertEquals($expected, $actual); + + $expected = "Main - Title"; + $actual = $tag->getTitle(false, true); + $I->assertEquals($expected, $actual); + + $expected = "Main - Title" . PHP_EOL; + $actual = $tag->renderTitle(); + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: appendTitle() - many + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagAppendTitleMany(UnitTester $I) + { + $I->wantToTest('Html\Tag - appendTitle() - many'); + $tag = new Tag(); + $tag->setDI($this->container); + $tag + ->setTitle('Main') + ->setTitleSeparator(' - ') + ->appendTitle(['Category', 'Title']) + ; + + $expected = "Main"; + $actual = $tag->getTitle(false, false); + $I->assertEquals($expected, $actual); + + $expected = "Main - Category - Title"; + $actual = $tag->getTitle(false, true); + $I->assertEquals($expected, $actual); + + $expected = "Main - Category - Title" . PHP_EOL; + $actual = $tag->renderTitle(); + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: appendTitle() - empty array + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2018-11-13 + */ + public function htmlTagAppendTitleEmptyArray(UnitTester $I) + { + $I->wantToTest('Html\Tag - appendTitle() - empty array'); + $tag = new Tag(); + $tag->setDI($this->container); + $tag + ->setTitle('Main') + ->setTitleSeparator(' - ') + ->appendTitle([]) + ; + + $expected = "Main"; + $actual = $tag->getTitle(false, false); + $I->assertEquals($expected, $actual); + + $expected = "Main"; + $actual = $tag->getTitle(false, true); + $I->assertEquals($expected, $actual); + + $expected = "Main" . PHP_EOL; + $actual = $tag->renderTitle(); + $I->assertEquals($expected, $actual); } } diff --git a/tests/unit/Html/Tag/ElementCest.php b/tests/unit/Html/Tag/ElementCest.php index 94eb64196fb..27e732727d8 100644 --- a/tests/unit/Html/Tag/ElementCest.php +++ b/tests/unit/Html/Tag/ElementCest.php @@ -12,7 +12,13 @@ namespace Phalcon\Test\Unit\Html\Tag; +use BadMethodCallException; +use Phalcon\Html\Exception; +use Phalcon\Html\Tag; +use Phalcon\Test\Fixtures\Traits\DiTrait; +use Phalcon\Test\Fixtures\Traits\TagSetupTrait; use UnitTester; +use const PHP_EOL; /** * Class ElementCest @@ -21,17 +27,166 @@ */ class ElementCest { + use DiTrait; + use TagSetupTrait; + /** * Tests Phalcon\Html\Tag :: element() * * @param UnitTester $I * * @author Phalcon Team - * @since 2018-11-13 + * @since 2014-09-05 */ public function htmlTagElement(UnitTester $I) { $I->wantToTest('Html\Tag - element()'); - $I->skipTest('Need implementation'); + $tag = new Tag(); + $tag->setDI($this->container); + $name = 'canvas'; + $parameters = [ + 'width' => 300, + 'height' => 300, + ]; + $expected = ''; + + $actual = $tag + ->setDocType(Tag::XHTML10_STRICT) + ->element($name, $parameters); + $I->assertEquals($expected, $actual); + + $parameters = [ + 'id' => 'canvas1', + 'name' => 'canvas2', + 'width' => 300, + 'height' => 300, + ]; + $expected = ''; + $actual = $tag + ->setDocType(Tag::HTML5) + ->element($name, $parameters) + ; + $I->assertEquals($expected, $actual); + } + + /** + * Tests Phalcon\Html\Tag :: element() - no name + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2014-09-05 + */ + public function htmlTagElementNoName(UnitTester $I) + { + $I->wantToTest('Html\Tag - element() - no name'); + $I->expectThrowable( + new BadMethodCallException('Wrong number of parameters'), + function () { + $tag = new Tag(); + $tag->element(); + } + ); + } + + /** + * Tests Phalcon\Tag :: element() - self close + * + * @param UnitTester $I + * + * @author Phalcon Team + * @since 2014-09-05 + */ + public function htmlTagElementSelfClose(UnitTester $I) + { + $I->wantToTest("Tag - tagHtml() - self close"); + $tag = new Tag(); + $tag->setDI($this->container); + $name = 'aside'; + $parameters = [ + 'selfClose' => true, + + ]; + + $expected = '' . PHP_EOL * + * */ public function elementClose(string! tag, array parameters = []) -> string { @@ -413,8 +414,7 @@ class Tag implements InjectionAwareInterface } /** - * Gets the current document title. - * The title will be automatically escaped. + * Gets the current document title. The title will be automatically escaped. * * * use Phalcon\Html\Tag; @@ -526,7 +526,8 @@ class Tag implements InjectionAwareInterface } /** - * Check if a helper has a default value set using Phalcon\Tag::setAttribute or value from $_POST + * Check if a helper has a default value set using `setAttribute()` or + * value from $_POST */ public function hasValue(string name) -> bool { @@ -1039,9 +1040,13 @@ class Tag implements InjectionAwareInterface var local, query, output, service, text; let service = this->getService("url"), + url = this->arrayGetDefault("url", parameters, url), + text = this->arrayGetDefault("text", parameters, text), local = this->arrayGetDefault("local", parameters, true), query = this->arrayGetDefault("query", parameters, null); + unset parameters["url"]; + unset parameters["local"]; unset parameters["text"]; unset parameters["query"]; @@ -1087,12 +1092,130 @@ class Tag implements InjectionAwareInterface return "" . this->getTitle() . "" . PHP_EOL; } - public function select(array parameters = [], data = null) -> string + /** + * Builds a select element. It accepts an array or a resultset from + * a Phalcon\Mvc\Model + * + * + * use Phalcon\Html\Tag; + * + * $tag = new Tag(); + * + * echo $tag->select( + * 'status', + * [ + * 'id' => 'status-id', + * 'useEmpty' => true, + * 'emptyValue => '', + * 'emptyText' => 'Choose Status...', + * ], + * [ + * 'A' => 'Active', + * 'I' => 'Inactive', + * ] + * ); + * + * echo $tag->select( + * 'status', + * [ + * 'id' => 'status-id', + * 'useEmpty' => true, + * 'emptyValue => '', + * 'emptyText' => 'Choose Type...', + * 'using' => [ + * 'id, + * 'name', + * ], + * ], + * Robots::find( + * [ + * 'conditions' => 'type = :type:', + * 'bind' => [ + * 'type' => 'mechanical', + * ] + * ] + * ) + * ); + * + * + * + * @param array parameters + * @param array data + */ + public function select(string! name, array parameters = [], data = null) -> string { - } + var emptyText, emptyValue, id, output, outputEmpty, useEmpty, using, value; - public function selectStatic(array parameters, data = null) -> string - { + let id = this->arrayGetDefault("id", parameters, name), + name = this->arrayGetDefault("name", parameters, name), + useEmpty = this->arrayGetDefault("useEmpty", parameters, false), + using = [], + parameters["name"] = name, + parameters["id"] = id, + outputEmpty = ""; + + /** + * First check the data passed. We only accept datasets or arrays + */ + if typeof data !== "array" && data !== "object" { + throw new Exception("The dataset must be either an array or a ResultsetInterface"); + } + + /** + * For the ResultsetInterface we need the 'using' parameter + */ + if typeof data === "object" { + let using = this->arrayGetDefault("using", parameters, []); + if typeof using === "array" && count(using) === 2 { + unset parameters["using"]; + } else { + throw new Exception("The 'using' parameter is not a valid array"); + } + } + + /** + * Check if `useEmpty` has been passed + */ + if useEmpty { + let emptyText = this->arrayGetDefault("emptyText", parameters, "Choose..."), + emptyValue = this->arrayGetDefault("emptyValue", parameters, ""), + outputEmpty = sprintf( + "\t" . PHP_EOL, + emptyValue, + emptyText + ); + + unset parameters["useEmpty"]; + unset parameters["emptyText"]; + unset parameters["emptyValue"]; + } + + if !fetch value, parameters["value"] { + let value = this->getValue(id, parameters); + } else { + unset parameters["value"]; + } + + let output = this->renderAttributes("" . PHP_EOL + . outputEmpty; + + if typeof data == "object" { + /** + * Create the SELECT's option from a resultset + */ + let output .= this->renderSelectResultset(data, using, value, "" . PHP_EOL); + } elseif typeof data == "array" { + /** + * Create the SELECT's option from an array + */ + let output .= this->renderSelectArray(data, value, "" . PHP_EOL); + } else { + throw new Exception("Invalid data provided to SELECT helper"); + } + + let output .= ""; + + return output; } /** @@ -1531,4 +1654,126 @@ class Tag implements InjectionAwareInterface return output; } + + /** + * Generates the option values or optgroup from an array + */ + private function renderSelectArray(array options, var value, string closeOption) -> string + { + var label, strOptionValue, strValue, optionText, optionValue, output; + + let output = ""; + + for optionValue, optionText in options { + let label = htmlspecialchars(optionValue); + + /** + * Check if this is an option group + */ + if typeof optionText === "array" { + let output .= "\t" . PHP_EOL + . this->renderSelectArray(optionText, value, closeOption) . "\t" . PHP_EOL; + continue; + } + + if typeof value === "array" { + if in_array(optionValue, value) { + let output .= "\t * * Volt syntax: * - * {{ submit(['name': 'Save']) }} + * {{ submit('Save') }} * */ public function submit(string! name, array parameters = []) -> string @@ -1405,8 +1443,8 @@ class Tag implements InjectionAwareInterface * $tag = new Tag(); * * echo $tag->textArea( + * 'comments', * [ - * 'name' => 'comments', * 'cols' => 10, * 'rows' => 4, * ] @@ -1415,7 +1453,7 @@ class Tag implements InjectionAwareInterface * * Volt syntax: * - * {{ text_area(['name': 'comments', 'cols': 10, 'rows': 4) }} + * {{ text_area('comments', ['cols': 10, 'rows': 4]) }} * */ public function textArea(string! name, array parameters = []) -> string diff --git a/phalcon/mvc/view/engine/volt/compiler.zep b/phalcon/mvc/view/engine/volt/compiler.zep index 1820dec38e0..2e99f81eb55 100644 --- a/phalcon/mvc/view/engine/volt/compiler.zep +++ b/phalcon/mvc/view/engine/volt/compiler.zep @@ -507,6 +507,65 @@ class Compiler implements InjectionAwareInterface return "$this->tag->" . method . "(" . arguments . ")"; } + /** + * The code below will be activated when Html\Tag is enabled + */ + /** + let className = "Phalcon\\Html\\Tag"; + + if method_exists(className, method) { + let arrayHelpers = this->_arrayHelpers; + if typeof arrayHelpers != "array" { + let arrayHelpers = [ + "button_submit" : true. + "element" : true. + "element_close" : true. + "end_form" : true. + "form" : true. + "friendly_title" : true. + "get_doc_type" : true. + "get_title" : true. + "get_title_separator" : true. + "image" : true. + "input_checkbox" : true. + "input_color" : true. + "input_date" : true. + "input_date_time" : true. + "input_date_time_local" : true. + "input_email" : true. + "input_file" : true. + "input_hidden" : true. + "input_image" : true. + "input_month" : true. + "input_numeric" : true. + "input_password" : true. + "input_radio" : true. + "input_range" : true. + "input_search" : true. + "input_tel" : true. + "input_text" : true. + "input_time" : true. + "input_url" : true. + "input_week" : true. + "javascript" : true. + "link" : true. + "prepend_title" : true. + "render_title" : true. + "select" : true. + "stylesheet" : true. + "submit" : true. + "text_area" : true. + ]; + let this->_arrayHelpers = arrayHelpers; + } + + if isset arrayHelpers[name] { + return "$this->tag->" . method . "([" . arguments . "])"; + } + return "$this->tag->" . method . "(" . arguments . ")"; + } + */ + /** * Get a dynamic URL */ diff --git a/tests/unit/Html/Tag/ButtonCest.php b/tests/unit/Html/Tag/ButtonCest.php new file mode 100644 index 00000000000..b3f1fd4c888 --- /dev/null +++ b/tests/unit/Html/Tag/ButtonCest.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use Phalcon\Test\Fixtures\Traits\DiTrait; +use Phalcon\Test\Fixtures\Traits\TagHelperTrait; +use Phalcon\Test\Fixtures\Traits\TagSetupTrait; + +/** + * Class ButtonCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ButtonCest +{ + use DiTrait; + use TagSetupTrait; + use TagHelperTrait; + + protected $function = 'button'; + protected $inputType = 'button'; +} diff --git a/tests/unit/Html/Tag/ResetCest.php b/tests/unit/Html/Tag/ResetCest.php new file mode 100644 index 00000000000..b816d9dfe52 --- /dev/null +++ b/tests/unit/Html/Tag/ResetCest.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + +namespace Phalcon\Test\Unit\Html\Tag; + +use Phalcon\Test\Fixtures\Traits\DiTrait; +use Phalcon\Test\Fixtures\Traits\TagHelperTrait; +use Phalcon\Test\Fixtures\Traits\TagSetupTrait; + +/** + * Class ResetCest + * + * @package Phalcon\Test\Unit\Html\Tag + */ +class ResetCest +{ + use DiTrait; + use TagSetupTrait; + use TagHelperTrait; + + protected $function = 'reset'; + protected $inputType = 'reset'; +} From 6d26b5149b039819f1a9f960aaf474293200f83f Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 11 Dec 2018 15:49:42 -0500 Subject: [PATCH 17/19] [#12379] - Removed .temp folder from ignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1c4e48634aa..790c55c2ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,6 @@ ext/run-tests.php lemon .libs/ -.temp/ autom4te.cache/ /vendor /ide/ From 599818217427882c7a9404afd161aac653bc0047 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Tue, 11 Dec 2018 15:51:03 -0500 Subject: [PATCH 18/19] [#12379] - Fixed the changelog --- CHANGELOG-4.0.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG-4.0.md b/CHANGELOG-4.0.md index 43f7e46b9df..360c351fb6d 100644 --- a/CHANGELOG-4.0.md +++ b/CHANGELOG-4.0.md @@ -12,7 +12,7 @@ - Added more column types for the Mysql adapter. The adapter supports `TYPE_BIGINTEGER`, `TYPE_BIT`, `TYPE_BLOB`, `TYPE_BOOLEAN`, `TYPE_CHAR`, `TYPE_DATE`, `TYPE_DATETIME`, `TYPE_DECIMAL`, `TYPE_DOUBLE`, `TYPE_ENUM`, `TYPE_FLOAT`, `TYPE_INTEGER`, `TYPE_JSON`, `TYPE_JSONB`, `TYPE_LONGBLOB`, `TYPE_LONGTEXT`, `TYPE_MEDIUMBLOB`, `TYPE_MEDIUMINTEGER`, `TYPE_MEDIUMTEXT`, `TYPE_SMALLINTEGER`, `TYPE_TEXT`, `TYPE_TIME`, `TYPE_TIMESTAMP`, `TYPE_TINYBLOB`, `TYPE_TINYINTEGER`, `TYPE_TINYTEXT`, `TYPE_VARCHAR` [#13151](https://github.com/phalcon/cphalcon/issues/13151), [#12223](https://github.com/phalcon/cphalcon/issues/12223), [#524](https://github.com/phalcon/cphalcon/issues/524), [#13225](https://github.com/phalcon/cphalcon/pull/13225) [@zGaron](https://github.com/zGaron), [#12523](https://github.com/phalcon/cphalcon/pull/12523) [@Studentsov](https://github.com/Studentsov), [#12471](https://github.com/phalcon/cphalcon/pull/12471) [@ruudboon](https://github.com/ruudboon) - Added `Phalcon\Acl\Adapter\Memory::addRole` support multiple inherited - Added `Phalcon\Tag::renderTitle()` that renders the title enclosed in `` tags. [#13547](https://github.com/phalcon/cphalcon/issues/13547) -- Added `hasHeader()` method to `Phalcon\Http\Response` to provide the ability to check if a header exists. [PR-12189](https://github.com/phalcon/cphalcon/pull/12189) +- Added `hasHeader()` method to `Phalcon\Http\Response` to provide the ability to check if a header exists. [#12189](https://github.com/phalcon/cphalcon/pull/12189) - Added global setting `orm.case_insensitive_column_map` to attempt to find value in the column map case-insensitively. Can be also enabled by setting `caseInsensitiveColumnMap` key in `\Phalcon\Mvc\Model::setup()`. [#11802](https://github.com/phalcon/cphalcon/pull/11802) - Added the ability to use FrontendInterface to serialize Model and ResultSet - Inject a `serializer` object which implements `FrontendInterface` in DI to use it. [#12808] (https://github.com/phalcon/cphalcon/pull/12888) - Added `Phalcon\Mvc\Model\Query\BuilderInterface::offset` [#13599](https://github.com/phalcon/cphalcon/pull/13599) @@ -25,20 +25,20 @@ - Added `Phalcon\Html\Tag`, a component that creates HTML elements. It will replace `Phalcon\Tag` in a future version. This component does not use static method calls. [#12392](https://github.com/phalcon/cphalcon/issues/12392) ## Changed -- By configuring `prefix` and `statsKey` the `Phalcon\Cache\Backend\Redis::queryKeys` no longer returns prefixed keys, now it returns original keys without prefix. [PR-13656](https://github.com/phalcon/cphalcon/pull/13656) +- By configuring `prefix` and `statsKey` the `Phalcon\Cache\Backend\Redis::queryKeys` no longer returns prefixed keys, now it returns original keys without prefix. [#13656](https://github.com/phalcon/cphalcon/pull/13656) - Now Phalcon requires the [PSR PHP extension](https://github.com/jbboehr/php-psr) to be installed and enabled -- The `Phalcon\Mvc\Application`, `Phalcon\Mvc\Micro` and `Phalcon\Mvc\Router` now must have a URI to process [PR-12380](https://github.com/phalcon/cphalcon/pull/12380) -- Response headers and cookies are no longer prematurely sent [PR-12378](https://github.com/phalcon/cphalcon/pull/12378) +- The `Phalcon\Mvc\Application`, `Phalcon\Mvc\Micro` and `Phalcon\Mvc\Router` now must have a URI to process [#12380](https://github.com/phalcon/cphalcon/pull/12380) +- Response headers and cookies are no longer prematurely sent [#12378](https://github.com/phalcon/cphalcon/pull/12378) - You can no longer assign data to models whilst saving them [#12317](https://github.com/phalcon/cphalcon/issues/12317) - The `Phalcon\Mvc\Model\Manager::load` no longer reuses already initialized models [#12317](https://github.com/phalcon/cphalcon/issues/12317) - Changed `Phalcon\Db\Dialect\Postgresql::describeReferences` to generate correct SQL, added "on update" and "on delete" constraints - Changed catch `Exception` to `Throwable` [#12288](https://github.com/phalcon/cphalcon/issues/12288) -- Changed `Phalcon\Mvc\Model\Query\Builder::addFrom` to remove third parameter `$with` [PR-13109](https://github.com/phalcon/cphalcon/pull/13109) -- `Phalcon\Forms\Form::clear` will no longer call `Phalcon\Forms\Element::clear`, instead it will clear/set default value itself, and `Phalcon\Forms\Element::clear` will now call `Phalcon\Forms\Form::clear` if it's assigned to the form, otherwise it will just clear itself. [PR-13500](https://github.com/phalcon/cphalcon/pull/13500) -- `Phalcon\Forms\Form::getValue` will now also try to get the value by calling `Tag::getValue` or element's `getDefault` method before returning `null`, and `Phalcon\Forms\Element::getValue` calls `Tag::getDefault` only if it's not added to the form. [PR-13500](https://github.com/phalcon/cphalcon/pull/13500) +- Changed `Phalcon\Mvc\Model\Query\Builder::addFrom` to remove third parameter `$with` [#13109](https://github.com/phalcon/cphalcon/pull/13109) +- `Phalcon\Forms\Form::clear` will no longer call `Phalcon\Forms\Element::clear`, instead it will clear/set default value itself, and `Phalcon\Forms\Element::clear` will now call `Phalcon\Forms\Form::clear` if it's assigned to the form, otherwise it will just clear itself. [#13500](https://github.com/phalcon/cphalcon/pull/13500) +- `Phalcon\Forms\Form::getValue` will now also try to get the value by calling `Tag::getValue` or element's `getDefault` method before returning `null`, and `Phalcon\Forms\Element::getValue` calls `Tag::getDefault` only if it's not added to the form. [#13500](https://github.com/phalcon/cphalcon/pull/13500) - Changed `Phalcon\Mvc\Model` to use the `Phalcon\Messages\Message` object for its messages [#13114](https://github.com/phalcon/cphalcon/issues/13114) - Changed `Phalcon\Validation\*` to use the `Phalcon\Messages\Message` object for its messages [#13114](https://github.com/phalcon/cphalcon/issues/13114) -- Collections now use the Validation component [PR-12376](https://github.com/phalcon/cphalcon/pull/12376) +- Collections now use the Validation component [#12376](https://github.com/phalcon/cphalcon/pull/12376) - Made the `specialKey` (`_PHCR`) optional for the `Phalcon\Cache\Backend\Redis` adapter [#10905](https://github.com/phalcon/cphalcon/issues/10905), [#11608](https://github.com/phalcon/cphalcon/pull/11608) - Refactored `Phalcon\Db\Adapter\Pdo::query` to use PDO's prepare and execute. `Phalcon\Db\Adapter::fetchAll` to use PDO's fetchAll - Fixed `\Phalcon\Http\Response::setFileToSend` filename last much _ From a8c75758ed551aae6cbcdccf5b8e81c8fa690d7e Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos <nikos@niden.net> Date: Tue, 11 Dec 2018 15:57:38 -0500 Subject: [PATCH 19/19] [#12379] - Corrected license docblock --- phalcon/html/exception.zep | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/phalcon/html/exception.zep b/phalcon/html/exception.zep index f7e6fc178a1..9cf48a6c4c8 100644 --- a/phalcon/html/exception.zep +++ b/phalcon/html/exception.zep @@ -1,28 +1,19 @@ -/* - +------------------------------------------------------------------------+ - | Phalcon Framework | - +------------------------------------------------------------------------+ - | Copyright (c) 2011-2017 Phalcon Team (https://phalconphp.com) | - +------------------------------------------------------------------------+ - | This source file is subject to the New BSD License that is bundled | - | with this package in the file LICENSE.txt. | - | | - | If you did not receive a copy of the license and are unable to | - | obtain it through the world-wide-web, please send an email | - | to license@phalconphp.com so we can send you a copy immediately. | - +------------------------------------------------------------------------+ - | Authors: Andres Gutierrez <andres@phalconphp.com> | - | Eduar Carvajal <eduar@phalconphp.com> | - +------------------------------------------------------------------------+ +/** + * This file is part of the Phalcon Framework. + * + * (c) Phalcon Team <team@phalconphp.com> + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. */ namespace Phalcon\Html; /** - * Phalcon\Tag\Exception + * Phalcon\Html\Tag\Exception * - * Exceptions thrown in Phalcon\Tag will use this class + * Exceptions thrown in Phalcon\Html\Tag will use this class * */ class Exception extends \Phalcon\Exception