From 9c97f24d35a105da6cc3713fb169bd47750d6f26 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Fri, 8 Jan 2016 06:09:43 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=EC=99=B8=EB=B6=80=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=EC=9D=98=20=EA=B2=BD=EC=9A=B0=20=EC=84=AC=EB=84=A4?= =?UTF-8?q?=EC=9D=BC=EC=9D=84=20=EC=83=9D=EC=84=B1=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=EC=A0=90=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.item.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 7427744d0..c39448df1 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -910,8 +910,7 @@ class documentItem extends Object if(!file_exists($tmp_file)) continue; else { - list($_w, $_h, $_t, $_a) = @getimagesize($tmp_file); - if($_w<$width || $_h<$height) continue; + list($_w, $_h, $_t, $_a) = getimagesize($tmp_file); $source_file = $tmp_file; $is_tmp_file = true; From 0b1a511c380803ea9724317ed8471e68a22a77f7 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Fri, 8 Jan 2016 09:59:24 +0900 Subject: [PATCH 02/14] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=EC=9D=B8?= =?UTF-8?q?=EC=A7=80=20=EC=95=84=EB=8B=8C=EC=A7=80=20=ED=99=95=EC=8B=A4?= =?UTF-8?q?=ED=95=98=EA=B2=8C=20=EA=B5=AC=EB=B3=84=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20=EB=B0=A9=EB=B2=95=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.item.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index c39448df1..14b46e2d2 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -910,7 +910,14 @@ class documentItem extends Object if(!file_exists($tmp_file)) continue; else { - list($_w, $_h, $_t, $_a) = getimagesize($tmp_file); + if($is_img = @getimagesize($tmp_file)) + { + list($_w, $_h, $_t, $_a) = $is_img; + } + else + { + continue; + } $source_file = $tmp_file; $is_tmp_file = true; From e5c4ed8e17e0142f07187d0199a9c6835f799114 Mon Sep 17 00:00:00 2001 From: CONORY Date: Mon, 11 Jan 2016 14:45:24 +0900 Subject: [PATCH 03/14] loge image --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index f83e80677..2f02a3ab4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -RhymiX -====== +[![RhymiX](https://cloud.githubusercontent.com/assets/8565457/12227560/ba15b514-b871-11e5-802a-d5e88db2e393.png)](https://www.rhymix.org) RhymiX(라이믹스)는 누구든지 쉽고 자유롭게 독립적인 홈페이지를 만들어 자신을 표현하고 커뮤니티를 키워나갈 수 있도록 돕기 위한 CMS(content management system)입니다. From 3b9a9c0f7a30de6088f89178af6fb2cca6cd505b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 14:52:41 +0900 Subject: [PATCH 04/14] Rename cache_friendly option to delay_session --- classes/context/Context.class.php | 2 +- modules/admin/admin.admin.view.php | 2 +- modules/admin/lang/lang.xml | 18 ++++++++---------- modules/admin/tpl/config_general.html | 18 +++++++++--------- modules/install/install.admin.controller.php | 9 +++++---- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 483ab7fc7..243e831b2 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -366,7 +366,7 @@ class Context $session_id = $_COOKIE[$session_name]; } - if($session_id !== NULL || $this->db_info->cache_friendly != 'Y') + if($session_id !== NULL || $this->db_info->delay_session != 'Y') { $this->setCacheControl(0, false); session_start(); diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index cac6133cc..4841befd1 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -72,7 +72,7 @@ class adminAdminView extends admin Context::set('use_spaceremover', $db_info->use_spaceremover ? $db_info->use_spaceremover : 'Y'); //not use Context::set('qmail_compatibility', $db_info->qmail_compatibility == 'Y' ? 'Y' : 'N'); Context::set('minify_scripts', $db_info->minify_scripts ?: 'common'); - Context::set('cache_friendly', $db_info->cache_friendly == 'Y' ? 'Y' : 'N'); + Context::set('delay_session', $db_info->delay_session == 'Y' ? 'Y' : 'N'); Context::set('use_db_session', $db_info->use_db_session == 'N' ? 'N' : 'Y'); Context::set('use_mobile_view', $db_info->use_mobile_view == 'Y' ? 'Y' : 'N'); Context::set('use_ssl', $db_info->use_ssl ? $db_info->use_ssl : "none"); diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index 3daf96729..bdbdd5c5b 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -785,17 +785,15 @@ - - - - - - + + + + - - 이 옵션을 선택할 경우 방문자 수 및 조회수 집계가 정확하지 않을 수 있습니다.]]> - Selecting this option may cause view counts and visitor counts to become inaccurate.]]> - このオプションを選択した場合、訪問者数とヒット集計が正確でない場合があります。]]> + + 이 옵션을 선택할 경우 방문자 수 및 조회수 집계가 정확하게 이루어지지 않을 수 있습니다.]]> + Selecting this option may cause view counts and visitor counts to become inaccurate.]]> + このオプションを選択した場合、訪問者数とヒット集計が正確でない場合があります。]]> diff --git a/modules/admin/tpl/config_general.html b/modules/admin/tpl/config_general.html index 29e5e01ee..857a23e98 100644 --- a/modules/admin/tpl/config_general.html +++ b/modules/admin/tpl/config_general.html @@ -225,6 +225,15 @@ +
+ +
+ + +
+

{$lang->about_delay_session}

+
+
@@ -235,15 +244,6 @@

{$lang->about_minify_scripts}

-
- -
- - -
-

{$lang->about_cache_friendly}

-
-
diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index 4c4525b3a..45ac2f7b8 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -96,19 +96,20 @@ class installAdminController extends install $qmail_compatibility = Context::get('qmail_compatibility'); if($qmail_compatibility!='Y') $qmail_compatibility = 'N'; + $delay_session = Context::get('delay_session'); + if($delay_session!='Y') $delay_session = 'N'; + unset($db_info->cache_friendly); + $minify_scripts = Context::get('minify_scripts'); if(!$minify_scripts) $minify_scripts = 'common'; - $cache_friendly = Context::get('cache_friendly'); - if($cache_friendly!='Y') $cache_friendly = 'N'; - $use_html5 = Context::get('use_html5'); if(!$use_html5) $use_html5 = 'N'; $db_info->default_url = $default_url; $db_info->qmail_compatibility = $qmail_compatibility; $db_info->minify_scripts = $minify_scripts; - $db_info->cache_friendly = $cache_friendly; + $db_info->delay_session = $delay_session; $db_info->use_db_session = $use_db_session; $db_info->use_rewrite = $use_rewrite; $db_info->use_sso = $use_sso; From 040d1207101290cf8e8eff3605828adf923f2b1b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 14:57:13 +0900 Subject: [PATCH 05/14] Move ob_start() from addon script to Context class if using delay_session --- classes/context/Context.class.php | 1 + modules/addon/addon.controller.php | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 243e831b2..8e59a37d3 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -373,6 +373,7 @@ class Context } else { + ob_start(); $this->setCacheControl(-1, true); register_shutdown_function(array($this, 'checkSessionStatus')); $_SESSION = array(); diff --git a/modules/addon/addon.controller.php b/modules/addon/addon.controller.php index d1eb0781a..241d10534 100644 --- a/modules/addon/addon.controller.php +++ b/modules/addon/addon.controller.php @@ -80,7 +80,6 @@ class addonController extends addon { // Add-on module for use in creating the cache file $buff = array('getInsertedAddons($site_srl, $gtype); foreach($addon_list as $addon => $val) @@ -136,7 +135,6 @@ class addonController extends addon $buff[] = '$addon_time_log->called_extension = "' . $addon . '";'; $buff[] = 'writeSlowlog("addon",$after_time-$before_time,$addon_time_log);'; } - $buff[] = 'ob_end_flush();'; $addon_path = _XE_PATH_ . 'files/cache/addons/'; FileHandler::makeDir($addon_path); $addon_file = $addon_path . ($gtype == 'site' ? $site_srl : '') . $type . '.acivated_addons.cache.php'; From c74f84cd9f508c3aeb9928ec717dd28097e8e210 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 16:00:31 +0900 Subject: [PATCH 06/14] Clean up grunt configuration --- .travis.yml | 3 +- Gruntfile.js | 182 +-------------------------------------------------- package.json | 10 --- 3 files changed, 3 insertions(+), 192 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a63e8c41..d811e6292 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,7 @@ matrix: fast_finish: true sudo: false before_script: -- npm install -g grunt-cli -- npm install +- npm install grunt grunt-cli grunt-contrib-jshint grunt-contrib-csslint grunt-phplint --save-dev - mysql -e "CREATE DATABASE xe_test;" - echo "USE mysql;\nUPDATE user SET password=PASSWORD('travis') WHERE user='travis';\nFLUSH PRIVILEGES;\n" | mysql -u root - php -S localhost:8000 & diff --git a/Gruntfile.js b/Gruntfile.js index 2c894b78e..c2a43256a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,9 +1,6 @@ module.exports = function(grunt) { "use strict"; - var banner = '/*! Copyright (C) NAVER */\n'; - var banner_xe_js = banner + '/**!\n * @concat modernizr.js + common.js + js_app.js + xml_handler.js + xml_js_filter.js\n * @brief XE Common JavaScript\n **/\n'; - grunt.file.defaultEncoding = 'utf8'; grunt.initConfig({ @@ -65,7 +62,6 @@ module.exports = function(grunt) { options: { phpCmd: "php", }, - src: [ "**/*.php", "!files/**", @@ -79,184 +75,10 @@ module.exports = function(grunt) { }, } }); - - function createPackageChecksum(target_file) { - /* https://gist.github.com/onelaview/6475037 */ - var fs = require('fs'); - var crypto = require('crypto'); - var md5 = crypto.createHash('md5'); - var file = grunt.template.process(target_file); - var buffer = fs.readFileSync(file); - md5.update(buffer); - var md5Hash = md5.digest('hex'); - grunt.verbose.writeln('file md5: ' + md5Hash); - - var md5FileName = file + '.md5'; - grunt.file.write(md5FileName, md5Hash); - grunt.verbose.writeln('File "' + md5FileName + '" created.').writeln('...'); - } - - grunt.registerTask('build', '', function(A, B) { - var _only_export = false; - var tasks = ['krzip', 'syndication']; - - if(!A) { - grunt.fail.warn('Undefined build target.'); - } else if(A && !B) { - _only_export = true; - } - - if(!_only_export) { - tasks.push('changed'); - target = A + '...' + B; - version = B; - } else { - target = A; - version = A; - } - - var done = this.async(); - var build_dir = 'build'; - var archive_full = build_dir + '/xe.' + version + '.tar.gz'; - var archive_changed = build_dir + '/xe.' + version + '.changed.tar.gz'; - var diff, target, version; - - var taskDone = function() { - tasks.pop(); - grunt.verbose.writeln('remain tasks : '+tasks.length); - - if(tasks.length === 0) { - grunt.util.spawn({ - cmd: "tar", - args: ['cfz', '../xe.'+version+'.tar.gz', './'], - opts: { - cwd: 'build/xe', - cache: false - } - }, function (error, result, code) { - grunt.log.ok('Archived(full) : ' + build_dir + '/xe.'+version+'.tar.gz'); - createPackageChecksum(build_dir + '/xe.'+version+'.tar.gz'); - - grunt.util.spawn({ - cmd: "zip", - args: ['-r', '../xe.'+version+'.zip', './'], - opts: { - cwd: 'build/xe', - cache: false - } - }, function (error, result, code) { - grunt.log.ok('Archived(full) : ' + build_dir + '/xe.'+version+'.zip'); - createPackageChecksum(build_dir + '/xe.'+version+'.zip'); - - grunt.file.delete('build/xe'); - grunt.file.delete('build/temp.full.tar'); - - grunt.util.spawn({ - cmd: "git", - args: ['diff', '--name-status', target] - }, function (error, result, code) { - var fs = require('fs'); - result = 'Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R).' + grunt.util.linefeed + result; - grunt.file.write(build_dir + '/CHANGED.' + version + '.txt', result); - - grunt.log.ok('Done!'); - }); - - }); - }); - } - }; - - if(grunt.file.isDir(build_dir)) { - grunt.file.delete(build_dir); - } - grunt.file.mkdir(build_dir); - grunt.file.mkdir(build_dir + '/xe'); - - grunt.log.subhead('Archiving...'); - grunt.log.writeln('Target : ' + target); - - grunt.util.spawn({ - cmd: "git", - args: ['archive', '--output=build/temp.full.tar', version, '.'] - }, function (error, result, code){ - if(!_only_export) { - // changed - grunt.util.spawn({ - cmd: "git", - args: ['diff', '--name-only', '--diff-filter' ,'ACM', target] - }, function (error, result, code) { - diff = result.stdout; - - if(diff) { - diff = diff.split(grunt.util.linefeed); - } - - // changed - if(diff.length) { - var args_tar = ['archive', '-o', 'build/xe.'+version+'.changed.tar.gz', version]; - var args_zip = ['archive', '-o', 'build/xe.'+version+'.changed.zip', version]; - args_tar = args_tar.concat(diff); - args_zip = args_zip.concat(diff); - - grunt.util.spawn({ - cmd: "git", - args: args_tar - }, function (error, result, code) { - grunt.log.ok('Archived(changed) : ' + build_dir + '/xe.'+version+'.changed.tar.gz'); - createPackageChecksum(build_dir + '/xe.'+version+'.changed.tar.gz'); - - grunt.util.spawn({ - cmd: "git", - args: args_zip - }, function (error, result, code) { - grunt.log.ok('Archived(changed) : ' + build_dir + '/xe.'+version+'.changed.zip'); - createPackageChecksum(build_dir + '/xe.'+version+'.changed.zip'); - - taskDone(); - }); - }); - } else { - taskDone(); - } - }); - } - - // full - grunt.util.spawn({ - cmd: "tar", - args: ['xf', 'build/temp.full.tar', '-C', 'build/xe'] - }, function (error, result, code) { - // krzip - grunt.util.spawn({ - cmd: "git", - args: ['clone', '-b', 'master', 'git@github.com:xpressengine/xe-module-krzip.git', 'build/xe/modules/krzip'] - }, function (error, result, code) { - grunt.file.delete('build/xe/modules/krzip/.git'); - taskDone(); - }); - - // syndication - grunt.util.spawn({ - cmd: "git", - args: ['clone', '-b', 'master', 'git@github.com:xpressengine/xe-module-syndication.git', 'build/xe/modules/syndication'] - }, function (error, result, code) { - grunt.file.delete('build/xe/modules/syndication/.git'); - taskDone(); - }); - }); - }); - }); - - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-csslint'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-phplint'); - - grunt.registerTask('default', ['jshint', 'csslint']); + grunt.registerTask('lint', ['jshint', 'csslint', 'phplint']); - grunt.registerTask('minify', ['jshint', 'csslint', 'clean', 'concat', 'uglify', 'cssmin']); }; diff --git a/package.json b/package.json index f692948b2..0021e2fb3 100644 --- a/package.json +++ b/package.json @@ -9,16 +9,6 @@ "bugs": { "url": "https://github.com/rhymix/rhymix/issues" }, - "devDependencies": { - "grunt": "^0.4.5", - "grunt-contrib-clean": "^0.5.0", - "grunt-contrib-concat": "^0.3.0", - "grunt-contrib-csslint": "~0.3.0", - "grunt-contrib-cssmin": "^0.7.0", - "grunt-contrib-jshint": "~0.10.0", - "grunt-contrib-uglify": "^0.4.1", - "grunt-phplint": "~0.0.3" - }, "main": "Gruntfile.js", "scripts": { "test": "grunt" From 4776078c115c59a04c81346d728684c59608bab2 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 16:12:32 +0900 Subject: [PATCH 07/14] Clean up MySQL configuration for unit tests --- .travis.yml | 4 ++-- tests/Install.suite.dist.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d811e6292..bd4c0a470 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,8 @@ matrix: sudo: false before_script: - npm install grunt grunt-cli grunt-contrib-jshint grunt-contrib-csslint grunt-phplint --save-dev -- mysql -e "CREATE DATABASE xe_test;" -- echo "USE mysql;\nUPDATE user SET password=PASSWORD('travis') WHERE user='travis';\nFLUSH PRIVILEGES;\n" | mysql -u root +- mysql -u root -e "CREATE DATABASE rhymix" +- mysql -u root -e "SET PASSWORD FOR 'travis'@'localhost' = PASSWORD('travis')" - php -S localhost:8000 & - if [ $(phpenv version-name) == "5.3" ]; then touch codecept.phar; fi - if [ $(phpenv version-name) == "5.4" ]; then wget http://codeception.com/releases/2.0.16/codecept.phar; fi diff --git a/tests/Install.suite.dist.yml b/tests/Install.suite.dist.yml index b217a1c35..5bbbce4ff 100644 --- a/tests/Install.suite.dist.yml +++ b/tests/Install.suite.dist.yml @@ -5,11 +5,11 @@ modules: PhpBrowser: url: 'http://localhost:8000/' DbDropTablesHelper: - dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + dsn: 'mysql:host=localhost;dbname=rhymix' user: 'root' password: 'root' Db: - dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + dsn: 'mysql:host=localhost;dbname=rhymix' user: 'root' password: 'root' cleanup: true @@ -18,11 +18,11 @@ env: modules: config: Db: - dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + dsn: 'mysql:host=localhost;dbname=rhymix' user: 'travis' password: 'travis' cleanup: true DbDropTablesHelper: - dsn: 'mysql:host=127.0.0.1;dbname=xe_test' + dsn: 'mysql:host=localhost;dbname=rhymix' user: 'travis' password: 'travis' From e80332706abfd9ee2bd7c092d3de9362947ac7e7 Mon Sep 17 00:00:00 2001 From: CONORY Date: Mon, 11 Jan 2016 16:15:07 +0900 Subject: [PATCH 08/14] =?UTF-8?q?E=5FWARNING=20=ED=91=9C=EC=8B=9C=EC=99=80?= =?UTF-8?q?=20=EB=94=94=EB=B2=84=EA=B7=B8=20=EB=AA=A8=EB=93=9C=EB=A5=BC=20?= =?UTF-8?q?=EB=81=95=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index e3bfb3934..dd8090ff6 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -9,11 +9,11 @@ */ if(version_compare(PHP_VERSION, '5.4.0', '<')) { - @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); + @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING); } else { - @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); + @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING ^ E_STRICT); } if(!defined('__XE__')) @@ -133,7 +133,7 @@ if(!defined('__DEBUG__')) * 4: output DB query history * */ - define('__DEBUG__', 1); + define('__DEBUG__', 0); } if(!defined('__DEBUG_OUTPUT__')) From 8ad16890da6c6cea478fd8e446970cf86fce4e61 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 16:16:38 +0900 Subject: [PATCH 09/14] More cleanup of unit tests --- .travis.yml | 2 +- package.json | 16 ---------------- tests/Install/AutoinstallCept.php | 2 +- tests/Install/InstallCept.php | 6 +++--- 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 package.json diff --git a/.travis.yml b/.travis.yml index bd4c0a470..7c1edacad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,8 +20,8 @@ before_script: - if [ $(phpenv version-name) == "5.4" ]; then wget http://codeception.com/releases/2.0.16/codecept.phar; fi - if [ ! -f codecept.phar ]; then wget http://codeception.com/codecept.phar; fi script: -- grunt lint - if [ -f codecept.phar ]; then php codecept.phar build; fi - if [ -f codecept.phar ]; then php codecept.phar run -d --fail-fast --env travis; fi +- grunt lint notifications: email: false diff --git a/package.json b/package.json deleted file mode 100644 index 0021e2fb3..000000000 --- a/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "RhymiX", - "author": "NAVER, RhymiX Developers and Contributors", - "license": "GNU LGPL", - "repository": { - "type": "git", - "url": "git://github.com/rhymix/rhymix.git" - }, - "bugs": { - "url": "https://github.com/rhymix/rhymix/issues" - }, - "main": "Gruntfile.js", - "scripts": { - "test": "grunt" - } -} diff --git a/tests/Install/AutoinstallCept.php b/tests/Install/AutoinstallCept.php index 03bc8ee29..b5279717c 100644 --- a/tests/Install/AutoinstallCept.php +++ b/tests/Install/AutoinstallCept.php @@ -28,7 +28,7 @@ $install_config = array( 'db_userid' => $dbinfo['user'], 'db_password' => $dbinfo['password'], 'db_database' => $dbinfo['dbname'], - 'db_table_prefix' =>'xe_', + 'db_table_prefix' =>'rx', 'use_rewrite' =>'N', 'time_zone' =>'0900', 'email_address' =>'admin@admin.net', diff --git a/tests/Install/InstallCept.php b/tests/Install/InstallCept.php index daaf62e98..b574fdb22 100644 --- a/tests/Install/InstallCept.php +++ b/tests/Install/InstallCept.php @@ -14,7 +14,7 @@ $dbinfo = [ 'type' => $db_type, 'user' => $db_config['user'], 'password' => $db_config['password'], - 'dbname' => 'xe_install', + 'dbname' => 'rhymix', 'port' => ((isset($db_config['port']) && $db_config['port'])?: 3306), ]; foreach($dsn as $piece) { @@ -27,7 +27,7 @@ if(\Filehandler::exists(_XE_PATH_ . 'config/install.config.php')) { } // Step 1 : License Agreement -$I->wantTo('Install XE Core'); +$I->wantTo('Install RhymiX'); $I->amOnPage('/index.php?l=ko'); $I->setCookie('l', 'ko'); $I->seeElement('//div[@id="progress"]/ul/li[1][@class="active"]'); @@ -50,7 +50,7 @@ $I->submitForm('#body', [ 'db_userid' => $dbinfo['user'], 'db_password' => $dbinfo['password'], 'db_database' => $dbinfo['dbname'], - 'db_table_prefix' => 'xe' + 'db_table_prefix' => 'rx' ]); // Step 4 : Create Admin Account From 4449d4ad7237e34f257b80b48b4f4506d7e20892 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 16:35:18 +0900 Subject: [PATCH 10/14] Clean up autogenerated files in test directory --- tests/Install/InstallTester.php | 2433 ------------------------------- tests/unit/UnitTester.php | 300 ---- 2 files changed, 2733 deletions(-) delete mode 100644 tests/Install/InstallTester.php delete mode 100644 tests/unit/UnitTester.php diff --git a/tests/Install/InstallTester.php b/tests/Install/InstallTester.php deleted file mode 100644 index c40651039..000000000 --- a/tests/Install/InstallTester.php +++ /dev/null @@ -1,2433 +0,0 @@ -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. - * - * Sets the HTTP header to the passed value - which is used on - * subsequent HTTP requests through PhpBrowser. - * - * Example: - * ```php - * 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($cookie, $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($cookie, $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($cookie, $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($cookie, $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($cookie, $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($selector, $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($selector, $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($selector, $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($selector, $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())); - } - - - /** - * [!] 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/unit/UnitTester.php b/tests/unit/UnitTester.php deleted file mode 100644 index 65d410d75..000000000 --- a/tests/unit/UnitTester.php +++ /dev/null @@ -1,300 +0,0 @@ -scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that two variables are not equal - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertNotEquals() - */ - public function assertNotEquals($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that two variables are same - * - * @param $expected - * @param $actual - * @param string $message - * - * @return mixed - * @see \Codeception\Module\Asserts::assertSame() - */ - public function assertSame($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that two variables are not same - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertNotSame() - */ - public function assertNotSame($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that actual is greater than expected - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertGreaterThan() - */ - public function assertGreaterThan($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @deprecated - * @see \Codeception\Module\Asserts::assertGreaterThen() - */ - public function assertGreaterThen($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that actual is greater or equal than expected - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual() - */ - public function assertGreaterThanOrEqual($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @deprecated - * @see \Codeception\Module\Asserts::assertGreaterThenOrEqual() - */ - public function assertGreaterThenOrEqual($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that actual is less than expected - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertLessThan() - */ - public function assertLessThan($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that actual is less or equal than expected - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertLessThanOrEqual() - */ - public function assertLessThanOrEqual($expected, $actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that haystack contains needle - * - * @param $needle - * @param $haystack - * @param string $message - * @see \Codeception\Module\Asserts::assertContains() - */ - public function assertContains($needle, $haystack, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that haystack doesn't contain needle. - * - * @param $needle - * @param $haystack - * @param string $message - * @see \Codeception\Module\Asserts::assertNotContains() - */ - public function assertNotContains($needle, $haystack, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that variable is empty. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertEmpty() - */ - public function assertEmpty($actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that variable is not empty. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertNotEmpty() - */ - public function assertNotEmpty($actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that variable is NULL - * - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertNull() - */ - public function assertNull($actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that variable is not NULL - * - * @param $actual - * @param string $message - * @see \Codeception\Module\Asserts::assertNotNull() - */ - public function assertNotNull($actual, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that condition is positive. - * - * @param $condition - * @param string $message - * @see \Codeception\Module\Asserts::assertTrue() - */ - public function assertTrue($condition, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that condition is negative. - * - * @param $condition - * @param string $message - * @see \Codeception\Module\Asserts::assertFalse() - */ - public function assertFalse($condition, $message = null) { - return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Fails the test with message. - * - * @param $message - * @see \Codeception\Module\Asserts::fail() - */ - public function fail($message) { - return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args())); - } -} From d51ad8b4e54c66415559cff23799b2a97402667c Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 16:44:10 +0900 Subject: [PATCH 11/14] Standardize on uppercase --- ...nit.suite.dist.yml => Unit.suite.dist.yml} | 0 tests/{unit => Unit}/FuncIncTest.php | 0 tests/{unit => Unit}/_bootstrap.php | 0 .../classes/context/ContextTest.php | 0 .../classes/file/FileHandlerTest.php | 0 .../frontendfile/FrontEndFileHandlerTest.php | 0 .../classes/security/SecurityTest.php | 0 .../classes/template/TemplateHandlerTest.php | 38 +++++++++---------- .../classes/template/css/style.css | 0 .../classes/template/sample.html | 0 .../classes/validator/ValidatorTest.php | 0 .../classes/validator/condition.en.js | 0 .../classes/validator/condition.xml | 0 .../classes/validator/customrule.xml | 0 .../classes/validator/insertDocument.xml | 0 .../classes/validator/login.xml | 0 16 files changed, 19 insertions(+), 19 deletions(-) rename tests/{unit.suite.dist.yml => Unit.suite.dist.yml} (100%) rename tests/{unit => Unit}/FuncIncTest.php (100%) rename tests/{unit => Unit}/_bootstrap.php (100%) rename tests/{unit => Unit}/classes/context/ContextTest.php (100%) rename tests/{unit => Unit}/classes/file/FileHandlerTest.php (100%) rename tests/{unit => Unit}/classes/frontendfile/FrontEndFileHandlerTest.php (100%) rename tests/{unit => Unit}/classes/security/SecurityTest.php (100%) rename tests/{unit => Unit}/classes/template/TemplateHandlerTest.php (93%) rename tests/{unit => Unit}/classes/template/css/style.css (100%) rename tests/{unit => Unit}/classes/template/sample.html (100%) rename tests/{unit => Unit}/classes/validator/ValidatorTest.php (100%) rename tests/{unit => Unit}/classes/validator/condition.en.js (100%) rename tests/{unit => Unit}/classes/validator/condition.xml (100%) rename tests/{unit => Unit}/classes/validator/customrule.xml (100%) rename tests/{unit => Unit}/classes/validator/insertDocument.xml (100%) rename tests/{unit => Unit}/classes/validator/login.xml (100%) diff --git a/tests/unit.suite.dist.yml b/tests/Unit.suite.dist.yml similarity index 100% rename from tests/unit.suite.dist.yml rename to tests/Unit.suite.dist.yml diff --git a/tests/unit/FuncIncTest.php b/tests/Unit/FuncIncTest.php similarity index 100% rename from tests/unit/FuncIncTest.php rename to tests/Unit/FuncIncTest.php diff --git a/tests/unit/_bootstrap.php b/tests/Unit/_bootstrap.php similarity index 100% rename from tests/unit/_bootstrap.php rename to tests/Unit/_bootstrap.php diff --git a/tests/unit/classes/context/ContextTest.php b/tests/Unit/classes/context/ContextTest.php similarity index 100% rename from tests/unit/classes/context/ContextTest.php rename to tests/Unit/classes/context/ContextTest.php diff --git a/tests/unit/classes/file/FileHandlerTest.php b/tests/Unit/classes/file/FileHandlerTest.php similarity index 100% rename from tests/unit/classes/file/FileHandlerTest.php rename to tests/Unit/classes/file/FileHandlerTest.php diff --git a/tests/unit/classes/frontendfile/FrontEndFileHandlerTest.php b/tests/Unit/classes/frontendfile/FrontEndFileHandlerTest.php similarity index 100% rename from tests/unit/classes/frontendfile/FrontEndFileHandlerTest.php rename to tests/Unit/classes/frontendfile/FrontEndFileHandlerTest.php diff --git a/tests/unit/classes/security/SecurityTest.php b/tests/Unit/classes/security/SecurityTest.php similarity index 100% rename from tests/unit/classes/security/SecurityTest.php rename to tests/Unit/classes/security/SecurityTest.php diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/Unit/classes/template/TemplateHandlerTest.php similarity index 93% rename from tests/unit/classes/template/TemplateHandlerTest.php rename to tests/Unit/classes/template/TemplateHandlerTest.php index 4ec211c6c..e3168ad2f 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/Unit/classes/template/TemplateHandlerTest.php @@ -1,7 +1,7 @@
This is another dummy
', - '?>compile(\'tests/unit/classes/template\',\'sample.html\') ?>
This is another dummy
' + '?>compile(\'tests/Unit/classes/template\',\'sample.html\') ?>
This is another dummy
' ), // array( '
This is another dummy
', - '?>compile(\'tests/unit/classes\',\'sample.html\') ?>
This is another dummy
' + '?>compile(\'tests/Unit/classes\',\'sample.html\') ?>
This is another dummy
' ), // array( @@ -113,12 +113,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // array( '', - '?>' + '?>' ), // array( '', - '?>' + '?>' ), // array( @@ -128,12 +128,12 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // array( '', - '?>' + '?>' ), // array( '', - '?>' + '?>' ), // comment array( @@ -148,7 +148,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // relative path1 array( '', - '?>' + '?>' ), // relative path2 array( @@ -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( @@ -223,7 +223,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // issue 746 array( '', - '?>' + '?>' ), // issue 696 array( @@ -233,35 +233,35 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // https://github.com/xpressengine/xe-core/issues/1510 array( '', - PHP_EOL . 'if($__Context->foo->bar){ ?>' + PHP_EOL . 'if($__Context->foo->bar){ ?>' ), // https://github.com/xpressengine/xe-core/issues/1510 array( 'a!@#$%^&*()_-=[]{}?/', - PHP_EOL . 'if($__Context->foo->bar > 100){ ?>a!@#$%^&*()_-=[]{}?/' + PHP_EOL . 'if($__Context->foo->bar > 100){ ?>a!@#$%^&*()_-=[]{}?/' ), // https://github.com/xpressengine/xe-core/issues/1510 array( '', - PHP_EOL . 'if($__Context->foo->bar){ ?>' + PHP_EOL . 'if($__Context->foo->bar){ ?>' ), // https://github.com/xpressengine/xe-core/issues/1510 array( '', - PHP_EOL . 'if(!$__Context->module_info->title){ ?>' + 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" />' + 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' + '?> foo->bar){ ?>alt' ), array( '' . "\n" . ' alt', - '?>' . PHP_EOL . ' foo->bar){ ?>alt' + '?>' . PHP_EOL . ' foo->bar){ ?>alt' ), array( 'asf ', @@ -269,11 +269,11 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test ), 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' + '?>asdf src="../img/img.gif" asdf src asdf src="../img/img.gif" asdf' ), array( 'asdf src="../img/img.gif" asdf', diff --git a/tests/unit/classes/template/css/style.css b/tests/Unit/classes/template/css/style.css similarity index 100% rename from tests/unit/classes/template/css/style.css rename to tests/Unit/classes/template/css/style.css diff --git a/tests/unit/classes/template/sample.html b/tests/Unit/classes/template/sample.html similarity index 100% rename from tests/unit/classes/template/sample.html rename to tests/Unit/classes/template/sample.html diff --git a/tests/unit/classes/validator/ValidatorTest.php b/tests/Unit/classes/validator/ValidatorTest.php similarity index 100% rename from tests/unit/classes/validator/ValidatorTest.php rename to tests/Unit/classes/validator/ValidatorTest.php diff --git a/tests/unit/classes/validator/condition.en.js b/tests/Unit/classes/validator/condition.en.js similarity index 100% rename from tests/unit/classes/validator/condition.en.js rename to tests/Unit/classes/validator/condition.en.js diff --git a/tests/unit/classes/validator/condition.xml b/tests/Unit/classes/validator/condition.xml similarity index 100% rename from tests/unit/classes/validator/condition.xml rename to tests/Unit/classes/validator/condition.xml diff --git a/tests/unit/classes/validator/customrule.xml b/tests/Unit/classes/validator/customrule.xml similarity index 100% rename from tests/unit/classes/validator/customrule.xml rename to tests/Unit/classes/validator/customrule.xml diff --git a/tests/unit/classes/validator/insertDocument.xml b/tests/Unit/classes/validator/insertDocument.xml similarity index 100% rename from tests/unit/classes/validator/insertDocument.xml rename to tests/Unit/classes/validator/insertDocument.xml diff --git a/tests/unit/classes/validator/login.xml b/tests/Unit/classes/validator/login.xml similarity index 100% rename from tests/unit/classes/validator/login.xml rename to tests/Unit/classes/validator/login.xml From b8e209666c6b0eacb7f173470e70957900b9e8f0 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 16:49:52 +0900 Subject: [PATCH 12/14] Remove extra jshint configuration --- .jshintignore | 9 ------- .jshintrc | 68 --------------------------------------------------- 2 files changed, 77 deletions(-) delete mode 100644 .jshintignore delete mode 100644 .jshintrc diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 5f00d3da3..000000000 --- a/.jshintignore +++ /dev/null @@ -1,9 +0,0 @@ -common/js/jquery*.js -common/js/modernizr.js -common/js/xe.js -common/js/x.js -common/js/*.min.js -common/js/unittest/* -common/js/plugins/* -common/js/foggyLayer.js -common/js/html5.js diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index ae1b55f2c..000000000 --- a/.jshintrc +++ /dev/null @@ -1,68 +0,0 @@ -{ - "globalstrict": false, - "undef": false, - "eqeqeq": false, - "browser": true, - "devel": true, - "jquery": true, - "evil": true, - "globals": { - "window": true, - "current_url": true, - "exec_json": true, - "exec_xml": true, - "procFilter": true, - "xe": true, - "request_uri": true, - "xAddEventListener": false, - "xResizeEvent": false, - "xScrollEvent": false, - "xAppendChild": false, - "xClientHeight": false, - "xClientWidth": false, - "xCreateElement": false, - "xDef": false, - "xDeleteCookie": false, - "xDisplay": false, - "xEvent": false, - "xFirstChild": false, - "xGetBodyWidth": false, - "xGetBodyHeight": false, - "xGetComputedStyle": false, - "xGetCookie": false, - "xGetElementById": false, - "xGetElementsByAttribute": false, - "xGetElementsByClassName": false, - "xGetElementsByTagName": false, - "xGetURLArguments": false, - "xHeight": false, - "xHex": false, - "xHide": false, - "xInnerHtml": false, - "xLeft": false, - "xMoveTo": false, - "xName": false, - "xNextSib": false, - "xNum": false, - "xOffsetLeft": false, - "xOffsetTop": false, - "xPad": false, - "xPageX": false, - "xPageY": false, - "xParent": false, - "xPreventDefault": false, - "xPrevSib": false, - "xRemoveEventListener": false, - "xResizeTo": false, - "xScrollLeft": false, - "xScrollTop": false, - "xSetCookie": false, - "xShow": false, - "xStr": false, - "xTop": false, - "xVisibility": false, - "xWidth": false, - "xZIndex": false, - "xStopPropagation": false - } -} From bdc4ccb86e1556881fb0ced5b2b00d001527aacb Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Jan 2016 17:45:53 +0900 Subject: [PATCH 13/14] Move phpDoc directory inside tools --- .gitattributes | 4 +--- {phpDoc => tools/phpDoc}/phpdoc.dist.xml | 14 ++++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) rename {phpDoc => tools/phpDoc}/phpdoc.dist.xml (50%) diff --git a/.gitattributes b/.gitattributes index f54186e54..d6a255849 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,5 @@ .gitignore export-ignore /tools/ export-ignore /tests/ export-ignore -/phpDoc/ export-ignore Gruntfile.js export-ignore -package.json export-ignore -.travis.yml export-ignore \ No newline at end of file +.travis.yml export-ignore diff --git a/phpDoc/phpdoc.dist.xml b/tools/phpDoc/phpdoc.dist.xml similarity index 50% rename from phpDoc/phpdoc.dist.xml rename to tools/phpDoc/phpdoc.dist.xml index c15470e5b..247d8a215 100644 --- a/phpDoc/phpdoc.dist.xml +++ b/tools/phpDoc/phpdoc.dist.xml @@ -1,8 +1,8 @@ - <![CDATA[XpressEngine]]> + <![CDATA[RhymiX]]> - XE + rhymix . @@ -12,13 +12,11 @@