diff --git a/.gitignore b/.gitignore index 5d06e0e6b..f7ac9d6a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,22 @@ -config.user.inc.php .DS_Store Thumbs.db + +config.user.inc.php /files/ /build/ + +codeception.yml +/tests/_output/ +/tests/*.suite.yml + /node_modules/ +/bower_components/ /vendor/ -tests/_output/* +composer.phar +composer.lock + +.idea +*.sublime-workspace +*.sublime-project +.codeintel + diff --git a/.travis.yml b/.travis.yml index fc815f346..a13a92f5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,8 @@ before_script: script: - grunt lint - grunt minify -- if [ $(phpenv version-name) != "5.3" ]; then ./vendor/bin/codecept run --env travis; +- if [ $(phpenv version-name) != "5.3" ]; then ./vendor/bin/codecept run -d --env travis; fi notifications: slack: - secure: V4p13KlqML94RK0KTlHNJwrdwOK1K6n7sfxs6oILCJTqBfGuqN2fCglnxX78QEUwnl8LWrwSdA4AnUVfZqv6N5g7zlDDr2ZU2+a4XVApmEss3/C0g9zsYNlFfkJqChvtMsV29UiBjSfqn/coAVLtY1wbCYJYk3Wc2nmB/3Qti9Y= + secure: 0HhwktIb65zfge56E4yMfYj0Xj4GeYIaxvh/Obb13BK1/C8RdWBy6u213N5MQ2UHsxYk8wXXzynaCh4psegi2iPy9dbKmkdAdEQMzYoKE2xYVSqZveeVQm0sqFVXAlzggpgs/j5vtvKYjRkQKtTrz0C+p0uJ0bkLcyWGezWTpGc= diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 80d48a687..09f7d09a1 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -1384,7 +1384,7 @@ class Context { $result[$k] = $v; - if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc()) + if($do_stripslashes && version_compare(PHP_VERSION, '5.4.0', '<') && get_magic_quotes_gpc()) { $result[$k] = stripslashes($result[$k]); } @@ -1417,7 +1417,7 @@ class Context */ function _setUploadedArgument() { - if($_SERVER['REQUEST_METHOD'] != 'POST' || !$_FILES || stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') === FALSE || stripos($_SERVER['HTTP_CONTENT_TYPE'], 'multipart/form-data') === FALSE) + if($_SERVER['REQUEST_METHOD'] != 'POST' || !$_FILES || (stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') === FALSE && stripos($_SERVER['HTTP_CONTENT_TYPE'], 'multipart/form-data') === FALSE)) { return; } diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 4a68816d8..a41ad4031 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -4,35 +4,6 @@ if(!defined('__XE_LOADED_DB_CLASS__')) { define('__XE_LOADED_DB_CLASS__', 1); - - require(_XE_PATH_ . 'classes/xml/xmlquery/DBParser.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/QueryParser.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/argument/Argument.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/argument/SortArgument.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/argument/ConditionArgument.class.php'); - - require(_XE_PATH_ . 'classes/db/queryparts/expression/Expression.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/expression/SelectExpression.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/expression/InsertExpression.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/expression/UpdateExpression.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/expression/ClickCountExpression.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/table/Table.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/table/JoinTable.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/table/CubridTableWithHint.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/table/MysqlTableWithHint.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/table/MssqlTableWithHint.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/table/IndexHint.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/condition/ConditionGroup.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/condition/Condition.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/condition/ConditionWithArgument.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/condition/ConditionWithoutArgument.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/condition/ConditionSubquery.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/expression/StarExpression.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/order/OrderByColumn.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/limit/Limit.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/Query.class.php'); - require(_XE_PATH_ . 'classes/db/queryparts/Subquery.class.php'); } /** @@ -622,7 +593,6 @@ class DB // if there is no cache file or is not new, find original xml query file and parse it if($cache_time < filemtime($xml_file) || $cache_time < filemtime(_XE_PATH_ . 'classes/db/DB.class.php') || $cache_time < filemtime(_XE_PATH_ . 'classes/xml/XmlQueryParser.class.php')) { - require_once(_XE_PATH_ . 'classes/xml/XmlQueryParser.class.php'); $oParser = new XmlQueryParser(); $oParser->parse($query_id, $xml_file, $cache_file); } diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index 064ae99ab..fc977d81a 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -116,7 +116,7 @@ class DBCubrid extends DB */ function addQuotes($string) { - if(version_compare(PHP_VERSION, "5.9.0", "<") && + if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $string = stripslashes(str_replace("\\", "\\\\", $string)); diff --git a/classes/db/DBMssql.class.php b/classes/db/DBMssql.class.php index 5a7217735..32adb251c 100644 --- a/classes/db/DBMssql.class.php +++ b/classes/db/DBMssql.class.php @@ -99,7 +99,7 @@ class DBMssql extends DB */ function addQuotes($string) { - if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) + if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $string = stripslashes(str_replace("\\", "\\\\", $string)); } diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index e848ef07d..2e9bf606c 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -131,7 +131,7 @@ class DBMysql extends DB */ function addQuotes($string) { - if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) + if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $string = stripslashes(str_replace("\\", "\\\\", $string)); } diff --git a/classes/db/DBMysqli.class.php b/classes/db/DBMysqli.class.php index 36c04e1d5..58d25c852 100644 --- a/classes/db/DBMysqli.class.php +++ b/classes/db/DBMysqli.class.php @@ -87,7 +87,7 @@ class DBMysqli extends DBMysql */ function addQuotes($string) { - if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) + if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $string = stripslashes(str_replace("\\", "\\\\", $string)); } diff --git a/classes/db/DBMysqli_innodb.class.php b/classes/db/DBMysqli_innodb.class.php index 9f5ee5671..55422b61f 100644 --- a/classes/db/DBMysqli_innodb.class.php +++ b/classes/db/DBMysqli_innodb.class.php @@ -145,7 +145,7 @@ class DBMysqli_innodb extends DBMysql */ function addQuotes($string) { - if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) + if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $string = stripslashes(str_replace("\\", "\\\\", $string)); } diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index e4bca38da..deb8d8326 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -39,12 +39,10 @@ class DisplayHandler extends Handler // Extract contents to display by the request method if(Context::get('xeVirtualRequestMethod') == 'xml') { - require_once(_XE_PATH_ . "classes/display/VirtualXMLDisplayHandler.php"); $handler = new VirtualXMLDisplayHandler(); } else if(Context::getRequestMethod() == 'XMLRPC') { - require_once(_XE_PATH_ . "classes/display/XMLDisplayHandler.php"); $handler = new XMLDisplayHandler(); if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { @@ -53,17 +51,14 @@ class DisplayHandler extends Handler } else if(Context::getRequestMethod() == 'JSON') { - require_once(_XE_PATH_ . "classes/display/JSONDisplayHandler.php"); $handler = new JSONDisplayHandler(); } else if(Context::getRequestMethod() == 'JS_CALLBACK') { - require_once(_XE_PATH_ . "classes/display/JSCallbackDisplayHandler.php"); $handler = new JSCallbackDisplayHandler(); } else { - require_once(_XE_PATH_ . "classes/display/HTMLDisplayHandler.php"); $handler = new HTMLDisplayHandler(); } diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 5e315d011..4f6b67fe2 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -1044,31 +1044,18 @@ class ModuleHandler extends Handler ModuleHandler::_getModuleFilePath($module, $type, $kind, $class_path, $high_class_file, $class_file, $instance_name); } - // Get base class name and load the file contains it - if(!class_exists($module, false)) + // Check if the base class and instance class exist + if(!class_exists($module, true)) { - $high_class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module); - if(!file_exists($high_class_file)) - { - return NULL; - } - require_once($high_class_file); + return NULL; } - - // Get the name of the class file - if(!is_readable($class_file)) + if(!class_exists($instance_name, true)) { return NULL; } - // Create an instance with eval function - require_once($class_file); - if(!class_exists($instance_name, false)) - { - return NULL; - } - $tmp_fn = create_function('', "return new {$instance_name}();"); - $oModule = $tmp_fn(); + // Create an instance + $oModule = new $instance_name(); if(!is_object($oModule)) { return NULL; diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index b2d148759..84946b333 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -236,7 +236,7 @@ class TemplateHandler $buff = preg_replace('@@s', '', $buff); // replace value of src in img/input/script tag - $buff = preg_replace_callback('/<(?:img|input|script)[^<>]*src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff); + $buff = preg_replace_callback('/<(?:img|input|script)(?:[^<>]*?)(?(?=cond=")(?:cond="[^"]+"[^<>]*)+|)[^<>]* src="(?!(?:https?|file):\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff); // replace loop and cond template syntax $buff = $this->_parseInline($buff); @@ -362,6 +362,7 @@ class TemplateHandler $__Context->logged_info = Context::get('logged_info'); } + $level = ob_get_level(); ob_start(); if(substr($buff, 0, 7) == 'file://') { @@ -395,7 +396,12 @@ class TemplateHandler } } - return ob_get_clean(); + $contents = ''; + while (ob_get_level() - $level > 0) { + $contents .= ob_get_contents(); + ob_end_clean(); + } + return $contents; } /** diff --git a/classes/xml/XmlQueryParser.class.php b/classes/xml/XmlQueryParser.class.php index a804376bd..e86c00c8f 100644 --- a/classes/xml/XmlQueryParser.class.php +++ b/classes/xml/XmlQueryParser.class.php @@ -7,31 +7,6 @@ if(!defined('__XE_LOADED_XML_CLASS__')) { define('__XE_LOADED_XML_CLASS__', 1); - - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/query/QueryTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/table/TableTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/table/HintTableTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/table/TablesTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/ColumnTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/SelectColumnTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/InsertColumnTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/condition/ConditionTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/condition/ConditionsTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/group/GroupsTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/navigation/NavigationTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/navigation/IndexTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/tags/navigation/LimitTag.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/queryargument/QueryArgument.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/queryargument/SortQueryArgument.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php'); - require(_XE_PATH_ . 'classes/xml/xmlquery/queryargument/DefaultValue.class.php'); } /** diff --git a/codeception.dist.yml b/codeception.dist.yml new file mode 100644 index 000000000..db57ec19b --- /dev/null +++ b/codeception.dist.yml @@ -0,0 +1,11 @@ +actor: Tester +paths: + tests: tests + log: tests/_output + data: tests/_data + helpers: tests/_support +settings: + bootstrap: _bootstrap.php + colors: true + memory_limit: 1024M + error_level: "E_ALL & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE" diff --git a/codeception.yml b/codeception.yml deleted file mode 100644 index 7f760718c..000000000 --- a/codeception.yml +++ /dev/null @@ -1,19 +0,0 @@ -actor: Tester -paths: - tests: tests - log: tests/_output - data: tests/_data - helpers: tests/_support -settings: - bootstrap: _bootstrap.php - colors: true - memory_limit: 1024M -modules: - config: - Db: - dsn: 'mysql:host=127.0.0.1;dbname=xe_test' - user: 'root' - password: 'root' - populate: false - cleanup: false -error_level: "E_STRICTE_ALL & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE" diff --git a/common/js/plugins/jquery.fileupload/js/main.js b/common/js/plugins/jquery.fileupload/js/main.js index 7686367a8..afa7377ab 100644 --- a/common/js/plugins/jquery.fileupload/js/main.js +++ b/common/js/plugins/jquery.fileupload/js/main.js @@ -48,6 +48,9 @@ editor_sequence: null, init : function() { }, + deactivate: function() { + console.log(this); + }, createInstance: function(containerEl, opt) { var self = this; var $container = this.$container = containerEl; @@ -152,9 +155,10 @@ }); $(document).bind('dragover', function (e) { - var timeout = window.dropZoneTimeout; + var timeout = window.dropZoneTimeout, + dropZone = self.settings.dropZone; if (!timeout) { - self.settings.dropZone.addClass('in'); + dropZone.addClass('in'); } else { clearTimeout(timeout); } @@ -168,13 +172,13 @@ node = node.parentNode; } while (node != null); if (found) { - self.settings.dropZone.addClass('hover'); + dropZone.addClass('hover'); } else { - self.settings.dropZone.removeClass('hover'); + dropZone.removeClass('hover'); } window.dropZoneTimeout = setTimeout(function () { window.dropZoneTimeout = null; - self.settings.dropZone.removeClass('in hover'); + dropZone.removeClass('in hover'); }, 100); }); }, @@ -315,6 +319,9 @@ return u; }; + + xe.unregisterApp(); + // Shortcut function in XE // xe.createXeUploader = function(browseButton, opts) { // var u = new XeUploader(browseButton, opts); diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index b9dcf596e..2536b14d3 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -19,15 +19,15 @@ {Context::getBrowserTitle()} - - + - + diff --git a/common/tpl/mobile_layout.html b/common/tpl/mobile_layout.html index 31e20eca5..d639ad9ec 100644 --- a/common/tpl/mobile_layout.html +++ b/common/tpl/mobile_layout.html @@ -13,15 +13,15 @@ {Context::getBrowserTitle()} - - + - + diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 23c595a15..000000000 --- a/composer.lock +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "0b13ef2987c06113ab0a920cdb9e4e83", - "packages": [], - "packages-dev": [ - { - "name": "codeception/codeception", - "version": "2.0.12", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "6e29668921182d6b90cd021033002be85382c6f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/6e29668921182d6b90cd021033002be85382c6f9", - "reference": "6e29668921182d6b90cd021033002be85382c6f9", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "facebook/webdriver": "~0.4|~0.5", - "guzzlehttp/guzzle": "~4.0|~5.0", - "php": ">=5.4.0", - "phpunit/phpunit": "~4.5.0", - "symfony/browser-kit": "~2.4", - "symfony/console": "~2.4", - "symfony/css-selector": "~2.4", - "symfony/dom-crawler": "~2.4,!=2.4.5", - "symfony/event-dispatcher": "~2.4", - "symfony/finder": "~2.4", - "symfony/yaml": "~2.4" - }, - "require-dev": { - "codeception/specify": "~0.3", - "facebook/php-sdk": "~3.2", - "flow/jsonpath": "~0.2", - "monolog/monolog": "~1.8", - "pda/pheanstalk": "~2.0", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests", - "codeception/specify": "BDD-style code blocks", - "codeception/verify": "BDD-style assertions", - "monolog/monolog": "Log test steps", - "phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module." - }, - "bin": [ - "codecept" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-0": { - "Codeception": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert@mail.ua", - "homepage": "http://codegyre.com" - } - ], - "description": "BDD-style testing framework", - "homepage": "http://codeception.com/", - "keywords": [ - "BDD", - "TDD", - "acceptance testing", - "functional testing", - "unit testing" - ], - "time": "2015-04-02 23:50:20" - }, - { - "name": "codeception/specify", - "version": "0.4.1", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Specify.git", - "reference": "0c0ae07adfc231115b3b72ade22f44c23c199ded" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Specify/zipball/0c0ae07adfc231115b3b72ade22f44c23c199ded", - "reference": "0c0ae07adfc231115b3b72ade22f44c23c199ded", - "shasum": "" - }, - "require": { - "myclabs/deep-copy": "~1.1", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Codeception\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert.php@mailican.com" - } - ], - "description": "BDD code blocks for PHPUnit and Codeception", - "time": "2014-10-17 00:06:51" - }, - { - "name": "codeception/verify", - "version": "0.2.7", - "source": { - "type": "git", - "url": "https://github.com/Codeception/Verify.git", - "reference": "66e5074905f4d9590ddb805d123fe632f4baa488" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Codeception/Verify/zipball/66e5074905f4d9590ddb805d123fe632f4baa488", - "reference": "66e5074905f4d9590ddb805d123fe632f4baa488", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "autoload": { - "files": [ - "src/Codeception/function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "Michael Bodnarchuk", - "email": "davert.php@mailican.com", - "homepage": "http://codeception.com" - } - ], - "description": "BDD assertion library for PHPUnit", - "time": "2014-01-22 14:40:33" - }, - { - "name": "doctrine/instantiator", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2014-10-13 12:58:55" - }, - { - "name": "facebook/webdriver", - "version": "v0.5.1", - "source": { - "type": "git", - "url": "https://github.com/facebook/php-webdriver.git", - "reference": "bbcb697efb394d17bd9ec3d467e7da847cde4509" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/bbcb697efb394d17bd9ec3d467e7da847cde4509", - "reference": "bbcb697efb394d17bd9ec3d467e7da847cde4509", - "shasum": "" - }, - "require": { - "php": ">=5.3.19" - }, - "require-dev": { - "phpdocumentor/phpdocumentor": "2.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "A php client for WebDriver", - "homepage": "https://github.com/facebook/php-webdriver", - "keywords": [ - "facebook", - "php", - "selenium", - "webdriver" - ], - "time": "2014-11-05 20:53:09" - }, - { - "name": "guzzlehttp/guzzle", - "version": "5.2.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "475b29ccd411f2fa8a408e64576418728c032cfa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/475b29ccd411f2fa8a408e64576418728c032cfa", - "reference": "475b29ccd411f2fa8a408e64576418728c032cfa", - "shasum": "" - }, - "require": { - "guzzlehttp/ringphp": "~1.0", - "php": ">=5.4.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2015-01-28 01:03:29" - }, - { - "name": "guzzlehttp/ringphp", - "version": "1.0.7", - "source": { - "type": "git", - "url": "https://github.com/guzzle/RingPHP.git", - "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/52d868f13570a9a56e5fce6614e0ec75d0f13ac2", - "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2", - "shasum": "" - }, - "require": { - "guzzlehttp/streams": "~3.0", - "php": ">=5.4.0", - "react/promise": "~2.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Ring\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", - "time": "2015-03-30 01:43:20" - }, - { - "name": "guzzlehttp/streams", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "stream" - ], - "time": "2014-10-12 19:18:40" - }, - { - "name": "myclabs/deep-copy", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "96fbdc07635989c35c5a1912379f4c4b2ab15fd5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/96fbdc07635989c35c5a1912379f4c4b2ab15fd5", - "reference": "96fbdc07635989c35c5a1912379f4c4b2ab15fd5", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2015-03-21 22:40:23" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03 12:10:50" - }, - { - "name": "phpspec/prophecy", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", - "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2015-03-27 19:31:25" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.0.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "34cc484af1ca149188d0d9e91412191e398e0b67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67", - "reference": "34cc484af1ca149188d0d9e91412191e398e0b67", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "~1.0", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-01-24 10:06:35" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2013-10-10 15:34:57" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "Text/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2014-01-30 17:20:04" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2013-08-02 07:42:54" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", - "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-01-17 09:51:32" - }, - { - "name": "phpunit/phpunit", - "version": "4.5.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d6429b0995b24a2d9dfe5587ee3a7071c1161af4", - "reference": "d6429b0995b24a2d9dfe5587ee3a7071c1161af4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.0,>=2.0.11", - "phpunit/php-file-iterator": "~1.3.2", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.5.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-03-29 09:24:05" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "74ffb87f527f24616f72460e54b595f508dccb5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", - "reference": "74ffb87f527f24616f72460e54b595f508dccb5c", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-04-02 05:36:41" - }, - { - "name": "react/promise", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/365fcee430dfa4ace1fbc75737ca60ceea7eeeef", - "reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@googlemail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "time": "2014-12-30 13:32:42" - }, - { - "name": "sebastian/comparator", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-01-29 16:28:08" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/environment", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2015-01-01 10:01:08" - }, - { - "name": "sebastian/exporter", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "84839970d05254c73cde183a721c7af13aede943" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", - "reference": "84839970d05254c73cde183a721c7af13aede943", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2015-01-27 07:23:06" - }, - { - "name": "sebastian/global-state", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2014-10-06 09:23:50" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-01-24 09:48:32" - }, - { - "name": "sebastian/version", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", - "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-02-24 06:35:25" - }, - { - "name": "symfony/browser-kit", - "version": "v2.6.6", - "target-dir": "Symfony/Component/BrowserKit", - "source": { - "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "f21189b0eccbe56528515858ca1d5089a741692f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/f21189b0eccbe56528515858ca1d5089a741692f", - "reference": "f21189b0eccbe56528515858ca1d5089a741692f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/dom-crawler": "~2.0,>=2.0.5" - }, - "require-dev": { - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.0,>=2.0.5" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\BrowserKit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:54:10" - }, - { - "name": "symfony/console", - "version": "v2.6.6", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "5b91dc4ed5eb08553f57f6df04c4730a73992667" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/5b91dc4ed5eb08553f57f6df04c4730a73992667", - "reference": "5b91dc4ed5eb08553f57f6df04c4730a73992667", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:54:10" - }, - { - "name": "symfony/css-selector", - "version": "v2.6.6", - "target-dir": "Symfony/Component/CssSelector", - "source": { - "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "db2c48df9658423a8c168d89f7b971b73d3d74a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/db2c48df9658423a8c168d89f7b971b73d3d74a4", - "reference": "db2c48df9658423a8c168d89f7b971b73d3d74a4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\CssSelector\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "http://symfony.com", - "time": "2015-03-22 16:55:57" - }, - { - "name": "symfony/dom-crawler", - "version": "v2.6.6", - "target-dir": "Symfony/Component/DomCrawler", - "source": { - "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/8897ebf39c7dfb752a5494fa301845a3fbb9e53d", - "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/css-selector": "~2.3", - "symfony/phpunit-bridge": "~2.7" - }, - "suggest": { - "symfony/css-selector": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:54:10" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.6.6", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/70f7c8478739ad21e3deef0d977b38c77f1fb284", - "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2015-03-13 17:37:22" - }, - { - "name": "symfony/finder", - "version": "v2.6.6", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "5dbe2e73a580618f5b4880fda93406eed25de251" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/5dbe2e73a580618f5b4880fda93406eed25de251", - "reference": "5dbe2e73a580618f5b4880fda93406eed25de251", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:54:10" - }, - { - "name": "symfony/yaml", - "version": "v2.6.6", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "174f009ed36379a801109955fc5a71a49fe62dd4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/174f009ed36379a801109955fc5a71a49fe62dd4", - "reference": "174f009ed36379a801109955fc5a71a49fe62dd4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:54:10" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/config/config.inc.php b/config/config.inc.php index 4b5c1df20..155b9f2b2 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -29,7 +29,7 @@ define('__ZBXE__', __XE__); /** * Display XE's full version. */ -define('__XE_VERSION__', '1.8.2'); +define('__XE_VERSION__', '1.8.3'); define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false)); define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false)); define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false)); @@ -287,40 +287,146 @@ if(!defined('__XE_LOADED_CLASS__')) // Require a function-defined-file for simple use require(_XE_PATH_ . 'config/func.inc.php'); - if(__DEBUG__) + if(__DEBUG__) { define('__StartTime__', getMicroTime()); + } - // include the class files - //TODO When _autoload() can be used for PHP5 based applications, it will be removed. - if(__DEBUG__) - define('__ClassLoadStartTime__', getMicroTime()); - require(_XE_PATH_ . 'classes/object/Object.class.php'); - require(_XE_PATH_ . 'classes/extravar/Extravar.class.php'); - require(_XE_PATH_ . 'classes/handler/Handler.class.php'); - require(_XE_PATH_ . 'classes/xml/XmlParser.class.php'); - require(_XE_PATH_ . 'classes/xml/XmlGenerator.class.php'); - require(_XE_PATH_ . 'classes/xml/XmlJsFilter.class.php'); - require(_XE_PATH_ . 'classes/xml/XmlLangParser.class.php'); - require(_XE_PATH_ . 'classes/cache/CacheHandler.class.php'); - require(_XE_PATH_ . 'classes/context/Context.class.php'); - require(_XE_PATH_ . 'classes/db/DB.class.php'); - require(_XE_PATH_ . 'classes/file/FileHandler.class.php'); - require(_XE_PATH_ . 'classes/widget/WidgetHandler.class.php'); - require(_XE_PATH_ . 'classes/editor/EditorHandler.class.php'); - require(_XE_PATH_ . 'classes/module/ModuleObject.class.php'); - require(_XE_PATH_ . 'classes/module/ModuleHandler.class.php'); - require(_XE_PATH_ . 'classes/display/DisplayHandler.class.php'); - require(_XE_PATH_ . 'classes/template/TemplateHandler.class.php'); - require(_XE_PATH_ . 'classes/mail/Mail.class.php'); - require(_XE_PATH_ . 'classes/page/PageHandler.class.php'); - require(_XE_PATH_ . 'classes/mobile/Mobile.class.php'); - require(_XE_PATH_ . 'classes/validator/Validator.class.php'); - require(_XE_PATH_ . 'classes/frontendfile/FrontEndFileHandler.class.php'); - require(_XE_PATH_ . 'classes/security/Password.class.php'); - require(_XE_PATH_ . 'classes/security/Security.class.php'); - require(_XE_PATH_ . 'classes/security/IpFilter.class.php'); - if(__DEBUG__) - $GLOBALS['__elapsed_class_load__'] = getMicroTime() - __ClassLoadStartTime__; + if(__DEBUG__) { + $GLOBALS['__elapsed_class_load__'] = 0; + } + + $GLOBALS['__xe_autoload_file_map'] = array_change_key_case(array( + 'CacheBase' => 'classes/cache/CacheHandler.class.php', + 'CacheHandler' => 'classes/cache/CacheHandler.class.php', + 'Context' => 'classes/context/Context.class.php', + 'DB' => 'classes/db/DB.class.php', + 'Query' => 'classes/db/queryparts/Query.class.php', + 'Subquery' => 'classes/db/queryparts/Subquery.class.php', + 'Condition' => 'classes/db/queryparts/condition/Condition.class.php', + 'ConditionGroup' => 'classes/db/queryparts/condition/ConditionGroup.class.php', + 'ConditionSubquery' => 'classes/db/queryparts/condition/ConditionSubquery.class.php', + 'ConditionWithArgument' => 'classes/db/queryparts/condition/ConditionWithArgument.class.php', + 'ConditionWithoutArgument' => 'classes/db/queryparts/condition/ConditionWithoutArgument.class.php', + 'ClickCountExpression' => 'classes/db/queryparts/expression/ClickCountExpression.class.php', + 'DeleteExpression' => 'classes/db/queryparts/expression/DeleteExpression.class.php', + 'Expression' => 'classes/db/queryparts/expression/Expression.class.php', + 'InsertExpression' => 'classes/db/queryparts/expression/InsertExpression.class.php', + 'SelectExpression' => 'classes/db/queryparts/expression/SelectExpression.class.php', + 'StarExpression' => 'classes/db/queryparts/expression/StarExpression.class.php', + 'UpdateExpression' => 'classes/db/queryparts/expression/UpdateExpression.class.php', + 'UpdateExpressionWithoutArgument' => 'classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php', + 'Limit' => 'classes/db/queryparts/limit/Limit.class.php', + 'OrderByColumn' => 'classes/db/queryparts/order/OrderByColumn.class.php', + 'CubridTableWithHint' => 'classes/db/queryparts/table/CubridTableWithHint.class.php', + 'IndexHint' => 'classes/db/queryparts/table/IndexHint.class.php', + 'JoinTable' => 'classes/db/queryparts/table/JoinTable.class.php', + 'MssqlTableWithHint' => 'classes/db/queryparts/table/MssqlTableWithHint.class.php', + 'MysqlTableWithHint' => 'classes/db/queryparts/table/MysqlTableWithHint.class.php', + 'Table' => 'classes/db/queryparts/table/Table.class.php', + 'DisplayHandler' => 'classes/display/DisplayHandler.class.php', + 'HTMLDisplayHandler' => 'classes/display/HTMLDisplayHandler.php', + 'JSCallbackDisplayHandler' => 'classes/display/JSCallbackDisplayHandler.php', + 'JSONDisplayHandler' => 'classes/display/JSONDisplayHandler.php', + 'VirtualXMLDisplayHandler' => 'classes/display/VirtualXMLDisplayHandler.php', + 'XMLDisplayHandler' => 'classes/display/XMLDisplayHandler.php', + 'EditorHandler' => 'classes/editor/EditorHandler.class.php', + 'ExtraVar' => 'classes/extravar/Extravar.class.php', + 'ExtraItem' => 'classes/extravar/Extravar.class.php', + 'FileHandler' => 'classes/file/FileHandler.class.php', + 'FileObject' => 'classes/file/FileObject.class.php', + 'FrontEndFileHandler' => 'classes/frontendfile/FrontEndFileHandler.class.php', + 'Handler' => 'classes/handler/Handler.class.php', + 'XEHttpRequest' => 'classes/httprequest/XEHttpRequest.class.php', + 'Mail' => 'classes/mail/Mail.class.php', + 'Mobile' => 'classes/mobile/Mobile.class.php', + 'ModuleHandler' => 'classes/module/ModuleHandler.class.php', + 'ModuleObject' => 'classes/module/ModuleObject.class.php', + 'Object' => 'classes/object/Object.class.php', + 'PageHandler' => 'classes/page/PageHandler.class.php', + 'EmbedFilter' => 'classes/security/EmbedFilter.class.php', + 'IpFilter' => 'classes/security/IpFilter.class.php', + 'Password' => 'classes/security/Password.class.php', + 'Purifier' => 'classes/security/Purifier.class.php', + 'Security' => 'classes/security/Security.class.php', + 'UploadFileFilter' => 'classes/security/UploadFileFilter.class.php', + 'TemplateHandler' => 'classes/template/TemplateHandler.class.php', + 'Validator' => 'classes/validator/Validator.class.php', + 'WidgetHandler' => 'classes/widget/WidgetHandler.class.php', + 'GeneralXmlParser' => 'classes/widget/GeneralXmlParser.class.php', + 'Xml_Node_' => 'classes/xml/XmlParser.class.php', + 'XmlGenerator' => 'classes/xml/XmlGenerator.class.php', + 'XmlJsFilter' => 'classes/xml/XmlJsFilter.class.php', + 'XmlLangParser' => 'classes/xml/XmlLangParser.class.php', + 'XmlParser' => 'classes/xml/XmlParser.class.php', + 'XmlQueryParser' => 'classes/xml/XmlQueryParser.class.php', + 'DBParser' => 'classes/xml/xmlquery/DBParser.class.php', + 'QueryParser' => 'classes/xml/xmlquery/QueryParser.class.php', + 'Argument' => 'classes/xml/xmlquery/argument/Argument.class.php', + 'ConditionArgument' => 'classes/xml/xmlquery/argument/ConditionArgument.class.php', + 'SortArgument' => 'classes/xml/xmlquery/argument/SortArgument.class.php', + 'DefaultValue' => 'classes/xml/xmlquery/queryargument/DefaultValue.class.php', + 'QueryArgument' => 'classes/xml/xmlquery/queryargument/QueryArgument.class.php', + 'SortQueryArgument' => 'classes/xml/xmlquery/queryargument/SortQueryArgument.class.php', + 'QueryArgumentValidator' => 'classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php', + 'ColumnTag' => 'classes/xml/xmlquery/tags/column/ColumnTag.class.php', + 'InsertColumnTag' => 'classes/xml/xmlquery/tags/column/InsertColumnTag.class.php', + 'InsertColumnTagWithoutArgument' => 'classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php', + 'InsertColumnsTag' => 'classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php', + 'SelectColumnTag' => 'classes/xml/xmlquery/tags/column/SelectColumnTag.class.php', + 'SelectColumnsTag' => 'classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php', + 'UpdateColumnTag' => 'classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php', + 'UpdateColumnsTag' => 'classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php', + 'ConditionGroupTag' => 'classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php', + 'ConditionTag' => 'classes/xml/xmlquery/tags/condition/ConditionTag.class.php', + 'ConditionsTag' => 'classes/xml/xmlquery/tags/condition/ConditionsTag.class.php', + 'JoinConditionsTag' => 'classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php', + 'GroupsTag' => 'classes/xml/xmlquery/tags/group/GroupsTag.class.php', + 'IndexTag' => 'classes/xml/xmlquery/tags/navigation/IndexTag.class.php', + 'LimitTag' => 'classes/xml/xmlquery/tags/navigation/LimitTag.class.php', + 'NavigationTag' => 'classes/xml/xmlquery/tags/navigation/NavigationTag.class.php', + 'QueryTag' => 'classes/xml/xmlquery/tags/query/QueryTag.class.php', + 'HintTableTag' => 'classes/xml/xmlquery/tags/table/HintTableTag.class.php', + 'TableTag' => 'classes/xml/xmlquery/tags/table/TableTag.class.php', + 'TablesTag' => 'classes/xml/xmlquery/tags/table/TablesTag.class.php', + ), CASE_LOWER); + + function __xe_autoload($class_name) + { + if(__DEBUG__) { + $time_at = getMicroTime(); + } + + if(isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) + { + require _XE_PATH_ . $GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; + } + elseif(preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) + { + $candidate_filename = array(); + $candidate_filename[] = 'modules/' . $matches[1] . '/' . $matches[1]; + if(isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; + $candidate_filename[] = (isset($matches[3]) && $matches[3]) ? strtolower($matches[3]) : 'class'; + $candidate_filename[] = 'php'; + + $candidate_filename = implode('.', $candidate_filename); + + if(file_exists(_XE_PATH_ . $candidate_filename)) + { + require _XE_PATH_ . $candidate_filename; + } + } + + if(__DEBUG__) { + $GLOBALS['__elapsed_class_load__'] += getMicroTime() - $time_at; + } + } + spl_autoload_register('__xe_autoload'); + + if(file_exists(_XE_PATH_ . '/vendor/autoload.php')) { + require _XE_PATH_ . '/vendor/autoload.php'; + } + + } /* End of file config.inc.php */ /* Location: ./config/config.inc.php */ diff --git a/layouts/xedition/layout.html b/layouts/xedition/layout.html index b36964f13..34bc614d3 100644 --- a/layouts/xedition/layout.html +++ b/layouts/xedition/layout.html @@ -15,7 +15,7 @@ {@ $sub_header_title = $module_info->browser_title} - {@ $_enable_slide = true} + {@ $_enable_slide = false} {@ $_enable_unb = false} {@ $_sample_slide = false} {@ $_sample_footer = false} @@ -29,9 +29,13 @@ {@ $layout_info->use_slide = 'Y'} {@ $layout_info->enable_intergration_search = 'Y'} + + {@ $_enable_slide = true} + {@ $_sample_slide = true} - {@ $layout_info->use_slide = 'Y'} + {@ $_enable_slide = false} + {@ $_enable_slide = true} {@ $_sample_slide = true} {@ $_sample_footer = true} diff --git a/modules/editor/components/poll_maker/tpl/popup.html b/modules/editor/components/poll_maker/tpl/popup.html index dfc62009e..605235f0e 100644 --- a/modules/editor/components/poll_maker/tpl/popup.html +++ b/modules/editor/components/poll_maker/tpl/popup.html @@ -18,8 +18,8 @@
- - + + diff --git a/modules/member/member.view.php b/modules/member/member.view.php index b70722a67..eaf6f1ec6 100644 --- a/modules/member/member.view.php +++ b/modules/member/member.view.php @@ -343,6 +343,9 @@ class memberView extends member $oDocumentAdminView = getAdminView('document'); $oDocumentAdminView->dispDocumentAdminList(); + $oSecurity = new Security(); + $oSecurity->encodeHTML('document_list...title', 'search_target', 'search_keyword'); + Context::set('module_srl', $module_srl); $this->setTemplateFile('document_list'); } diff --git a/modules/module/module.admin.controller.php b/modules/module/module.admin.controller.php index 0a1ec1bcb..c12dd10fd 100644 --- a/modules/module/module.admin.controller.php +++ b/modules/module/module.admin.controller.php @@ -685,7 +685,7 @@ class moduleAdminController extends module $args->value = trim(Context::get($key)); // if request method is json, strip slashes - if(Context::getRequestMethod() == 'JSON' && version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) + if(Context::getRequestMethod() == 'JSON' && version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $args->value = stripslashes($args->value); } diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 682c97868..e5b8097f3 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -944,7 +944,7 @@ class moduleModel extends module $info->action->{$name} = new stdClass(); $info->action->{$name}->type = $type; $info->action->{$name}->grant = $grant; - $info->action->{$name}->standalone = ($standalone == 'true') ? TRUE : FALSE; + $info->action->{$name}->standalone = $standalone; $info->action->{$name}->ruleset = $ruleset; $info->action->{$name}->method = $method; if($action->attrs->menu_name) diff --git a/modules/page/page.view.php b/modules/page/page.view.php index c07a50124..4ecf25774 100644 --- a/modules/page/page.view.php +++ b/modules/page/page.view.php @@ -179,6 +179,7 @@ class pageView extends page $filepath = preg_replace('/'.$filename."$/i","",$cache_file); $cache_file = FileHandler::getRealPath($cache_file); + $level = ob_get_level(); // Verify cache if($caching_interval <1 || !file_exists($cache_file) || filemtime($cache_file) + $caching_interval*60 <= $_SERVER['REQUEST_TIME'] || filemtime($cache_file) 0) { + $contents .= ob_get_contents(); + ob_end_clean(); + } + return $contents; } function _replacePath($matches) diff --git a/modules/trash/tpl/trash_list.html b/modules/trash/tpl/trash_list.html index b937b1085..802f5b69e 100644 --- a/modules/trash/tpl/trash_list.html +++ b/modules/trash/tpl/trash_list.html @@ -40,7 +40,6 @@ var no_text_comment = '{$lang->no_text_comment}'; - {debugPrint($oTrashVO->unserializedObject)} {$lang->document}{$lang->comment} {$lang->no_text_comment} diff --git a/tests/Install.suite.dist.yml b/tests/Install.suite.dist.yml new file mode 100644 index 000000000..b217a1c35 --- /dev/null +++ b/tests/Install.suite.dist.yml @@ -0,0 +1,28 @@ +class_name: InstallTester +modules: + enabled: [Db, PhpBrowser, DbDropTablesHelper, InstallHelper, Filesystem] + config: + PhpBrowser: + url: 'http://localhost:8000/' + DbDropTablesHelper: + dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + user: 'root' + password: 'root' + Db: + dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + user: 'root' + password: 'root' + cleanup: true +env: + travis: + modules: + config: + Db: + dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + user: 'travis' + password: 'travis' + cleanup: true + DbDropTablesHelper: + dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + user: 'travis' + password: 'travis' diff --git a/tests/Install/AutoinstallCept.php b/tests/Install/AutoinstallCept.php new file mode 100644 index 000000000..91b244ff2 --- /dev/null +++ b/tests/Install/AutoinstallCept.php @@ -0,0 +1,63 @@ +env) ? Configuration::suiteSettings('Install', Configuration::config()) : Configuration::suiteEnvironments('Install')[$this->env]; + +$db_config = $config['modules']['config']['Db']; + +$dsn = $db_config['dsn']; +$dsn = split('[;:]', $dsn); +$db_type = array_shift($dsn); +$dbinfo = [ + 'type' => $db_type, + 'user' => $db_config['user'], + 'password' => $db_config['password'], + 'port' => ((isset($db_config['port']) && $db_config['port'])?: 3306), +]; +foreach($dsn as $piece) { + list($key, $val) = explode('=', $piece); + $dbinfo[$key] = $val; +} + +$install_config = array( + 'db_type' => $dbinfo['type'], + 'db_port' => $dbinfo['port'], + 'db_hostname' => $dbinfo['host'], + 'db_userid' => $dbinfo['user'], + 'db_password' => $dbinfo['password'], + 'db_database' => $dbinfo['dbname'], + 'db_table_prefix' =>'xe_', + 'use_rewrite' =>'N', + 'time_zone' =>'0900', + 'email_address' =>'admin@admin.net', + 'password' =>'admin', + 'password2' =>'admin', + 'nick_name' =>'admin', + 'user_id' =>'admin', + 'lang_type' => 'ko', +); + +$install_config = '<' . '?php $install_config = ' . var_export($install_config, true) . ';'; + +$I->wantTo('Auto install'); +$I->writeToFile(_XE_PATH_ . 'config/install.config.php', $install_config); +$I->amOnPage('/'); + +$I->dontSeeElement('//div[@id="progress"]/ul/li'); +$I->amOnPage('/index.php?act=dispMemberLoginForm'); + +$I->fillField('user_id', 'admin@admin.net'); +$I->submitForm('.login-body form', [ + 'act' => 'procMemberLogin', + 'user_id' => 'admin@admin.net', + 'password' => 'admin', + 'success_return_url' => '/index.php?module=admin' +]); + +$I->seeInCurrentUrl('module=admin'); +$I->seeElement('#gnbNav'); +$I->seeElement('#content .x_page-header'); +$I->see('설치 환경 수집 동의', 'h2'); + diff --git a/tests/install/installCept.php b/tests/Install/InstallCept.php similarity index 92% rename from tests/install/installCept.php rename to tests/Install/InstallCept.php index d5c0bf171..a3e5750b7 100644 --- a/tests/install/installCept.php +++ b/tests/Install/InstallCept.php @@ -3,13 +3,13 @@ use \Codeception\Configuration; $I = new InstallTester($scenario); -$config = (!$this->env) ? Configuration::config() : Configuration::suiteEnvironments('install')[$this->env]; +$config = (!$this->env) ? Configuration::suiteSettings('Install', Configuration::config()) : Configuration::suiteEnvironments('Install')[$this->env]; + $db_config = $config['modules']['config']['Db']; $dsn = $db_config['dsn']; $dsn = split('[;:]', $dsn); $db_type = array_shift($dsn); - $dbinfo = [ 'type' => $db_type, 'user' => $db_config['user'], @@ -17,12 +17,15 @@ $dbinfo = [ 'dbname' => 'xe_install', 'port' => ((isset($db_config['port']) && $db_config['port'])?: 3306), ]; - foreach($dsn as $piece) { list($key, $val) = explode('=', $piece); $dbinfo[$key] = $val; } +if(\Filehandler::exists(_XE_PATH_ . 'config/install.config.php')) { + $I->deleteFile(_XE_PATH_ . 'config/install.config.php'); +} + // Step 1 $I->wantTo('Install XE Core'); $I->amOnPage('/index.php?l=ko'); @@ -86,7 +89,6 @@ $I->submitForm('#content form', [ ]); // Step 9 -$I->wantTo('completed'); $I->dontSeeElement('//div[@id="progress"]/ul/li'); $I->amOnPage('/index.php?act=dispMemberLoginForm'); diff --git a/tests/install/InstallTester.php b/tests/Install/InstallTester.php similarity index 80% rename from tests/install/InstallTester.php rename to tests/Install/InstallTester.php index fe24ccae1..1e1aef6fa 100644 --- a/tests/install/InstallTester.php +++ b/tests/Install/InstallTester.php @@ -1,12 +1,15 @@ -haveInDatabase('users', array('name' => 'miles', 'email' => 'miles@davis.com')); + * ?> + * ``` + * + * @param $table + * @param array $data + * + * @return integer $id + * @see \Codeception\Module\Db::haveInDatabase() + */ + public function haveInDatabase($table, $data) { + return $this->scenario->runStep(new \Codeception\Step\Action('haveInDatabase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if a row with given column values exists. + * Provide table name and column values. + * + * Example: + * + * ``` php + * seeInDatabase('users', array('name' => 'Davert', 'email' => 'davert@mail.com')); + * + * ``` + * Will generate: + * + * ``` sql + * SELECT COUNT(*) FROM `users` WHERE `name` = 'Davert' AND `email` = 'davert@mail.com' + * ``` + * Fails if no such user found. + * + * @param $table + * @param array $criteria + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Db::seeInDatabase() + */ + public function canSeeInDatabase($table, $criteria = null) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInDatabase', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if a row with given column values exists. + * Provide table name and column values. + * + * Example: + * + * ``` php + * seeInDatabase('users', array('name' => 'Davert', 'email' => 'davert@mail.com')); + * + * ``` + * Will generate: + * + * ``` sql + * SELECT COUNT(*) FROM `users` WHERE `name` = 'Davert' AND `email` = 'davert@mail.com' + * ``` + * Fails if no such user found. + * + * @param $table + * @param array $criteria + * @see \Codeception\Module\Db::seeInDatabase() + */ + public function seeInDatabase($table, $criteria = null) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInDatabase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Effect is opposite to ->seeInDatabase + * + * Checks if there is no record with such column values in database. + * Provide table name and column values. + * + * Example: + * + * ``` php + * dontSeeInDatabase('users', array('name' => 'Davert', 'email' => 'davert@mail.com')); + * + * ``` + * Will generate: + * + * ``` sql + * SELECT COUNT(*) FROM `users` WHERE `name` = 'Davert' AND `email` = 'davert@mail.com' + * ``` + * Fails if such user was found. + * + * @param $table + * @param array $criteria + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Db::dontSeeInDatabase() + */ + public function cantSeeInDatabase($table, $criteria = null) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInDatabase', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Effect is opposite to ->seeInDatabase + * + * Checks if there is no record with such column values in database. + * Provide table name and column values. + * + * Example: + * + * ``` php + * dontSeeInDatabase('users', array('name' => 'Davert', 'email' => 'davert@mail.com')); + * + * ``` + * Will generate: + * + * ``` sql + * SELECT COUNT(*) FROM `users` WHERE `name` = 'Davert' AND `email` = 'davert@mail.com' + * ``` + * Fails if such user was found. + * + * @param $table + * @param array $criteria + * @see \Codeception\Module\Db::dontSeeInDatabase() + */ + public function dontSeeInDatabase($table, $criteria = null) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInDatabase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fetches a single column value from a database. + * Provide table name, desired column and criteria. + * + * Example: + * + * ``` php + * grabFromDatabase('users', 'email', array('name' => 'Davert')); + * + * ``` + * + * @version 1.1 + * + * @param $table + * @param $column + * @param array $criteria + * + * @return mixed + * @see \Codeception\Module\Db::grabFromDatabase() + */ + public function grabFromDatabase($table, $column, $criteria = null) { + return $this->scenario->runStep(new \Codeception\Step\Action('grabFromDatabase', func_get_args())); + } + + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1915,4 +2086,348 @@ class InstallTester extends \Codeception\Actor public function dontSeeInTitle($title) { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\DbDropTablesHelper::cleanup() + */ + public function cleanup() { + return $this->scenario->runStep(new \Codeception\Step\Action('cleanup', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Enters a directory In local filesystem. + * Project root directory is used by default + * + * @param $path + * @see \Codeception\Module\Filesystem::amInPath() + */ + public function amInPath($path) { + return $this->scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Opens a file and stores it's content. + * + * Usage: + * + * ``` php + * openFile('composer.json'); + * $I->seeInThisFile('codeception/codeception'); + * ?> + * ``` + * + * @param $filename + * @see \Codeception\Module\Filesystem::openFile() + */ + public function openFile($filename) { + return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Deletes a file + * + * ``` php + * deleteFile('composer.lock'); + * ?> + * ``` + * + * @param $filename + * @see \Codeception\Module\Filesystem::deleteFile() + */ + public function deleteFile($filename) { + return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Deletes directory with all subdirectories + * + * ``` php + * deleteDir('vendor'); + * ?> + * ``` + * + * @param $dirname + * @see \Codeception\Module\Filesystem::deleteDir() + */ + public function deleteDir($dirname) { + return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Copies directory with all contents + * + * ``` php + * copyDir('vendor','old_vendor'); + * ?> + * ``` + * + * @param $src + * @param $dst + * @see \Codeception\Module\Filesystem::copyDir() + */ + public function copyDir($src, $dst) { + return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks If opened file has `text` in it. + * + * Usage: + * + * ``` php + * openFile('composer.json'); + * $I->seeInThisFile('codeception/codeception'); + * ?> + * ``` + * + * @param $text + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Filesystem::seeInThisFile() + */ + public function canSeeInThisFile($text) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks If opened file has `text` in it. + * + * Usage: + * + * ``` php + * openFile('composer.json'); + * $I->seeInThisFile('codeception/codeception'); + * ?> + * ``` + * + * @param $text + * @see \Codeception\Module\Filesystem::seeInThisFile() + */ + public function seeInThisFile($text) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks the strict matching of file contents. + * Unlike `seeInThisFile` will fail if file has something more than expected lines. + * Better to use with HEREDOC strings. + * Matching is done after removing "\r" chars from file content. + * + * ``` php + * openFile('process.pid'); + * $I->seeFileContentsEqual('3192'); + * ?> + * ``` + * + * @param $text + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Filesystem::seeFileContentsEqual() + */ + public function canSeeFileContentsEqual($text) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks the strict matching of file contents. + * Unlike `seeInThisFile` will fail if file has something more than expected lines. + * Better to use with HEREDOC strings. + * Matching is done after removing "\r" chars from file content. + * + * ``` php + * openFile('process.pid'); + * $I->seeFileContentsEqual('3192'); + * ?> + * ``` + * + * @param $text + * @see \Codeception\Module\Filesystem::seeFileContentsEqual() + */ + public function seeFileContentsEqual($text) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks If opened file doesn't contain `text` in it + * + * ``` php + * openFile('composer.json'); + * $I->dontSeeInThisFile('codeception/codeception'); + * ?> + * ``` + * + * @param $text + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Filesystem::dontSeeInThisFile() + */ + public function cantSeeInThisFile($text) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks If opened file doesn't contain `text` in it + * + * ``` php + * openFile('composer.json'); + * $I->dontSeeInThisFile('codeception/codeception'); + * ?> + * ``` + * + * @param $text + * @see \Codeception\Module\Filesystem::dontSeeInThisFile() + */ + public function dontSeeInThisFile($text) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Deletes a file + * @see \Codeception\Module\Filesystem::deleteThisFile() + */ + public function deleteThisFile() { + return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if file exists in path. + * Opens a file when it's exists + * + * ``` php + * seeFileFound('UserModel.php','app/models'); + * ?> + * ``` + * + * @param $filename + * @param string $path + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Filesystem::seeFileFound() + */ + public function canSeeFileFound($filename, $path = null) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if file exists in path. + * Opens a file when it's exists + * + * ``` php + * seeFileFound('UserModel.php','app/models'); + * ?> + * ``` + * + * @param $filename + * @param string $path + * @see \Codeception\Module\Filesystem::seeFileFound() + */ + public function seeFileFound($filename, $path = null) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if file does not exists in path + * + * @param $filename + * @param string $path + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\Filesystem::dontSeeFileFound() + */ + public function cantSeeFileFound($filename, $path = null) { + return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if file does not exists in path + * + * @param $filename + * @param string $path + * @see \Codeception\Module\Filesystem::dontSeeFileFound() + */ + public function dontSeeFileFound($filename, $path = null) { + return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Erases directory contents + * + * ``` php + * cleanDir('logs'); + * ?> + * ``` + * + * @param $dirname + * @see \Codeception\Module\Filesystem::cleanDir() + */ + public function cleanDir($dirname) { + return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Saves contents to file + * + * @param $filename + * @param $contents + * @see \Codeception\Module\Filesystem::writeToFile() + */ + public function writeToFile($filename, $contents) { + return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args())); + } } diff --git a/tests/acceptance/_bootstrap.php b/tests/Install/_bootstrap.php similarity index 100% rename from tests/acceptance/_bootstrap.php rename to tests/Install/_bootstrap.php diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php index a778b4088..21bf1735c 100644 --- a/tests/_bootstrap.php +++ b/tests/_bootstrap.php @@ -2,7 +2,7 @@ // This is global bootstrap for autoloading if(!defined('__XE__')) define('__XE__', true); if(!defined('_XE_PATH_')) define('_XE_PATH_', realpath(dirname(__FILE__).'/../').'/'); -error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING ^ E_STRICT); +require_once _XE_PATH_.'config/config.inc.php'; function _debug() { $args = func_get_args(); diff --git a/tests/_support/AcceptanceHelper.php b/tests/_support/AcceptanceHelper.php deleted file mode 100644 index ed5f2393d..000000000 --- a/tests/_support/AcceptanceHelper.php +++ /dev/null @@ -1,10 +0,0 @@ -driver->getDbh(); + if (!$dbh) { + throw new ModuleConfigException( + __CLASS__, + "No connection to database. Remove this module from config if you don't need database repopulation" + ); + } + + try { + $this->driver->cleanup(); + } catch (\Exception $e) { + throw new ModuleException(__CLASS__, $e->getMessage()); + } + } +} diff --git a/tests/_support/FunctionalHelper.php b/tests/_support/FunctionalHelper.php deleted file mode 100644 index 00207a24b..000000000 --- a/tests/_support/FunctionalHelper.php +++ /dev/null @@ -1,10 +0,0 @@ -setHeader('X-Requested-With', 'Codeception'); - * $I->amOnPage('test-headers.php'); - * ?> - * ``` - * - * @param string $name the name of the request header - * @param string $value the value to set it to for subsequent - * requests - * @see \Codeception\Module\PhpBrowser::setHeader() - */ - public function setHeader($name, $value) { - return $this->scenario->runStep(new \Codeception\Step\Action('setHeader', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Deletes the header with the passed name. Subsequent requests - * will not have the deleted header in its request. - * - * Example: - * ```php - * setHeader('X-Requested-With', 'Codeception'); - * $I->amOnPage('test-headers.php'); - * // ... - * $I->deleteHeader('X-Requested-With'); - * $I->amOnPage('some-other-page.php'); - * ?> - * ``` - * - * @param string $name the name of the header to delete. - * @see \Codeception\Module\PhpBrowser::deleteHeader() - */ - public function deleteHeader($name) { - return $this->scenario->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Authenticates user for HTTP_AUTH - * - * @param $username - * @param $password - * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated() - */ - public function amHttpAuthenticated($username, $password) { - return $this->scenario->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Opens the page for the given relative URI. - * - * ``` php - * amOnPage('/'); - * // opens /register page - * $I->amOnPage('/register'); - * ?> - * ``` - * - * @param $page - * @see \Codeception\Module\PhpBrowser::amOnPage() - */ - public function amOnPage($page) { - return $this->scenario->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Open web page at the given absolute URL and sets its hostname as the base host. - * - * ``` php - * amOnUrl('http://codeception.com'); - * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart - * ?> - * ``` - * @see \Codeception\Module\PhpBrowser::amOnUrl() - */ - public function amOnUrl($url) { - return $this->scenario->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Changes the subdomain for the 'url' configuration parameter. - * Does not open a page; use `amOnPage` for that. - * - * ``` php - * amOnSubdomain('user'); - * $I->amOnPage('/'); - * // moves to http://user.mysite.com/ - * ?> - * ``` - * - * @param $subdomain - * - * @return mixed - * @see \Codeception\Module\PhpBrowser::amOnSubdomain() - */ - public function amOnSubdomain($subdomain) { - return $this->scenario->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Low-level API method. - * If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly - * - * Example: - * - * ``` php - * executeInGuzzle(function (\GuzzleHttp\Client $client) { - * $client->get('/get', ['query' => ['foo' => 'bar']]); - * }); - * ?> - * ``` - * - * It is not recommended to use this command on a regular basis. - * If Codeception lacks important Guzzle Client methods, implement them and submit patches. - * - * @param callable $function - * @see \Codeception\Module\PhpBrowser::executeInGuzzle() - */ - public function executeInGuzzle($function) { - return $this->scenario->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Perform a click on a link or a button, given by a locator. - * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. - * For buttons, the "value" attribute, "name" attribute, and inner text are searched. - * For links, the link text is searched. - * For images, the "alt" attribute and inner text of any parent links are searched. - * - * The second parameter is a context (CSS or XPath locator) to narrow the search. - * - * Note that if the locator matches a button of type `submit`, the form will be submitted. - * - * ``` php - * click('Logout'); - * // button of form - * $I->click('Submit'); - * // CSS button - * $I->click('#form input[type=submit]'); - * // XPath - * $I->click('//form/*[@type=submit]'); - * // link in context - * $I->click('Logout', '#nav'); - * // using strict locator - * $I->click(['link' => 'Login']); - * ?> - * ``` - * - * @param $link - * @param $context - * @see \Codeception\Lib\InnerBrowser::click() - */ - public function click($link, $context = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('click', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string. - * Specify a locator as the second parameter to match a specific region. - * - * ``` php - * see('Logout'); // I can suppose user is logged in - * $I->see('Sign Up','h1'); // I can suppose it's a signup page - * $I->see('Sign Up','//body/h1'); // with XPath - * ?> - * ``` - * - * @param $text - * @param null $selector - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::see() - */ - public function canSee($text, $selector = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page contains the given string. - * Specify a locator as the second parameter to match a specific region. - * - * ``` php - * see('Logout'); // I can suppose user is logged in - * $I->see('Sign Up','h1'); // I can suppose it's a signup page - * $I->see('Sign Up','//body/h1'); // with XPath - * ?> - * ``` - * - * @param $text - * @param null $selector - * @see \Codeception\Lib\InnerBrowser::see() - */ - public function see($text, $selector = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('see', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page doesn't contain the text specified. - * Give a locator as the second parameter to match a specific region. - * - * ```php - * dontSee('Login'); // I can suppose user is already logged in - * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page - * $I->dontSee('Sign Up','//body/h1'); // with XPath - * ?> - * ``` - * - * @param $text - * @param null $selector - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSee() - */ - public function cantSee($text, $selector = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current page doesn't contain the text specified. - * Give a locator as the second parameter to match a specific region. - * - * ```php - * dontSee('Login'); // I can suppose user is already logged in - * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page - * $I->dontSee('Sign Up','//body/h1'); // with XPath - * ?> - * ``` - * - * @param $text - * @param null $selector - * @see \Codeception\Lib\InnerBrowser::dontSee() - */ - public function dontSee($text, $selector = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there's a link with the specified text. - * Give a full URL as the second parameter to match links with that exact URL. - * - * ``` php - * seeLink('Logout'); // matches Logout - * $I->seeLink('Logout','/logout'); // matches Logout - * ?> - * ``` - * - * @param $text - * @param null $url - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeLink() - */ - public function canSeeLink($text, $url = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there's a link with the specified text. - * Give a full URL as the second parameter to match links with that exact URL. - * - * ``` php - * seeLink('Logout'); // matches Logout - * $I->seeLink('Logout','/logout'); // matches Logout - * ?> - * ``` - * - * @param $text - * @param null $url - * @see \Codeception\Lib\InnerBrowser::seeLink() - */ - public function seeLink($text, $url = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page doesn't contain a link with the given string. - * If the second parameter is given, only links with a matching "href" attribute will be checked. - * - * ``` php - * dontSeeLink('Logout'); // I suppose user is not logged in - * $I->dontSeeLink('Checkout now', '/store/cart.php'); - * ?> - * ``` - * - * @param $text - * @param null $url - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeLink() - */ - public function cantSeeLink($text, $url = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page doesn't contain a link with the given string. - * If the second parameter is given, only links with a matching "href" attribute will be checked. - * - * ``` php - * dontSeeLink('Logout'); // I suppose user is not logged in - * $I->dontSeeLink('Checkout now', '/store/cart.php'); - * ?> - * ``` - * - * @param $text - * @param null $url - * @see \Codeception\Lib\InnerBrowser::dontSeeLink() - */ - public function dontSeeLink($text, $url = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current URI contains the given string. - * - * ``` php - * seeInCurrentUrl('home'); - * // to match: /users/1 - * $I->seeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() - */ - public function canSeeInCurrentUrl($uri) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current URI contains the given string. - * - * ``` php - * seeInCurrentUrl('home'); - * // to match: /users/1 - * $I->seeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() - */ - public function seeInCurrentUrl($uri) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URI doesn't contain the given string. - * - * ``` php - * dontSeeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() - */ - public function cantSeeInCurrentUrl($uri) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URI doesn't contain the given string. - * - * ``` php - * dontSeeInCurrentUrl('/users/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() - */ - public function dontSeeInCurrentUrl($uri) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL is equal to the given string. - * Unlike `seeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * seeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() - */ - public function canSeeCurrentUrlEquals($uri) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL is equal to the given string. - * Unlike `seeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * seeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() - */ - public function seeCurrentUrlEquals($uri) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL doesn't equal the given string. - * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * dontSeeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() - */ - public function cantSeeCurrentUrlEquals($uri) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL doesn't equal the given string. - * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. - * - * ``` php - * dontSeeCurrentUrlEquals('/'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() - */ - public function dontSeeCurrentUrlEquals($uri) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL matches the given regular expression. - * - * ``` php - * seeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() - */ - public function canSeeCurrentUrlMatches($uri) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the current URL matches the given regular expression. - * - * ``` php - * seeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() - */ - public function seeCurrentUrlMatches($uri) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current url doesn't match the given regular expression. - * - * ``` php - * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() - */ - public function cantSeeCurrentUrlMatches($uri) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that current url doesn't match the given regular expression. - * - * ``` php - * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); - * ?> - * ``` - * - * @param $uri - * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() - */ - public function dontSeeCurrentUrlMatches($uri) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Executes the given regular expression against the current URI and returns the first match. - * If no parameters are provided, the full URI is returned. - * - * ``` php - * grabFromCurrentUrl('~$/user/(\d+)/~'); - * $uri = $I->grabFromCurrentUrl(); - * ?> - * ``` - * - * @param null $uri - * - * @internal param $url - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() - */ - public function grabFromCurrentUrl($uri = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the specified checkbox is checked. - * - * ``` php - * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. - * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); - * ?> - * ``` - * - * @param $checkbox - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() - */ - public function canSeeCheckboxIsChecked($checkbox) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the specified checkbox is checked. - * - * ``` php - * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. - * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); - * ?> - * ``` - * - * @param $checkbox - * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() - */ - public function seeCheckboxIsChecked($checkbox) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Check that the specified checkbox is unchecked. - * - * ``` php - * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. - * ?> - * ``` - * - * @param $checkbox - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() - */ - public function cantSeeCheckboxIsChecked($checkbox) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Check that the specified checkbox is unchecked. - * - * ``` php - * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms - * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. - * ?> - * ``` - * - * @param $checkbox - * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() - */ - public function dontSeeCheckboxIsChecked($checkbox) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given input field or textarea contains the given value. - * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. - * - * ``` php - * seeInField('Body','Type your comment here'); - * $I->seeInField('form textarea[name=body]','Type your comment here'); - * $I->seeInField('form input[type=hidden]','hidden_value'); - * $I->seeInField('#searchform input','Search'); - * $I->seeInField('//form/*[@name=search]','Search'); - * $I->seeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInField() - */ - public function canSeeInField($field, $value) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given input field or textarea contains the given value. - * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. - * - * ``` php - * seeInField('Body','Type your comment here'); - * $I->seeInField('form textarea[name=body]','Type your comment here'); - * $I->seeInField('form input[type=hidden]','hidden_value'); - * $I->seeInField('#searchform input','Search'); - * $I->seeInField('//form/*[@name=search]','Search'); - * $I->seeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * @see \Codeception\Lib\InnerBrowser::seeInField() - */ - public function seeInField($field, $value) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that an input field or textarea doesn't contain the given value. - * For fuzzy locators, the field is matched by label text, CSS and XPath. - * - * ``` php - * dontSeeInField('Body','Type your comment here'); - * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); - * $I->dontSeeInField('form input[type=hidden]','hidden_value'); - * $I->dontSeeInField('#searchform input','Search'); - * $I->dontSeeInField('//form/*[@name=search]','Search'); - * $I->dontSeeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInField() - */ - public function cantSeeInField($field, $value) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that an input field or textarea doesn't contain the given value. - * For fuzzy locators, the field is matched by label text, CSS and XPath. - * - * ``` php - * dontSeeInField('Body','Type your comment here'); - * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); - * $I->dontSeeInField('form input[type=hidden]','hidden_value'); - * $I->dontSeeInField('#searchform input','Search'); - * $I->dontSeeInField('//form/*[@name=search]','Search'); - * $I->dontSeeInField(['name' => 'search'], 'Search'); - * ?> - * ``` - * - * @param $field - * @param $value - * @see \Codeception\Lib\InnerBrowser::dontSeeInField() - */ - public function dontSeeInField($field, $value) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are set on the form matched with the - * passed selector. - * - * ``` php - * seeInFormFields('form[name=myform]', [ - * 'input1' => 'value', - * 'input2' => 'other value', - * ]); - * ?> - * ``` - * - * For multi-select elements, or to check values of multiple elements with the same name, an - * array may be passed: - * - * ``` php - * seeInFormFields('.form-class', [ - * 'multiselect' => [ - * 'value1', - * 'value2', - * ], - * 'checkbox[]' => [ - * 'a checked value', - * 'another checked value', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * seeInFormFields('#form-id', [ - * 'checkbox1' => true, // passes if checked - * 'checkbox2' => false, // passes if unchecked - * ]); - * ?> - * ``` - * - * Pair this with submitForm for quick testing magic. - * - * ``` php - * 'value', - * 'field2' => 'another value', - * 'checkbox1' => true, - * // ... - * ]; - * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); - * // $I->amOnPage('/path/to/form-page') may be needed - * $I->seeInFormFields('//form[@id=my-form]', $form); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInFormFields() - */ - public function canSeeInFormFields($formSelector, $params) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are set on the form matched with the - * passed selector. - * - * ``` php - * seeInFormFields('form[name=myform]', [ - * 'input1' => 'value', - * 'input2' => 'other value', - * ]); - * ?> - * ``` - * - * For multi-select elements, or to check values of multiple elements with the same name, an - * array may be passed: - * - * ``` php - * seeInFormFields('.form-class', [ - * 'multiselect' => [ - * 'value1', - * 'value2', - * ], - * 'checkbox[]' => [ - * 'a checked value', - * 'another checked value', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * seeInFormFields('#form-id', [ - * 'checkbox1' => true, // passes if checked - * 'checkbox2' => false, // passes if unchecked - * ]); - * ?> - * ``` - * - * Pair this with submitForm for quick testing magic. - * - * ``` php - * 'value', - * 'field2' => 'another value', - * 'checkbox1' => true, - * // ... - * ]; - * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); - * // $I->amOnPage('/path/to/form-page') may be needed - * $I->seeInFormFields('//form[@id=my-form]', $form); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * @see \Codeception\Lib\InnerBrowser::seeInFormFields() - */ - public function seeInFormFields($formSelector, $params) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are not set on the form matched with - * the passed selector. - * - * ``` php - * dontSeeInFormFields('form[name=myform]', [ - * 'input1' => 'non-existent value', - * 'input2' => 'other non-existent value', - * ]); - * ?> - * ``` - * - * To check that an element hasn't been assigned any one of many values, an array can be passed - * as the value: - * - * ``` php - * dontSeeInFormFields('.form-class', [ - * 'fieldName' => [ - * 'This value shouldn\'t be set', - * 'And this value shouldn\'t be set', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * dontSeeInFormFields('#form-id', [ - * 'checkbox1' => true, // fails if checked - * 'checkbox2' => false, // fails if unchecked - * ]); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() - */ - public function cantSeeInFormFields($formSelector, $params) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if the array of form parameters (name => value) are not set on the form matched with - * the passed selector. - * - * ``` php - * dontSeeInFormFields('form[name=myform]', [ - * 'input1' => 'non-existent value', - * 'input2' => 'other non-existent value', - * ]); - * ?> - * ``` - * - * To check that an element hasn't been assigned any one of many values, an array can be passed - * as the value: - * - * ``` php - * dontSeeInFormFields('.form-class', [ - * 'fieldName' => [ - * 'This value shouldn\'t be set', - * 'And this value shouldn\'t be set', - * ], - * ]); - * ?> - * ``` - * - * Additionally, checkbox values can be checked with a boolean. - * - * ``` php - * dontSeeInFormFields('#form-id', [ - * 'checkbox1' => true, // fails if checked - * 'checkbox2' => false, // fails if unchecked - * ]); - * ?> - * ``` - * - * @param $formSelector - * @param $params - * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() - */ - public function dontSeeInFormFields($formSelector, $params) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Submits the given form on the page, optionally with the given form values. - * Give the form fields values as an array. - * - * Skipped fields will be filled by their values from the page. - * You don't need to click the 'Submit' button afterwards. - * This command itself triggers the request to form's action. - * - * You can optionally specify what button's value to include - * in the request with the last parameter as an alternative to - * explicitly setting its value in the second parameter, as - * button values are not otherwise included in the request. - * - * Examples: - * - * ``` php - * submitForm('#login', array('login' => 'davert', 'password' => '123456')); - * // or - * $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'), 'submitButtonName'); - * - * ``` - * - * For example, given this sample "Sign Up" form: - * - * ``` html - *
- * Login:
- * Password:
- * Do you agree to out terms?
- * Select pricing plan - * - *
- * ``` - * - * You could write the following to submit it: - * - * ``` php - * submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)), 'submitButton'); - * - * ``` - * Note that "2" will be the submitted value for the "plan" field, as it is the selected option. - * - * You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm. - * - * ```php - * submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true))); - * - * ``` - * - * Pair this with seeInFormFields for quick testing magic. - * - * ``` php - * 'value', - * 'field2' => 'another value', - * 'checkbox1' => true, - * // ... - * ]; - * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); - * // $I->amOnPage('/path/to/form-page') may be needed - * $I->seeInFormFields('//form[@id=my-form]', $form); - * ?> - * ``` - * - * Parameter values can be set to arrays for multiple input fields - * of the same name, or multi-select combo boxes. For checkboxes, - * either the string value can be used, or boolean values which will - * be replaced by the checkbox's value in the DOM. - * - * ``` php - * submitForm('#my-form', [ - * 'field1' => 'value', - * 'checkbox' => [ - * 'value of first checkbox', - * 'value of second checkbox, - * ], - * 'otherCheckboxes' => [ - * true, - * false, - * false - * ], - * 'multiselect' => [ - * 'first option value', - * 'second option value' - * ] - * ]); - * ?> - * ``` - * - * Mixing string and boolean values for a checkbox's value is not - * supported and may produce unexpected results. - * - * @param $selector - * @param $params - * @param $button - * @see \Codeception\Lib\InnerBrowser::submitForm() - */ - public function submitForm($selector, $params, $button = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Fills a text field or textarea with the given string. - * - * ``` php - * fillField("//input[@type='text']", "Hello World!"); - * $I->fillField(['name' => 'email'], 'jon@mail.com'); - * ?> - * ``` - * - * @param $field - * @param $value - * @see \Codeception\Lib\InnerBrowser::fillField() - */ - public function fillField($field, $value) { - return $this->scenario->runStep(new \Codeception\Step\Action('fillField', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Selects an option in a select tag or in radio button group. - * - * ``` php - * selectOption('form select[name=account]', 'Premium'); - * $I->selectOption('form input[name=payment]', 'Monthly'); - * $I->selectOption('//form/select[@name=account]', 'Monthly'); - * ?> - * ``` - * - * Provide an array for the second argument to select multiple options: - * - * ``` php - * selectOption('Which OS do you use?', array('Windows','Linux')); - * ?> - * ``` - * - * @param $select - * @param $option - * @see \Codeception\Lib\InnerBrowser::selectOption() - */ - public function selectOption($select, $option) { - return $this->scenario->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Ticks a checkbox. For radio buttons, use the `selectOption` method instead. - * - * ``` php - * checkOption('#agree'); - * ?> - * ``` - * - * @param $option - * @see \Codeception\Lib\InnerBrowser::checkOption() - */ - public function checkOption($option) { - return $this->scenario->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Unticks a checkbox. - * - * ``` php - * uncheckOption('#notify'); - * ?> - * ``` - * - * @param $option - * @see \Codeception\Lib\InnerBrowser::uncheckOption() - */ - public function uncheckOption($option) { - return $this->scenario->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Attaches a file relative to the Codeception data directory to the given file upload field. - * - * ``` php - * attachFile('input[@type="file"]', 'prices.xls'); - * ?> - * ``` - * - * @param $field - * @param $filename - * @see \Codeception\Lib\InnerBrowser::attachFile() - */ - public function attachFile($field, $filename) { - return $this->scenario->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * If your page triggers an ajax request, you can perform it manually. - * This action sends a GET ajax request with specified params. - * - * See ->sendAjaxPostRequest for examples. - * - * @param $uri - * @param $params - * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() - */ - public function sendAjaxGetRequest($uri, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * If your page triggers an ajax request, you can perform it manually. - * This action sends a POST ajax request with specified params. - * Additional params can be passed as array. - * - * Example: - * - * Imagine that by clicking checkbox you trigger ajax request which updates user settings. - * We emulate that click by running this ajax request manually. - * - * ``` php - * sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST - * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET - * - * ``` - * - * @param $uri - * @param $params - * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() - */ - public function sendAjaxPostRequest($uri, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * If your page triggers an ajax request, you can perform it manually. - * This action sends an ajax request with specified method and params. - * - * Example: - * - * You need to perform an ajax request specifying the HTTP method. - * - * ``` php - * sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title')); - * - * ``` - * - * @param $method - * @param $uri - * @param $params - * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() - */ - public function sendAjaxRequest($method, $uri, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Finds and returns the text contents of the given element. - * If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression. - * - * ``` php - * grabTextFrom('h1'); - * $heading = $I->grabTextFrom('descendant-or-self::h1'); - * $value = $I->grabTextFrom('~ - * ``` - * - * @param $cssOrXPathOrRegex - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabTextFrom() - */ - public function grabTextFrom($cssOrXPathOrRegex) { - return $this->scenario->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Grabs the value of the given attribute value from the given element. - * Fails if element is not found. - * - * ``` php - * grabAttributeFrom('#tooltip', 'title'); - * ?> - * ``` - * - * - * @param $cssOrXpath - * @param $attribute - * @internal param $element - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() - */ - public function grabAttributeFrom($cssOrXpath, $attribute) { - return $this->scenario->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @param $field - * - * @return array|mixed|null|string - * @see \Codeception\Lib\InnerBrowser::grabValueFrom() - */ - public function grabValueFrom($field) { - return $this->scenario->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Sets a cookie with the given name and value. - * You can set additional cookie params like `domain`, `path`, `expire`, `secure` in array passed as last argument. - * - * ``` php - * setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); - * ?> - * ``` - * - * @param $name - * @param $val - * @param array $params - * @internal param $cookie - * @internal param $value - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::setCookie() - */ - public function setCookie($name, $val, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Grabs a cookie value. - * You can set additional cookie params like `domain`, `path` in array passed as last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::grabCookie() - */ - public function grabCookie($name, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that a cookie with the given name is set. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * ``` php - * seeCookie('PHPSESSID'); - * ?> - * ``` - * - * @param $cookie - * @param array $params - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeCookie() - */ - public function canSeeCookie($name, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that a cookie with the given name is set. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * ``` php - * seeCookie('PHPSESSID'); - * ?> - * ``` - * - * @param $cookie - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeCookie() - */ - public function seeCookie($name, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there isn't a cookie with the given name. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() - */ - public function cantSeeCookie($name, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there isn't a cookie with the given name. - * You can set additional cookie params like `domain`, `path` as array passed in last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() - */ - public function dontSeeCookie($name, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Unsets cookie with the given name. - * You can set additional cookie params like `domain`, `path` in array passed as last argument. - * - * @param $cookie - * - * @param array $params - * @return mixed - * @see \Codeception\Lib\InnerBrowser::resetCookie() - */ - public function resetCookie($name, $params = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element exists on the page and is visible. - * You can also specify expected attributes of this element. - * - * ``` php - * seeElement('.error'); - * $I->seeElement('//form/input[1]'); - * $I->seeElement('input', ['name' => 'login']); - * $I->seeElement('input', ['value' => '123456']); - * - * // strict locator in first arg, attributes in second - * $I->seeElement(['css' => 'form input'], ['name' => 'login']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * @return - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeElement() - */ - public function canSeeElement($selector, $attributes = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element exists on the page and is visible. - * You can also specify expected attributes of this element. - * - * ``` php - * seeElement('.error'); - * $I->seeElement('//form/input[1]'); - * $I->seeElement('input', ['name' => 'login']); - * $I->seeElement('input', ['value' => '123456']); - * - * // strict locator in first arg, attributes in second - * $I->seeElement(['css' => 'form input'], ['name' => 'login']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * @return - * @see \Codeception\Lib\InnerBrowser::seeElement() - */ - public function seeElement($selector, $attributes = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element is invisible or not present on the page. - * You can also specify expected attributes of this element. - * - * ``` php - * dontSeeElement('.error'); - * $I->dontSeeElement('//form/input[1]'); - * $I->dontSeeElement('input', ['name' => 'login']); - * $I->dontSeeElement('input', ['value' => '123456']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeElement() - */ - public function cantSeeElement($selector, $attributes = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given element is invisible or not present on the page. - * You can also specify expected attributes of this element. - * - * ``` php - * dontSeeElement('.error'); - * $I->dontSeeElement('//form/input[1]'); - * $I->dontSeeElement('input', ['name' => 'login']); - * $I->dontSeeElement('input', ['value' => '123456']); - * ?> - * ``` - * - * @param $selector - * @param array $attributes - * @see \Codeception\Lib\InnerBrowser::dontSeeElement() - */ - public function dontSeeElement($selector, $attributes = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there are a certain number of elements matched by the given locator on the page. - * - * ``` php - * seeNumberOfElements('tr', 10); - * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements - * ?> - * ``` - * @param $selector - * @param mixed $expected: - * - string: strict number - * - array: range of numbers [0,10] - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() - */ - public function canSeeNumberOfElements($selector, $expected) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that there are a certain number of elements matched by the given locator on the page. - * - * ``` php - * seeNumberOfElements('tr', 10); - * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements - * ?> - * ``` - * @param $selector - * @param mixed $expected: - * - string: strict number - * - array: range of numbers [0,10] - * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() - */ - public function seeNumberOfElements($selector, $expected) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is selected. - * - * ``` php - * seeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() - */ - public function canSeeOptionIsSelected($select, $optionText) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is selected. - * - * ``` php - * seeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() - */ - public function seeOptionIsSelected($select, $optionText) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is not selected. - * - * ``` php - * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() - */ - public function cantSeeOptionIsSelected($select, $optionText) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the given option is not selected. - * - * ``` php - * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); - * ?> - * ``` - * - * @param $selector - * @param $optionText - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() - */ - public function dontSeeOptionIsSelected($select, $optionText) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that current page has 404 response status code. - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seePageNotFound() - */ - public function canSeePageNotFound() { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that current page has 404 response status code. - * @see \Codeception\Lib\InnerBrowser::seePageNotFound() - */ - public function seePageNotFound() { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that response code is equal to value provided. - * - * @param $code - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() - */ - public function canSeeResponseCodeIs($code) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that response code is equal to value provided. - * - * @param $code - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() - */ - public function seeResponseCodeIs($code) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title contains the given string. - * - * ``` php - * seeInTitle('Blog - Post #1'); - * ?> - * ``` - * - * @param $title - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::seeInTitle() - */ - public function canSeeInTitle($title) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title contains the given string. - * - * ``` php - * seeInTitle('Blog - Post #1'); - * ?> - * ``` - * - * @param $title - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::seeInTitle() - */ - public function seeInTitle($title) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title does not contain the given string. - * - * @param $title - * - * @return mixed - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() - */ - public function cantSeeInTitle($title) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that the page title does not contain the given string. - * - * @param $title - * - * @return mixed - * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() - */ - public function dontSeeInTitle($title) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); - } -} diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml deleted file mode 100644 index 3b17a39dc..000000000 --- a/tests/functional.suite.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Codeception Test Suite Configuration - -# suite for functional (integration) tests. -# emulate web requests and make application process them. -# Include one of framework modules (Symfony2, Yii2, Laravel4) to use it. - -class_name: FunctionalTester -modules: - enabled: [Filesystem, FunctionalHelper] diff --git a/tests/functional/FunctionalTester.php b/tests/functional/FunctionalTester.php deleted file mode 100644 index 881603c17..000000000 --- a/tests/functional/FunctionalTester.php +++ /dev/null @@ -1,360 +0,0 @@ -scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Opens a file and stores it's content. - * - * Usage: - * - * ``` php - * openFile('composer.json'); - * $I->seeInThisFile('codeception/codeception'); - * ?> - * ``` - * - * @param $filename - * @see \Codeception\Module\Filesystem::openFile() - */ - public function openFile($filename) { - return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Deletes a file - * - * ``` php - * deleteFile('composer.lock'); - * ?> - * ``` - * - * @param $filename - * @see \Codeception\Module\Filesystem::deleteFile() - */ - public function deleteFile($filename) { - return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Deletes directory with all subdirectories - * - * ``` php - * deleteDir('vendor'); - * ?> - * ``` - * - * @param $dirname - * @see \Codeception\Module\Filesystem::deleteDir() - */ - public function deleteDir($dirname) { - return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Copies directory with all contents - * - * ``` php - * copyDir('vendor','old_vendor'); - * ?> - * ``` - * - * @param $src - * @param $dst - * @see \Codeception\Module\Filesystem::copyDir() - */ - public function copyDir($src, $dst) { - return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks If opened file has `text` in it. - * - * Usage: - * - * ``` php - * openFile('composer.json'); - * $I->seeInThisFile('codeception/codeception'); - * ?> - * ``` - * - * @param $text - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Module\Filesystem::seeInThisFile() - */ - public function canSeeInThisFile($text) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks If opened file has `text` in it. - * - * Usage: - * - * ``` php - * openFile('composer.json'); - * $I->seeInThisFile('codeception/codeception'); - * ?> - * ``` - * - * @param $text - * @see \Codeception\Module\Filesystem::seeInThisFile() - */ - public function seeInThisFile($text) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks the strict matching of file contents. - * Unlike `seeInThisFile` will fail if file has something more than expected lines. - * Better to use with HEREDOC strings. - * Matching is done after removing "\r" chars from file content. - * - * ``` php - * openFile('process.pid'); - * $I->seeFileContentsEqual('3192'); - * ?> - * ``` - * - * @param $text - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Module\Filesystem::seeFileContentsEqual() - */ - public function canSeeFileContentsEqual($text) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks the strict matching of file contents. - * Unlike `seeInThisFile` will fail if file has something more than expected lines. - * Better to use with HEREDOC strings. - * Matching is done after removing "\r" chars from file content. - * - * ``` php - * openFile('process.pid'); - * $I->seeFileContentsEqual('3192'); - * ?> - * ``` - * - * @param $text - * @see \Codeception\Module\Filesystem::seeFileContentsEqual() - */ - public function seeFileContentsEqual($text) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks If opened file doesn't contain `text` in it - * - * ``` php - * openFile('composer.json'); - * $I->dontSeeInThisFile('codeception/codeception'); - * ?> - * ``` - * - * @param $text - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Module\Filesystem::dontSeeInThisFile() - */ - public function cantSeeInThisFile($text) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks If opened file doesn't contain `text` in it - * - * ``` php - * openFile('composer.json'); - * $I->dontSeeInThisFile('codeception/codeception'); - * ?> - * ``` - * - * @param $text - * @see \Codeception\Module\Filesystem::dontSeeInThisFile() - */ - public function dontSeeInThisFile($text) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Deletes a file - * @see \Codeception\Module\Filesystem::deleteThisFile() - */ - public function deleteThisFile() { - return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if file exists in path. - * Opens a file when it's exists - * - * ``` php - * seeFileFound('UserModel.php','app/models'); - * ?> - * ``` - * - * @param $filename - * @param string $path - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Module\Filesystem::seeFileFound() - */ - public function canSeeFileFound($filename, $path = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if file exists in path. - * Opens a file when it's exists - * - * ``` php - * seeFileFound('UserModel.php','app/models'); - * ?> - * ``` - * - * @param $filename - * @param string $path - * @see \Codeception\Module\Filesystem::seeFileFound() - */ - public function seeFileFound($filename, $path = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if file does not exists in path - * - * @param $filename - * @param string $path - * Conditional Assertion: Test won't be stopped on fail - * @see \Codeception\Module\Filesystem::dontSeeFileFound() - */ - public function cantSeeFileFound($filename, $path = null) { - return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks if file does not exists in path - * - * @param $filename - * @param string $path - * @see \Codeception\Module\Filesystem::dontSeeFileFound() - */ - public function dontSeeFileFound($filename, $path = null) { - return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Erases directory contents - * - * ``` php - * cleanDir('logs'); - * ?> - * ``` - * - * @param $dirname - * @see \Codeception\Module\Filesystem::cleanDir() - */ - public function cleanDir($dirname) { - return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Saves contents to file - * - * @param $filename - * @param $contents - * @see \Codeception\Module\Filesystem::writeToFile() - */ - public function writeToFile($filename, $contents) { - return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args())); - } -} diff --git a/tests/functional/_bootstrap.php b/tests/functional/_bootstrap.php deleted file mode 100644 index 8a8855580..000000000 --- a/tests/functional/_bootstrap.php +++ /dev/null @@ -1,2 +0,0 @@ -installTester = $I; - } - - /** - * @return installPage - */ - public static function of(InstallTester $I) - { - return new static($I); - } -} \ No newline at end of file diff --git a/tests/install/_steps/AdminSteps.php b/tests/install/_steps/AdminSteps.php deleted file mode 100644 index 191c9ba9c..000000000 --- a/tests/install/_steps/AdminSteps.php +++ /dev/null @@ -1,18 +0,0 @@ -loadFile(array('./common/js/common.js', 'head')); $handler->loadFile(array('./common/js/xml_js_filter.js', 'body')); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + if(__DEBUG__ || !__XE_VERSION_STABLE__) + { + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + } else { + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => null); + } $expected[] = array('file' => '/xe/common/js/js_app.js' . $this->_filemtime('common/js/js_app.js'), 'targetie' => null); $expected[] = array('file' => '/xe/common/js/common.js' . $this->_filemtime('common/js/common.js'), 'targetie' => null); $this->assertEquals($handler->getJsFileList(), $expected); @@ -33,7 +38,14 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test $handler->loadFile(array('./common/js/jquery.js', 'body')); $handler->loadFile(array('./common/js/xml_js_filter.js', 'head')); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + if(__DEBUG__ || !__XE_VERSION_STABLE__) + { + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + } + else + { + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => null); + } $this->assertEquals($handler->getJsFileList('body'), $expected); }); @@ -42,8 +54,16 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test $handler->loadFile(array('./common/css/xe.css')); $handler->loadFile(array('./common/css/mobile.css')); - $expected[] = array('file' => '/xe/common/css/xe.css' . $this->_filemtime('common/css/xe.css'), 'media' => 'all', 'targetie' => null); - $expected[] = array('file' => '/xe/common/css/mobile.css' . $this->_filemtime('common/css/mobile.css'), 'media' => 'all', 'targetie' => null); + if(__DEBUG__ || !__XE_VERSION_STABLE__) + { + $expected[] = array('file' => '/xe/common/css/xe.css' . $this->_filemtime('common/css/xe.css'), 'media' => 'all', 'targetie' => null); + $expected[] = array('file' => '/xe/common/css/mobile.css' . $this->_filemtime('common/css/mobile.css'), 'media' => 'all', 'targetie' => null); + } + else + { + $expected[] = array('file' => '/xe/common/css/xe.min.css' . $this->_filemtime('common/css/xe.min.css'), 'media' => 'all', 'targetie' => null); + $expected[] = array('file' => '/xe/common/css/mobile.min.css' . $this->_filemtime('common/css/mobile.min.css'), 'media' => 'all', 'targetie' => null); + } $this->assertEquals($handler->getCssFileList(), $expected); }); @@ -60,7 +80,14 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test $handler->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000)); $handler->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000)); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + if(__DEBUG__ || !__XE_VERSION_STABLE__) + { + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + } + else + { + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => null); + } $expected[] = array('file' => '/xe/common/js/js_app.js' . $this->_filemtime('common/js/js_app.js'), 'targetie' => null); $expected[] = array('file' => '/xe/common/js/common.js' . $this->_filemtime('common/js/common.js'), 'targetie' => null); $expected[] = array('file' => '/xe/common/js/xml_handler.js' . $this->_filemtime('common/js/xml_handler.js'), 'targetie' => null); @@ -76,7 +103,14 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test $handler->loadFile(array('./common/js/common.js', 'head', '', -100000)); $handler->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000)); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + if(__DEBUG__ || !__XE_VERSION_STABLE__) + { + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => null); + } + else + { + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => null); + } $expected[] = array('file' => '/xe/common/js/js_app.js' . $this->_filemtime('common/js/js_app.js'), 'targetie' => null); $expected[] = array('file' => '/xe/common/js/common.js' . $this->_filemtime('common/js/common.js'), 'targetie' => null); $expected[] = array('file' => '/xe/common/js/xml_js_filter.js' . $this->_filemtime('common/js/xml_js_filter.js'), 'targetie' => null); @@ -106,9 +140,41 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test $handler->loadFile(array('./common/js/jquery.js', 'head', 'ie7')); $handler->loadFile(array('./common/js/jquery.js', 'head', 'ie8')); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => 'ie6'); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => 'ie7'); - $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => 'ie8'); + if(__DEBUG__ || !__XE_VERSION_STABLE__) + { + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => 'ie6'); + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => 'ie7'); + $expected[] = array('file' => '/xe/common/js/jquery.js' . $this->_filemtime('common/js/jquery.js'), 'targetie' => 'ie8'); + } + else + { + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => 'ie6'); + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => 'ie7'); + $expected[] = array('file' => '/xe/common/js/jquery.min.js' . $this->_filemtime('common/js/jquery.min.js'), 'targetie' => 'ie8'); + } + $this->assertEquals($handler->getJsFileList(), $expected); + }); + + $this->specify("external file - schemaless", function() { + $handler = new FrontEndFileHandler(); + $handler->loadFile(array('http://external.host/js/script.js')); + $handler->loadFile(array('https://external.host/js/script.js')); + $handler->loadFile(array('//external.host/js/script1.js')); + $handler->loadFile(array('///external.host/js/script2.js')); + + $expected[] = array('file' => 'http://external.host/js/script.js', 'targetie' => null); + $expected[] = array('file' => 'https://external.host/js/script.js', 'targetie' => null); + $expected[] = array('file' => '//external.host/js/script1.js', 'targetie' => null); + $expected[] = array('file' => '//external.host/js/script2.js', 'targetie' => null); + $this->assertEquals($handler->getJsFileList(), $expected); + }); + + $this->specify("external file - schemaless", function() { + $handler = new FrontEndFileHandler(); + $handler->loadFile(array('//external.host/js/script.js')); + $handler->loadFile(array('///external.host/js/script.js')); + + $expected[] = array('file' => '//external.host/js/script.js', 'targetie' => null); $this->assertEquals($handler->getJsFileList(), $expected); }); @@ -146,13 +212,16 @@ class FrontEndFileHandlerTest extends \Codeception\TestCase\Test $this->assertEquals($handler->getCssFileList(), $expected); }); - $this->specify("external file", function() { + $this->specify("external file - schemaless", function() { $handler = new FrontEndFileHandler(); $handler->loadFile(array('//external.host/css/style.css')); + $handler->loadFile(array('///external.host/css2/style2.css')); $expected[] = array('file' => '//external.host/css/style.css', 'media'=>'all', 'targetie' => null); + $expected[] = array('file' => '//external.host/css2/style2.css', 'media'=>'all', 'targetie' => null); $this->assertEquals($handler->getCssFileList(), $expected); }); + } } diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/unit/classes/template/TemplateHandlerTest.php index 313dcc331..daece9612 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/unit/classes/template/TemplateHandlerTest.php @@ -213,7 +213,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // issue 584 array( 'mobile', - PHP_EOL . 'if($__Context->oBodex->display_extra_images[\'mobile\'] && $__Context->arr_extra && $__Context->arr_extra->bodex->mobile){ ?>mobile' + PHP_EOL . 'if($__Context->oBodex->display_extra_images[\'mobile\'] && $__Context->arr_extra && $__Context->arr_extra->bodex->mobile){ ?>mobile' ), // issue 831 array( @@ -230,6 +230,55 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test '{@ eval(\'$val = $document_srl;\')}', PHP_EOL . 'eval(\'$__Context->val = $__Context->document_srl;\') ?>' ), + // https://github.com/xpressengine/xe-core/issues/1510 + array( + '', + PHP_EOL . 'if($__Context->foo->bar){ ?>' + ), + // https://github.com/xpressengine/xe-core/issues/1510 + array( + 'a!@#$%^&*()_-=[]{}?/', + PHP_EOL . 'if($__Context->foo->bar > 100){ ?>a!@#$%^&*()_-=[]{}?/' + ), + // https://github.com/xpressengine/xe-core/issues/1510 + array( + '', + PHP_EOL . 'if($__Context->foo->bar){ ?>' + ), + // https://github.com/xpressengine/xe-core/issues/1510 + array( + '', + PHP_EOL . 'if(!$__Context->module_info->title){ ?>' + ), + // https://github.com/xpressengine/xe-core/issues/1510 + array( + '', + PHP_EOL . 'if($__Context->mi->title){ ?>mi->use){ ?> class="tmp_class" src="/xe/tests/unit/classes/img/common/blank.gif" />' + ), + array( + ' alt', + '?> foo->bar){ ?>alt' + ), + array( + '' . "\n" . ' alt', + '?>' . PHP_EOL . ' foo->bar){ ?>alt' + ), + array( + 'asf ', + '?>asf ' + ), + array( + '', + '?>' + ), + array( + 'asdf src="../img/img.gif" asdf src asdf src="../img/img.gif" asdf', + '?>asdf src="../img/img.gif" asdf src asdf src="../img/img.gif" asdf' + ), + array( + 'asdf src="../img/img.gif" asdf', + '?>asdf src="../img/img.gif" asdf' + ), ); } diff --git a/tools/dbxml_validator/connect_wrapper.php b/tools/dbxml_validator/connect_wrapper.php index 0d5afda6d..f9ebacf48 100644 --- a/tools/dbxml_validator/connect_wrapper.php +++ b/tools/dbxml_validator/connect_wrapper.php @@ -347,7 +347,7 @@ class DBMysqliConnectWrapper extends DBMysqli */ public function addQuotes($string) { - if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc()) + if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc()) { $string = stripslashes(str_replace("\\", "\\\\", $string)); }