Version Description
- Security Patch
Download this release
Release Info
Developer | DavidWells |
Plugin | WordPress Landing Pages |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 1.9.1
- css/admin-install-plugins.css +0 -0
- images/cta-install.png +0 -0
- images/github-help.jpg +0 -0
- images/leads-install.png +0 -0
- js/admin/admin.install-plugins.js +0 -0
- landing-pages.php +2 -2
- modules/module.ab-testing.metaboxes.php +0 -0
- modules/module.activate.php +0 -0
- modules/module.admin-menus.php +0 -0
- modules/module.javascript-admin.php +0 -0
- modules/module.landing-page-old.php +0 -0
- modules/module.landing-page.php +0 -0
- modules/module.metaboxes-ab-testing.php +4 -3
- modules/module.track.php.orig +0 -0
- modules/module.welcome.php +0 -0
- readme.txt +4 -1
- shared/assets/js/frontend/analytics/inboundAnalytics.js +0 -0
- shared/assets/js/frontend/analytics/inboundAnalytics.min.js +0 -0
- shared/docs/css/blur.jpg +0 -0
- shared/docs/css/style.css +0 -0
- shared/docs/css/theme.css +0 -0
- shared/docs/index.html +0 -0
- shared/docs/js/flatdoc.js +0 -0
- shared/docs/js/jquery.js +0 -0
- shared/docs/js/legacy.js +0 -0
- shared/docs/js/script.js +0 -0
- shared/docs/js/theme.js +0 -0
- shared/docs/main.md +0 -0
- shared/docs/shortcodes.md +0 -0
- templates/do-NOT-install-templates-here.txt +0 -0
- templates/simple-solid-lite/config.php +0 -0
- templates/simple-solid-lite/css/inbound-compiled-style.css +0 -0
- templates/simple-solid-lite/css/main.css +0 -0
- templates/simple-solid-lite/images/inbound-logo.png +0 -0
- templates/simple-solid-lite/index.php +0 -0
- templates/simple-solid-lite/js/jquery.min.js +0 -0
- templates/simple-solid-lite/js/scripts.js +0 -0
- templates/simple-solid-lite/js/selectivizr-min.js +0 -0
- templates/simple-solid-lite/thumbnail.png +0 -0
- tests/bin/phantomloader +0 -7
- tests/bootstrap.php +0 -25
- tests/build/php.conf +0 -4
- tests/build/php.load +0 -1
- tests/build/scratchpad.sh +0 -1
- tests/build/travis-ci-apache +0 -23
- tests/codeception/_bootstrap.php +0 -13
- tests/codeception/_data/dump.sql +0 -1
- tests/codeception/_support/AcceptanceHelper.php +0 -10
- tests/codeception/_support/FunctionalHelper.php +0 -10
- tests/codeception/_support/UnitHelper.php +0 -10
- tests/codeception/acceptance.suite.yml +0 -20
- tests/codeception/acceptance/AcceptanceTester.php +0 -1918
- tests/codeception/acceptance/LoginCept.php +0 -36
- tests/codeception/acceptance/StatisticsCept.php +0 -47
- tests/codeception/acceptance/WelcomeCept.php +0 -7
- tests/codeception/acceptance/_bootstrap.php +0 -2
- tests/codeception/functional.suite.yml +0 -9
- tests/codeception/functional/FunctionalTester.php +0 -360
- tests/codeception/functional/_bootstrap.php +0 -2
- tests/codeception/unit.suite.yml +0 -6
- tests/codeception/unit/UnitTester.php +0 -300
- tests/codeception/unit/_bootstrap.php +0 -2
- tests/phantomjs/server.js +0 -82
- tests/phantomjs/server.php +0 -10
- tests/phantomjs/server.sh +0 -3
- tests/phpunit/bootstrap.php +0 -15
- tests/phpunit/test.activations.php +0 -50
- tests/phpunit/test.statistics.php +0 -96
- tests/test_check_impressions.php +0 -0
- tests/test_wordpress_plugin_tests.php +0 -30
- tests/travis-ci/bootstrap.php +0 -29
- tests/travis-ci/test.activations.php +0 -50
- tests/travis-ci/test.statistics.php +0 -68
css/admin-install-plugins.css
CHANGED
File without changes
|
images/cta-install.png
CHANGED
File without changes
|
images/github-help.jpg
CHANGED
File without changes
|
images/leads-install.png
CHANGED
File without changes
|
js/admin/admin.install-plugins.js
CHANGED
File without changes
|
landing-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
|
6 |
-
Version: 1.9.
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
Text Domain: landing-pages
|
@@ -38,7 +38,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
|
|
38 |
*/
|
39 |
private static function load_constants() {
|
40 |
|
41 |
-
define('LANDINGPAGES_CURRENT_VERSION', '1.9.
|
42 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
43 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
44 |
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
|
6 |
+
Version: 1.9.1
|
7 |
Author: Inbound Now
|
8 |
Author URI: http://www.inboundnow.com/
|
9 |
Text Domain: landing-pages
|
38 |
*/
|
39 |
private static function load_constants() {
|
40 |
|
41 |
+
define('LANDINGPAGES_CURRENT_VERSION', '1.9.1' );
|
42 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
43 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
44 |
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
|
modules/module.ab-testing.metaboxes.php
CHANGED
File without changes
|
modules/module.activate.php
CHANGED
File without changes
|
modules/module.admin-menus.php
CHANGED
File without changes
|
modules/module.javascript-admin.php
CHANGED
File without changes
|
modules/module.landing-page-old.php
CHANGED
File without changes
|
modules/module.landing-page.php
CHANGED
File without changes
|
modules/module.metaboxes-ab-testing.php
CHANGED
@@ -24,7 +24,7 @@ function lp_ab_stats_metabox() {
|
|
24 |
</style>
|
25 |
<div class="inside" style='margin-left:-8px;'>
|
26 |
<div id="bab-stat-box">
|
27 |
-
<?php if (isset($_GET['new_meta_key'])) { ?>
|
28 |
<script type="text/javascript">
|
29 |
jQuery(document).ready(function($) {
|
30 |
// This fixes meta data saves for cloned pages
|
@@ -170,8 +170,9 @@ function lp_ab_testing_add_tabs()
|
|
170 |
if ($post_type_is === "landing-page")
|
171 |
{
|
172 |
$current_variation_id = lp_ab_testing_get_current_variation_id();
|
173 |
-
if (isset($_GET['new_meta_key']))
|
174 |
-
$current_variation_id = $_GET['new_meta_key'];
|
|
|
175 |
|
176 |
echo "<input type='hidden' id='open_variation' value='{$current_variation_id}'>";
|
177 |
|
24 |
</style>
|
25 |
<div class="inside" style='margin-left:-8px;'>
|
26 |
<div id="bab-stat-box">
|
27 |
+
<?php if (isset($_GET['new_meta_key'])||is_numeric($_GET['new_meta_key'])) { ?>
|
28 |
<script type="text/javascript">
|
29 |
jQuery(document).ready(function($) {
|
30 |
// This fixes meta data saves for cloned pages
|
170 |
if ($post_type_is === "landing-page")
|
171 |
{
|
172 |
$current_variation_id = lp_ab_testing_get_current_variation_id();
|
173 |
+
if (isset($_GET['new_meta_key']) && is_numeric($_GET['new_meta_key'])) {
|
174 |
+
$current_variation_id = $_GET['new_meta_key'];
|
175 |
+
}
|
176 |
|
177 |
echo "<input type='hidden' id='open_variation' value='{$current_variation_id}'>";
|
178 |
|
modules/module.track.php.orig
CHANGED
File without changes
|
modules/module.welcome.php
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
Tested up to: 4.2
|
10 |
-
Stable Tag: 1.9.
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
@@ -72,6 +72,9 @@ The plugin is also fully extendable and has a number of actions, filters, and ho
|
|
72 |
4. Choose from a ton of pre-made templates, use your existing design, or design your own theme!
|
73 |
|
74 |
== Changelog ==
|
|
|
|
|
|
|
75 |
= 1.9.0 =
|
76 |
* New preview views in landing page edit screens
|
77 |
* Temporarily disabling geolocation services
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
Tested up to: 4.2
|
10 |
+
Stable Tag: 1.9.1
|
11 |
|
12 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
13 |
|
72 |
4. Choose from a ton of pre-made templates, use your existing design, or design your own theme!
|
73 |
|
74 |
== Changelog ==
|
75 |
+
= 1.9.1 =
|
76 |
+
* Security Patch
|
77 |
+
|
78 |
= 1.9.0 =
|
79 |
* New preview views in landing page edit screens
|
80 |
* Temporarily disabling geolocation services
|
shared/assets/js/frontend/analytics/inboundAnalytics.js
CHANGED
File without changes
|
shared/assets/js/frontend/analytics/inboundAnalytics.min.js
CHANGED
File without changes
|
shared/docs/css/blur.jpg
CHANGED
File without changes
|
shared/docs/css/style.css
CHANGED
File without changes
|
shared/docs/css/theme.css
CHANGED
File without changes
|
shared/docs/index.html
CHANGED
File without changes
|
shared/docs/js/flatdoc.js
CHANGED
File without changes
|
shared/docs/js/jquery.js
CHANGED
File without changes
|
shared/docs/js/legacy.js
CHANGED
File without changes
|
shared/docs/js/script.js
CHANGED
File without changes
|
shared/docs/js/theme.js
CHANGED
File without changes
|
shared/docs/main.md
CHANGED
File without changes
|
shared/docs/shortcodes.md
CHANGED
File without changes
|
templates/do-NOT-install-templates-here.txt
CHANGED
File without changes
|
templates/simple-solid-lite/config.php
CHANGED
File without changes
|
templates/simple-solid-lite/css/inbound-compiled-style.css
CHANGED
File without changes
|
templates/simple-solid-lite/css/main.css
CHANGED
File without changes
|
templates/simple-solid-lite/images/inbound-logo.png
CHANGED
File without changes
|
templates/simple-solid-lite/index.php
CHANGED
File without changes
|
templates/simple-solid-lite/js/jquery.min.js
CHANGED
File without changes
|
templates/simple-solid-lite/js/scripts.js
CHANGED
File without changes
|
templates/simple-solid-lite/js/selectivizr-min.js
CHANGED
File without changes
|
templates/simple-solid-lite/thumbnail.png
CHANGED
File without changes
|
tests/bin/phantomloader
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
#!/usr/bin/env sh
|
2 |
-
SRC_DIR="`pwd`"
|
3 |
-
cd "`dirname "$0"`"
|
4 |
-
cd "../../vendor/jonnyw/php-phantomjs/bin"
|
5 |
-
BIN_TARGET="`pwd`/phantomloader"
|
6 |
-
cd "$SRC_DIR"
|
7 |
-
"$BIN_TARGET" "$@"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/bootstrap.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Bootstrap the plugin unit testing environment.
|
4 |
-
*
|
5 |
-
* Edit 'active_plugins' setting below to point to your main plugin file.
|
6 |
-
*
|
7 |
-
* @package wordpress-plugin-tests
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Activates this plugin in WordPress so it can be tested.
|
11 |
-
$GLOBALS['wp_tests_options'] = array(
|
12 |
-
'active_plugins' => array( 'landing-pages/landing-pages.php' ),
|
13 |
-
);
|
14 |
-
|
15 |
-
// If the develop repo location is defined (as WP_DEVELOP_DIR), use that
|
16 |
-
// location. Otherwise, we'll just assume that this plugin is installed in a
|
17 |
-
// WordPress develop SVN checkout.
|
18 |
-
|
19 |
-
if( false !== getenv( 'WP_DEVELOP_DIR' ) ) {
|
20 |
-
require getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/bootstrap.php';
|
21 |
-
} else {
|
22 |
-
require '../../../../tests/phpunit/includes/bootstrap.php';
|
23 |
-
}
|
24 |
-
|
25 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/build/php.conf
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
<IfModule mod_php5.c>
|
2 |
-
AddType application/x-httpd-php .php .phtml .php5
|
3 |
-
AddType application/x-httpd-php-source .phps
|
4 |
-
</IfModule>
|
|
|
|
|
|
|
|
tests/build/php.load
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
|
|
tests/build/scratchpad.sh
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
phantomjs --webdriver=4444
|
|
tests/build/travis-ci-apache
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<VirtualHost *:80>
|
2 |
-
ServerAdmin tests@inboundnow.com
|
3 |
-
DocumentRoot /var/www/inboundtesting.dev/
|
4 |
-
ServerName inboundtesting.dev
|
5 |
-
ErrorLog ${APACHE_LOG_DIR}/error.log
|
6 |
-
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
7 |
-
|
8 |
-
# Wire up Apache to use Travis CI's php-fpm.
|
9 |
-
<IfModule mod_fastcgi.c>
|
10 |
-
AddHandler php5-fcgi .php
|
11 |
-
Action php5-fcgi /php5-fcgi
|
12 |
-
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
13 |
-
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
|
14 |
-
</IfModule>
|
15 |
-
|
16 |
-
<Directory "/var/www/inboundtesting.dev/">
|
17 |
-
Options FollowSymLinks MultiViews ExecCGI
|
18 |
-
AllowOverride All
|
19 |
-
Order deny,allow
|
20 |
-
Allow from all
|
21 |
-
</Directory>
|
22 |
-
</VirtualHost>
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/_bootstrap.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* load wp */
|
4 |
-
require '../../../wp-load.php';
|
5 |
-
require '../../../wp-admin/includes/plugin.php';
|
6 |
-
|
7 |
-
/* load required landing pages files */
|
8 |
-
include_once LANDINGPAGES_PATH . 'modules/module.install.php';
|
9 |
-
include_once LANDINGPAGES_PATH . 'classes/class.statistics.php';
|
10 |
-
|
11 |
-
/* Set current users */
|
12 |
-
wp_set_current_user( 1 );
|
13 |
-
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/_data/dump.sql
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
/* Replace this file with actual dump of your database */
|
|
tests/codeception/_support/AcceptanceHelper.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Codeception\Module;
|
3 |
-
|
4 |
-
// here you can define custom actions
|
5 |
-
// all public methods declared in helper class will be available in $I
|
6 |
-
|
7 |
-
class AcceptanceHelper extends \Codeception\Module
|
8 |
-
{
|
9 |
-
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/_support/FunctionalHelper.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Codeception\Module;
|
3 |
-
|
4 |
-
// here you can define custom actions
|
5 |
-
// all public methods declared in helper class will be available in $I
|
6 |
-
|
7 |
-
class FunctionalHelper extends \Codeception\Module
|
8 |
-
{
|
9 |
-
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/_support/UnitHelper.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Codeception\Module;
|
3 |
-
|
4 |
-
// here you can define custom actions
|
5 |
-
// all public methods declared in helper class will be available in $I
|
6 |
-
|
7 |
-
class UnitHelper extends \Codeception\Module
|
8 |
-
{
|
9 |
-
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/acceptance.suite.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
# Codeception Test Suite Configuration
|
2 |
-
|
3 |
-
# suite for acceptance tests.
|
4 |
-
# perform tests in browser using the WebDriver or PhpBrowser.
|
5 |
-
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
|
6 |
-
|
7 |
-
class_name: AcceptanceTester
|
8 |
-
modules:
|
9 |
-
enabled:
|
10 |
-
- PhpBrowser
|
11 |
-
- AcceptanceHelper
|
12 |
-
- Asserts
|
13 |
-
config:
|
14 |
-
WebDriver:
|
15 |
-
url: 'http://inboundtesting.dev/'
|
16 |
-
browser: firefox
|
17 |
-
clear_cookies: false
|
18 |
-
window_size: 1024x768
|
19 |
-
PhpBrowser:
|
20 |
-
url: 'http://inboundsoon.dev'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/acceptance/AcceptanceTester.php
DELETED
@@ -1,1918 +0,0 @@
|
|
1 |
-
<?php //[STAMP] 2d5aa64986f8f94bc0f812d88aa9dee6
|
2 |
-
|
3 |
-
// This class was automatically generated by build task
|
4 |
-
// You should not change it manually as it will be overwritten on next build
|
5 |
-
// @codingStandardsIgnoreFile
|
6 |
-
|
7 |
-
|
8 |
-
use Codeception\Module\PhpBrowser;
|
9 |
-
use Codeception\Module\AcceptanceHelper;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Inherited Methods
|
13 |
-
* @method void wantToTest($text)
|
14 |
-
* @method void wantTo($text)
|
15 |
-
* @method void execute($callable)
|
16 |
-
* @method void expectTo($prediction)
|
17 |
-
* @method void expect($prediction)
|
18 |
-
* @method void amGoingTo($argumentation)
|
19 |
-
* @method void am($role)
|
20 |
-
* @method void lookForwardTo($achieveValue)
|
21 |
-
* @method void comment($description)
|
22 |
-
* @method void haveFriend($name, $actorClass = null)
|
23 |
-
*
|
24 |
-
* @SuppressWarnings(PHPMD)
|
25 |
-
*/
|
26 |
-
class AcceptanceTester extends \Codeception\Actor
|
27 |
-
{
|
28 |
-
|
29 |
-
/**
|
30 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
31 |
-
*
|
32 |
-
* Sets the HTTP header to the passed value - which is used on
|
33 |
-
* subsequent HTTP requests through PhpBrowser.
|
34 |
-
*
|
35 |
-
* Example:
|
36 |
-
* ```php
|
37 |
-
* <?php
|
38 |
-
* $I->setHeader('X-Requested-With', 'Codeception');
|
39 |
-
* $I->amOnPage('test-headers.php');
|
40 |
-
* ?>
|
41 |
-
* ```
|
42 |
-
*
|
43 |
-
* @param string $name the name of the request header
|
44 |
-
* @param string $value the value to set it to for subsequent
|
45 |
-
* requests
|
46 |
-
* @see \Codeception\Module\PhpBrowser::setHeader()
|
47 |
-
*/
|
48 |
-
public function setHeader($name, $value) {
|
49 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('setHeader', func_get_args()));
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
/**
|
54 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
55 |
-
*
|
56 |
-
* Deletes the header with the passed name. Subsequent requests
|
57 |
-
* will not have the deleted header in its request.
|
58 |
-
*
|
59 |
-
* Example:
|
60 |
-
* ```php
|
61 |
-
* <?php
|
62 |
-
* $I->setHeader('X-Requested-With', 'Codeception');
|
63 |
-
* $I->amOnPage('test-headers.php');
|
64 |
-
* // ...
|
65 |
-
* $I->deleteHeader('X-Requested-With');
|
66 |
-
* $I->amOnPage('some-other-page.php');
|
67 |
-
* ?>
|
68 |
-
* ```
|
69 |
-
*
|
70 |
-
* @param string $name the name of the header to delete.
|
71 |
-
* @see \Codeception\Module\PhpBrowser::deleteHeader()
|
72 |
-
*/
|
73 |
-
public function deleteHeader($name) {
|
74 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args()));
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
/**
|
79 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
80 |
-
*
|
81 |
-
* Authenticates user for HTTP_AUTH
|
82 |
-
*
|
83 |
-
* @param $username
|
84 |
-
* @param $password
|
85 |
-
* @see \Codeception\Module\PhpBrowser::amHttpAuthenticated()
|
86 |
-
*/
|
87 |
-
public function amHttpAuthenticated($username, $password) {
|
88 |
-
return $this->scenario->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
|
89 |
-
}
|
90 |
-
|
91 |
-
|
92 |
-
/**
|
93 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
94 |
-
*
|
95 |
-
* Opens the page for the given relative URI.
|
96 |
-
*
|
97 |
-
* ``` php
|
98 |
-
* <?php
|
99 |
-
* // opens front page
|
100 |
-
* $I->amOnPage('/');
|
101 |
-
* // opens /register page
|
102 |
-
* $I->amOnPage('/register');
|
103 |
-
* ?>
|
104 |
-
* ```
|
105 |
-
*
|
106 |
-
* @param $page
|
107 |
-
* @see \Codeception\Module\PhpBrowser::amOnPage()
|
108 |
-
*/
|
109 |
-
public function amOnPage($page) {
|
110 |
-
return $this->scenario->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
|
111 |
-
}
|
112 |
-
|
113 |
-
|
114 |
-
/**
|
115 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
116 |
-
*
|
117 |
-
* Open web page at the given absolute URL and sets its hostname as the base host.
|
118 |
-
*
|
119 |
-
* ``` php
|
120 |
-
* <?php
|
121 |
-
* $I->amOnUrl('http://codeception.com');
|
122 |
-
* $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
|
123 |
-
* ?>
|
124 |
-
* ```
|
125 |
-
* @see \Codeception\Module\PhpBrowser::amOnUrl()
|
126 |
-
*/
|
127 |
-
public function amOnUrl($url) {
|
128 |
-
return $this->scenario->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args()));
|
129 |
-
}
|
130 |
-
|
131 |
-
|
132 |
-
/**
|
133 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
134 |
-
*
|
135 |
-
* Changes the subdomain for the 'url' configuration parameter.
|
136 |
-
* Does not open a page; use `amOnPage` for that.
|
137 |
-
*
|
138 |
-
* ``` php
|
139 |
-
* <?php
|
140 |
-
* // If config is: 'http://mysite.com'
|
141 |
-
* // or config is: 'http://www.mysite.com'
|
142 |
-
* // or config is: 'http://company.mysite.com'
|
143 |
-
*
|
144 |
-
* $I->amOnSubdomain('user');
|
145 |
-
* $I->amOnPage('/');
|
146 |
-
* // moves to http://user.mysite.com/
|
147 |
-
* ?>
|
148 |
-
* ```
|
149 |
-
*
|
150 |
-
* @param $subdomain
|
151 |
-
*
|
152 |
-
* @return mixed
|
153 |
-
* @see \Codeception\Module\PhpBrowser::amOnSubdomain()
|
154 |
-
*/
|
155 |
-
public function amOnSubdomain($subdomain) {
|
156 |
-
return $this->scenario->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));
|
157 |
-
}
|
158 |
-
|
159 |
-
|
160 |
-
/**
|
161 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
162 |
-
*
|
163 |
-
* Low-level API method.
|
164 |
-
* If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
|
165 |
-
*
|
166 |
-
* Example:
|
167 |
-
*
|
168 |
-
* ``` php
|
169 |
-
* <?php
|
170 |
-
* $I->executeInGuzzle(function (\GuzzleHttp\Client $client) {
|
171 |
-
* $client->get('/get', ['query' => ['foo' => 'bar']]);
|
172 |
-
* });
|
173 |
-
* ?>
|
174 |
-
* ```
|
175 |
-
*
|
176 |
-
* It is not recommended to use this command on a regular basis.
|
177 |
-
* If Codeception lacks important Guzzle Client methods, implement them and submit patches.
|
178 |
-
*
|
179 |
-
* @param callable $function
|
180 |
-
* @see \Codeception\Module\PhpBrowser::executeInGuzzle()
|
181 |
-
*/
|
182 |
-
public function executeInGuzzle($function) {
|
183 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));
|
184 |
-
}
|
185 |
-
|
186 |
-
|
187 |
-
/**
|
188 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
189 |
-
*
|
190 |
-
* Perform a click on a link or a button, given by a locator.
|
191 |
-
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
192 |
-
* For buttons, the "value" attribute, "name" attribute, and inner text are searched.
|
193 |
-
* For links, the link text is searched.
|
194 |
-
* For images, the "alt" attribute and inner text of any parent links are searched.
|
195 |
-
*
|
196 |
-
* The second parameter is a context (CSS or XPath locator) to narrow the search.
|
197 |
-
*
|
198 |
-
* Note that if the locator matches a button of type `submit`, the form will be submitted.
|
199 |
-
*
|
200 |
-
* ``` php
|
201 |
-
* <?php
|
202 |
-
* // simple link
|
203 |
-
* $I->click('Logout');
|
204 |
-
* // button of form
|
205 |
-
* $I->click('Submit');
|
206 |
-
* // CSS button
|
207 |
-
* $I->click('#form input[type=submit]');
|
208 |
-
* // XPath
|
209 |
-
* $I->click('//form/*[@type=submit]');
|
210 |
-
* // link in context
|
211 |
-
* $I->click('Logout', '#nav');
|
212 |
-
* // using strict locator
|
213 |
-
* $I->click(['link' => 'Login']);
|
214 |
-
* ?>
|
215 |
-
* ```
|
216 |
-
*
|
217 |
-
* @param $link
|
218 |
-
* @param $context
|
219 |
-
* @see \Codeception\Lib\InnerBrowser::click()
|
220 |
-
*/
|
221 |
-
public function click($link, $context = null) {
|
222 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('click', func_get_args()));
|
223 |
-
}
|
224 |
-
|
225 |
-
|
226 |
-
/**
|
227 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
228 |
-
*
|
229 |
-
* Checks that the current page contains the given string.
|
230 |
-
* Specify a locator as the second parameter to match a specific region.
|
231 |
-
*
|
232 |
-
* ``` php
|
233 |
-
* <?php
|
234 |
-
* $I->see('Logout'); // I can suppose user is logged in
|
235 |
-
* $I->see('Sign Up','h1'); // I can suppose it's a signup page
|
236 |
-
* $I->see('Sign Up','//body/h1'); // with XPath
|
237 |
-
* ?>
|
238 |
-
* ```
|
239 |
-
*
|
240 |
-
* @param $text
|
241 |
-
* @param null $selector
|
242 |
-
* Conditional Assertion: Test won't be stopped on fail
|
243 |
-
* @see \Codeception\Lib\InnerBrowser::see()
|
244 |
-
*/
|
245 |
-
public function canSee($text, $selector = null) {
|
246 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
|
247 |
-
}
|
248 |
-
/**
|
249 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
250 |
-
*
|
251 |
-
* Checks that the current page contains the given string.
|
252 |
-
* Specify a locator as the second parameter to match a specific region.
|
253 |
-
*
|
254 |
-
* ``` php
|
255 |
-
* <?php
|
256 |
-
* $I->see('Logout'); // I can suppose user is logged in
|
257 |
-
* $I->see('Sign Up','h1'); // I can suppose it's a signup page
|
258 |
-
* $I->see('Sign Up','//body/h1'); // with XPath
|
259 |
-
* ?>
|
260 |
-
* ```
|
261 |
-
*
|
262 |
-
* @param $text
|
263 |
-
* @param null $selector
|
264 |
-
* @see \Codeception\Lib\InnerBrowser::see()
|
265 |
-
*/
|
266 |
-
public function see($text, $selector = null) {
|
267 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
|
268 |
-
}
|
269 |
-
|
270 |
-
|
271 |
-
/**
|
272 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
273 |
-
*
|
274 |
-
* Checks that the current page doesn't contain the text specified.
|
275 |
-
* Give a locator as the second parameter to match a specific region.
|
276 |
-
*
|
277 |
-
* ```php
|
278 |
-
* <?php
|
279 |
-
* $I->dontSee('Login'); // I can suppose user is already logged in
|
280 |
-
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
281 |
-
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
282 |
-
* ?>
|
283 |
-
* ```
|
284 |
-
*
|
285 |
-
* @param $text
|
286 |
-
* @param null $selector
|
287 |
-
* Conditional Assertion: Test won't be stopped on fail
|
288 |
-
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
289 |
-
*/
|
290 |
-
public function cantSee($text, $selector = null) {
|
291 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
|
292 |
-
}
|
293 |
-
/**
|
294 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
295 |
-
*
|
296 |
-
* Checks that the current page doesn't contain the text specified.
|
297 |
-
* Give a locator as the second parameter to match a specific region.
|
298 |
-
*
|
299 |
-
* ```php
|
300 |
-
* <?php
|
301 |
-
* $I->dontSee('Login'); // I can suppose user is already logged in
|
302 |
-
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
303 |
-
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
304 |
-
* ?>
|
305 |
-
* ```
|
306 |
-
*
|
307 |
-
* @param $text
|
308 |
-
* @param null $selector
|
309 |
-
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
310 |
-
*/
|
311 |
-
public function dontSee($text, $selector = null) {
|
312 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
|
313 |
-
}
|
314 |
-
|
315 |
-
|
316 |
-
/**
|
317 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
318 |
-
*
|
319 |
-
* Checks that there's a link with the specified text.
|
320 |
-
* Give a full URL as the second parameter to match links with that exact URL.
|
321 |
-
*
|
322 |
-
* ``` php
|
323 |
-
* <?php
|
324 |
-
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
325 |
-
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
326 |
-
* ?>
|
327 |
-
* ```
|
328 |
-
*
|
329 |
-
* @param $text
|
330 |
-
* @param null $url
|
331 |
-
* Conditional Assertion: Test won't be stopped on fail
|
332 |
-
* @see \Codeception\Lib\InnerBrowser::seeLink()
|
333 |
-
*/
|
334 |
-
public function canSeeLink($text, $url = null) {
|
335 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
|
336 |
-
}
|
337 |
-
/**
|
338 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
339 |
-
*
|
340 |
-
* Checks that there's a link with the specified text.
|
341 |
-
* Give a full URL as the second parameter to match links with that exact URL.
|
342 |
-
*
|
343 |
-
* ``` php
|
344 |
-
* <?php
|
345 |
-
* $I->seeLink('Logout'); // matches <a href="#">Logout</a>
|
346 |
-
* $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
|
347 |
-
* ?>
|
348 |
-
* ```
|
349 |
-
*
|
350 |
-
* @param $text
|
351 |
-
* @param null $url
|
352 |
-
* @see \Codeception\Lib\InnerBrowser::seeLink()
|
353 |
-
*/
|
354 |
-
public function seeLink($text, $url = null) {
|
355 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
|
356 |
-
}
|
357 |
-
|
358 |
-
|
359 |
-
/**
|
360 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
361 |
-
*
|
362 |
-
* Checks that the page doesn't contain a link with the given string.
|
363 |
-
* If the second parameter is given, only links with a matching "href" attribute will be checked.
|
364 |
-
*
|
365 |
-
* ``` php
|
366 |
-
* <?php
|
367 |
-
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
368 |
-
* $I->dontSeeLink('Checkout now', '/store/cart.php');
|
369 |
-
* ?>
|
370 |
-
* ```
|
371 |
-
*
|
372 |
-
* @param $text
|
373 |
-
* @param null $url
|
374 |
-
* Conditional Assertion: Test won't be stopped on fail
|
375 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeLink()
|
376 |
-
*/
|
377 |
-
public function cantSeeLink($text, $url = null) {
|
378 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
|
379 |
-
}
|
380 |
-
/**
|
381 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
382 |
-
*
|
383 |
-
* Checks that the page doesn't contain a link with the given string.
|
384 |
-
* If the second parameter is given, only links with a matching "href" attribute will be checked.
|
385 |
-
*
|
386 |
-
* ``` php
|
387 |
-
* <?php
|
388 |
-
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
|
389 |
-
* $I->dontSeeLink('Checkout now', '/store/cart.php');
|
390 |
-
* ?>
|
391 |
-
* ```
|
392 |
-
*
|
393 |
-
* @param $text
|
394 |
-
* @param null $url
|
395 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeLink()
|
396 |
-
*/
|
397 |
-
public function dontSeeLink($text, $url = null) {
|
398 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
|
399 |
-
}
|
400 |
-
|
401 |
-
|
402 |
-
/**
|
403 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
404 |
-
*
|
405 |
-
* Checks that current URI contains the given string.
|
406 |
-
*
|
407 |
-
* ``` php
|
408 |
-
* <?php
|
409 |
-
* // to match: /home/dashboard
|
410 |
-
* $I->seeInCurrentUrl('home');
|
411 |
-
* // to match: /users/1
|
412 |
-
* $I->seeInCurrentUrl('/users/');
|
413 |
-
* ?>
|
414 |
-
* ```
|
415 |
-
*
|
416 |
-
* @param $uri
|
417 |
-
* Conditional Assertion: Test won't be stopped on fail
|
418 |
-
* @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
|
419 |
-
*/
|
420 |
-
public function canSeeInCurrentUrl($uri) {
|
421 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
|
422 |
-
}
|
423 |
-
/**
|
424 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
425 |
-
*
|
426 |
-
* Checks that current URI contains the given string.
|
427 |
-
*
|
428 |
-
* ``` php
|
429 |
-
* <?php
|
430 |
-
* // to match: /home/dashboard
|
431 |
-
* $I->seeInCurrentUrl('home');
|
432 |
-
* // to match: /users/1
|
433 |
-
* $I->seeInCurrentUrl('/users/');
|
434 |
-
* ?>
|
435 |
-
* ```
|
436 |
-
*
|
437 |
-
* @param $uri
|
438 |
-
* @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
|
439 |
-
*/
|
440 |
-
public function seeInCurrentUrl($uri) {
|
441 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
|
442 |
-
}
|
443 |
-
|
444 |
-
|
445 |
-
/**
|
446 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
447 |
-
*
|
448 |
-
* Checks that the current URI doesn't contain the given string.
|
449 |
-
*
|
450 |
-
* ``` php
|
451 |
-
* <?php
|
452 |
-
* $I->dontSeeInCurrentUrl('/users/');
|
453 |
-
* ?>
|
454 |
-
* ```
|
455 |
-
*
|
456 |
-
* @param $uri
|
457 |
-
* Conditional Assertion: Test won't be stopped on fail
|
458 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
|
459 |
-
*/
|
460 |
-
public function cantSeeInCurrentUrl($uri) {
|
461 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
|
462 |
-
}
|
463 |
-
/**
|
464 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
465 |
-
*
|
466 |
-
* Checks that the current URI doesn't contain the given string.
|
467 |
-
*
|
468 |
-
* ``` php
|
469 |
-
* <?php
|
470 |
-
* $I->dontSeeInCurrentUrl('/users/');
|
471 |
-
* ?>
|
472 |
-
* ```
|
473 |
-
*
|
474 |
-
* @param $uri
|
475 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
|
476 |
-
*/
|
477 |
-
public function dontSeeInCurrentUrl($uri) {
|
478 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
|
479 |
-
}
|
480 |
-
|
481 |
-
|
482 |
-
/**
|
483 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
484 |
-
*
|
485 |
-
* Checks that the current URL is equal to the given string.
|
486 |
-
* Unlike `seeInCurrentUrl`, this only matches the full URL.
|
487 |
-
*
|
488 |
-
* ``` php
|
489 |
-
* <?php
|
490 |
-
* // to match root url
|
491 |
-
* $I->seeCurrentUrlEquals('/');
|
492 |
-
* ?>
|
493 |
-
* ```
|
494 |
-
*
|
495 |
-
* @param $uri
|
496 |
-
* Conditional Assertion: Test won't be stopped on fail
|
497 |
-
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
|
498 |
-
*/
|
499 |
-
public function canSeeCurrentUrlEquals($uri) {
|
500 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
|
501 |
-
}
|
502 |
-
/**
|
503 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
504 |
-
*
|
505 |
-
* Checks that the current URL is equal to the given string.
|
506 |
-
* Unlike `seeInCurrentUrl`, this only matches the full URL.
|
507 |
-
*
|
508 |
-
* ``` php
|
509 |
-
* <?php
|
510 |
-
* // to match root url
|
511 |
-
* $I->seeCurrentUrlEquals('/');
|
512 |
-
* ?>
|
513 |
-
* ```
|
514 |
-
*
|
515 |
-
* @param $uri
|
516 |
-
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
|
517 |
-
*/
|
518 |
-
public function seeCurrentUrlEquals($uri) {
|
519 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
|
520 |
-
}
|
521 |
-
|
522 |
-
|
523 |
-
/**
|
524 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
525 |
-
*
|
526 |
-
* Checks that the current URL doesn't equal the given string.
|
527 |
-
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
|
528 |
-
*
|
529 |
-
* ``` php
|
530 |
-
* <?php
|
531 |
-
* // current url is not root
|
532 |
-
* $I->dontSeeCurrentUrlEquals('/');
|
533 |
-
* ?>
|
534 |
-
* ```
|
535 |
-
*
|
536 |
-
* @param $uri
|
537 |
-
* Conditional Assertion: Test won't be stopped on fail
|
538 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
|
539 |
-
*/
|
540 |
-
public function cantSeeCurrentUrlEquals($uri) {
|
541 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
|
542 |
-
}
|
543 |
-
/**
|
544 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
545 |
-
*
|
546 |
-
* Checks that the current URL doesn't equal the given string.
|
547 |
-
* Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
|
548 |
-
*
|
549 |
-
* ``` php
|
550 |
-
* <?php
|
551 |
-
* // current url is not root
|
552 |
-
* $I->dontSeeCurrentUrlEquals('/');
|
553 |
-
* ?>
|
554 |
-
* ```
|
555 |
-
*
|
556 |
-
* @param $uri
|
557 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
|
558 |
-
*/
|
559 |
-
public function dontSeeCurrentUrlEquals($uri) {
|
560 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
|
561 |
-
}
|
562 |
-
|
563 |
-
|
564 |
-
/**
|
565 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
566 |
-
*
|
567 |
-
* Checks that the current URL matches the given regular expression.
|
568 |
-
*
|
569 |
-
* ``` php
|
570 |
-
* <?php
|
571 |
-
* // to match root url
|
572 |
-
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
573 |
-
* ?>
|
574 |
-
* ```
|
575 |
-
*
|
576 |
-
* @param $uri
|
577 |
-
* Conditional Assertion: Test won't be stopped on fail
|
578 |
-
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
|
579 |
-
*/
|
580 |
-
public function canSeeCurrentUrlMatches($uri) {
|
581 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
|
582 |
-
}
|
583 |
-
/**
|
584 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
585 |
-
*
|
586 |
-
* Checks that the current URL matches the given regular expression.
|
587 |
-
*
|
588 |
-
* ``` php
|
589 |
-
* <?php
|
590 |
-
* // to match root url
|
591 |
-
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
|
592 |
-
* ?>
|
593 |
-
* ```
|
594 |
-
*
|
595 |
-
* @param $uri
|
596 |
-
* @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
|
597 |
-
*/
|
598 |
-
public function seeCurrentUrlMatches($uri) {
|
599 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
|
600 |
-
}
|
601 |
-
|
602 |
-
|
603 |
-
/**
|
604 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
605 |
-
*
|
606 |
-
* Checks that current url doesn't match the given regular expression.
|
607 |
-
*
|
608 |
-
* ``` php
|
609 |
-
* <?php
|
610 |
-
* // to match root url
|
611 |
-
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
612 |
-
* ?>
|
613 |
-
* ```
|
614 |
-
*
|
615 |
-
* @param $uri
|
616 |
-
* Conditional Assertion: Test won't be stopped on fail
|
617 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
|
618 |
-
*/
|
619 |
-
public function cantSeeCurrentUrlMatches($uri) {
|
620 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
|
621 |
-
}
|
622 |
-
/**
|
623 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
624 |
-
*
|
625 |
-
* Checks that current url doesn't match the given regular expression.
|
626 |
-
*
|
627 |
-
* ``` php
|
628 |
-
* <?php
|
629 |
-
* // to match root url
|
630 |
-
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
|
631 |
-
* ?>
|
632 |
-
* ```
|
633 |
-
*
|
634 |
-
* @param $uri
|
635 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
|
636 |
-
*/
|
637 |
-
public function dontSeeCurrentUrlMatches($uri) {
|
638 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
|
639 |
-
}
|
640 |
-
|
641 |
-
|
642 |
-
/**
|
643 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
644 |
-
*
|
645 |
-
* Executes the given regular expression against the current URI and returns the first match.
|
646 |
-
* If no parameters are provided, the full URI is returned.
|
647 |
-
*
|
648 |
-
* ``` php
|
649 |
-
* <?php
|
650 |
-
* $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');
|
651 |
-
* $uri = $I->grabFromCurrentUrl();
|
652 |
-
* ?>
|
653 |
-
* ```
|
654 |
-
*
|
655 |
-
* @param null $uri
|
656 |
-
*
|
657 |
-
* @internal param $url
|
658 |
-
* @return mixed
|
659 |
-
* @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
|
660 |
-
*/
|
661 |
-
public function grabFromCurrentUrl($uri = null) {
|
662 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
|
663 |
-
}
|
664 |
-
|
665 |
-
|
666 |
-
/**
|
667 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
668 |
-
*
|
669 |
-
* Checks that the specified checkbox is checked.
|
670 |
-
*
|
671 |
-
* ``` php
|
672 |
-
* <?php
|
673 |
-
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
674 |
-
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
675 |
-
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
676 |
-
* ?>
|
677 |
-
* ```
|
678 |
-
*
|
679 |
-
* @param $checkbox
|
680 |
-
* Conditional Assertion: Test won't be stopped on fail
|
681 |
-
* @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
|
682 |
-
*/
|
683 |
-
public function canSeeCheckboxIsChecked($checkbox) {
|
684 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
|
685 |
-
}
|
686 |
-
/**
|
687 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
688 |
-
*
|
689 |
-
* Checks that the specified checkbox is checked.
|
690 |
-
*
|
691 |
-
* ``` php
|
692 |
-
* <?php
|
693 |
-
* $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
|
694 |
-
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
|
695 |
-
* $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
|
696 |
-
* ?>
|
697 |
-
* ```
|
698 |
-
*
|
699 |
-
* @param $checkbox
|
700 |
-
* @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
|
701 |
-
*/
|
702 |
-
public function seeCheckboxIsChecked($checkbox) {
|
703 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
|
704 |
-
}
|
705 |
-
|
706 |
-
|
707 |
-
/**
|
708 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
709 |
-
*
|
710 |
-
* Check that the specified checkbox is unchecked.
|
711 |
-
*
|
712 |
-
* ``` php
|
713 |
-
* <?php
|
714 |
-
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
715 |
-
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
716 |
-
* ?>
|
717 |
-
* ```
|
718 |
-
*
|
719 |
-
* @param $checkbox
|
720 |
-
* Conditional Assertion: Test won't be stopped on fail
|
721 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
|
722 |
-
*/
|
723 |
-
public function cantSeeCheckboxIsChecked($checkbox) {
|
724 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
|
725 |
-
}
|
726 |
-
/**
|
727 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
728 |
-
*
|
729 |
-
* Check that the specified checkbox is unchecked.
|
730 |
-
*
|
731 |
-
* ``` php
|
732 |
-
* <?php
|
733 |
-
* $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
|
734 |
-
* $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
|
735 |
-
* ?>
|
736 |
-
* ```
|
737 |
-
*
|
738 |
-
* @param $checkbox
|
739 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
|
740 |
-
*/
|
741 |
-
public function dontSeeCheckboxIsChecked($checkbox) {
|
742 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
|
743 |
-
}
|
744 |
-
|
745 |
-
|
746 |
-
/**
|
747 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
748 |
-
*
|
749 |
-
* Checks that the given input field or textarea contains the given value.
|
750 |
-
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
751 |
-
*
|
752 |
-
* ``` php
|
753 |
-
* <?php
|
754 |
-
* $I->seeInField('Body','Type your comment here');
|
755 |
-
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
756 |
-
* $I->seeInField('form input[type=hidden]','hidden_value');
|
757 |
-
* $I->seeInField('#searchform input','Search');
|
758 |
-
* $I->seeInField('//form/*[@name=search]','Search');
|
759 |
-
* $I->seeInField(['name' => 'search'], 'Search');
|
760 |
-
* ?>
|
761 |
-
* ```
|
762 |
-
*
|
763 |
-
* @param $field
|
764 |
-
* @param $value
|
765 |
-
* Conditional Assertion: Test won't be stopped on fail
|
766 |
-
* @see \Codeception\Lib\InnerBrowser::seeInField()
|
767 |
-
*/
|
768 |
-
public function canSeeInField($field, $value) {
|
769 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
|
770 |
-
}
|
771 |
-
/**
|
772 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
773 |
-
*
|
774 |
-
* Checks that the given input field or textarea contains the given value.
|
775 |
-
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
776 |
-
*
|
777 |
-
* ``` php
|
778 |
-
* <?php
|
779 |
-
* $I->seeInField('Body','Type your comment here');
|
780 |
-
* $I->seeInField('form textarea[name=body]','Type your comment here');
|
781 |
-
* $I->seeInField('form input[type=hidden]','hidden_value');
|
782 |
-
* $I->seeInField('#searchform input','Search');
|
783 |
-
* $I->seeInField('//form/*[@name=search]','Search');
|
784 |
-
* $I->seeInField(['name' => 'search'], 'Search');
|
785 |
-
* ?>
|
786 |
-
* ```
|
787 |
-
*
|
788 |
-
* @param $field
|
789 |
-
* @param $value
|
790 |
-
* @see \Codeception\Lib\InnerBrowser::seeInField()
|
791 |
-
*/
|
792 |
-
public function seeInField($field, $value) {
|
793 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
|
794 |
-
}
|
795 |
-
|
796 |
-
|
797 |
-
/**
|
798 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
799 |
-
*
|
800 |
-
* Checks that an input field or textarea doesn't contain the given value.
|
801 |
-
* For fuzzy locators, the field is matched by label text, CSS and XPath.
|
802 |
-
*
|
803 |
-
* ``` php
|
804 |
-
* <?php
|
805 |
-
* $I->dontSeeInField('Body','Type your comment here');
|
806 |
-
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
807 |
-
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
808 |
-
* $I->dontSeeInField('#searchform input','Search');
|
809 |
-
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
810 |
-
* $I->dontSeeInField(['name' => 'search'], 'Search');
|
811 |
-
* ?>
|
812 |
-
* ```
|
813 |
-
*
|
814 |
-
* @param $field
|
815 |
-
* @param $value
|
816 |
-
* Conditional Assertion: Test won't be stopped on fail
|
817 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInField()
|
818 |
-
*/
|
819 |
-
public function cantSeeInField($field, $value) {
|
820 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
|
821 |
-
}
|
822 |
-
/**
|
823 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
824 |
-
*
|
825 |
-
* Checks that an input field or textarea doesn't contain the given value.
|
826 |
-
* For fuzzy locators, the field is matched by label text, CSS and XPath.
|
827 |
-
*
|
828 |
-
* ``` php
|
829 |
-
* <?php
|
830 |
-
* $I->dontSeeInField('Body','Type your comment here');
|
831 |
-
* $I->dontSeeInField('form textarea[name=body]','Type your comment here');
|
832 |
-
* $I->dontSeeInField('form input[type=hidden]','hidden_value');
|
833 |
-
* $I->dontSeeInField('#searchform input','Search');
|
834 |
-
* $I->dontSeeInField('//form/*[@name=search]','Search');
|
835 |
-
* $I->dontSeeInField(['name' => 'search'], 'Search');
|
836 |
-
* ?>
|
837 |
-
* ```
|
838 |
-
*
|
839 |
-
* @param $field
|
840 |
-
* @param $value
|
841 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInField()
|
842 |
-
*/
|
843 |
-
public function dontSeeInField($field, $value) {
|
844 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
|
845 |
-
}
|
846 |
-
|
847 |
-
|
848 |
-
/**
|
849 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
850 |
-
*
|
851 |
-
* Checks if the array of form parameters (name => value) are set on the form matched with the
|
852 |
-
* passed selector.
|
853 |
-
*
|
854 |
-
* ``` php
|
855 |
-
* <?php
|
856 |
-
* $I->seeInFormFields('form[name=myform]', [
|
857 |
-
* 'input1' => 'value',
|
858 |
-
* 'input2' => 'other value',
|
859 |
-
* ]);
|
860 |
-
* ?>
|
861 |
-
* ```
|
862 |
-
*
|
863 |
-
* For multi-select elements, or to check values of multiple elements with the same name, an
|
864 |
-
* array may be passed:
|
865 |
-
*
|
866 |
-
* ``` php
|
867 |
-
* <?php
|
868 |
-
* $I->seeInFormFields('.form-class', [
|
869 |
-
* 'multiselect' => [
|
870 |
-
* 'value1',
|
871 |
-
* 'value2',
|
872 |
-
* ],
|
873 |
-
* 'checkbox[]' => [
|
874 |
-
* 'a checked value',
|
875 |
-
* 'another checked value',
|
876 |
-
* ],
|
877 |
-
* ]);
|
878 |
-
* ?>
|
879 |
-
* ```
|
880 |
-
*
|
881 |
-
* Additionally, checkbox values can be checked with a boolean.
|
882 |
-
*
|
883 |
-
* ``` php
|
884 |
-
* <?php
|
885 |
-
* $I->seeInFormFields('#form-id', [
|
886 |
-
* 'checkbox1' => true, // passes if checked
|
887 |
-
* 'checkbox2' => false, // passes if unchecked
|
888 |
-
* ]);
|
889 |
-
* ?>
|
890 |
-
* ```
|
891 |
-
*
|
892 |
-
* Pair this with submitForm for quick testing magic.
|
893 |
-
*
|
894 |
-
* ``` php
|
895 |
-
* <?php
|
896 |
-
* $form = [
|
897 |
-
* 'field1' => 'value',
|
898 |
-
* 'field2' => 'another value',
|
899 |
-
* 'checkbox1' => true,
|
900 |
-
* // ...
|
901 |
-
* ];
|
902 |
-
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
903 |
-
* // $I->amOnPage('/path/to/form-page') may be needed
|
904 |
-
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
905 |
-
* ?>
|
906 |
-
* ```
|
907 |
-
*
|
908 |
-
* @param $formSelector
|
909 |
-
* @param $params
|
910 |
-
* Conditional Assertion: Test won't be stopped on fail
|
911 |
-
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
|
912 |
-
*/
|
913 |
-
public function canSeeInFormFields($formSelector, $params) {
|
914 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
|
915 |
-
}
|
916 |
-
/**
|
917 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
918 |
-
*
|
919 |
-
* Checks if the array of form parameters (name => value) are set on the form matched with the
|
920 |
-
* passed selector.
|
921 |
-
*
|
922 |
-
* ``` php
|
923 |
-
* <?php
|
924 |
-
* $I->seeInFormFields('form[name=myform]', [
|
925 |
-
* 'input1' => 'value',
|
926 |
-
* 'input2' => 'other value',
|
927 |
-
* ]);
|
928 |
-
* ?>
|
929 |
-
* ```
|
930 |
-
*
|
931 |
-
* For multi-select elements, or to check values of multiple elements with the same name, an
|
932 |
-
* array may be passed:
|
933 |
-
*
|
934 |
-
* ``` php
|
935 |
-
* <?php
|
936 |
-
* $I->seeInFormFields('.form-class', [
|
937 |
-
* 'multiselect' => [
|
938 |
-
* 'value1',
|
939 |
-
* 'value2',
|
940 |
-
* ],
|
941 |
-
* 'checkbox[]' => [
|
942 |
-
* 'a checked value',
|
943 |
-
* 'another checked value',
|
944 |
-
* ],
|
945 |
-
* ]);
|
946 |
-
* ?>
|
947 |
-
* ```
|
948 |
-
*
|
949 |
-
* Additionally, checkbox values can be checked with a boolean.
|
950 |
-
*
|
951 |
-
* ``` php
|
952 |
-
* <?php
|
953 |
-
* $I->seeInFormFields('#form-id', [
|
954 |
-
* 'checkbox1' => true, // passes if checked
|
955 |
-
* 'checkbox2' => false, // passes if unchecked
|
956 |
-
* ]);
|
957 |
-
* ?>
|
958 |
-
* ```
|
959 |
-
*
|
960 |
-
* Pair this with submitForm for quick testing magic.
|
961 |
-
*
|
962 |
-
* ``` php
|
963 |
-
* <?php
|
964 |
-
* $form = [
|
965 |
-
* 'field1' => 'value',
|
966 |
-
* 'field2' => 'another value',
|
967 |
-
* 'checkbox1' => true,
|
968 |
-
* // ...
|
969 |
-
* ];
|
970 |
-
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
971 |
-
* // $I->amOnPage('/path/to/form-page') may be needed
|
972 |
-
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
973 |
-
* ?>
|
974 |
-
* ```
|
975 |
-
*
|
976 |
-
* @param $formSelector
|
977 |
-
* @param $params
|
978 |
-
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
|
979 |
-
*/
|
980 |
-
public function seeInFormFields($formSelector, $params) {
|
981 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
|
982 |
-
}
|
983 |
-
|
984 |
-
|
985 |
-
/**
|
986 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
987 |
-
*
|
988 |
-
* Checks if the array of form parameters (name => value) are not set on the form matched with
|
989 |
-
* the passed selector.
|
990 |
-
*
|
991 |
-
* ``` php
|
992 |
-
* <?php
|
993 |
-
* $I->dontSeeInFormFields('form[name=myform]', [
|
994 |
-
* 'input1' => 'non-existent value',
|
995 |
-
* 'input2' => 'other non-existent value',
|
996 |
-
* ]);
|
997 |
-
* ?>
|
998 |
-
* ```
|
999 |
-
*
|
1000 |
-
* To check that an element hasn't been assigned any one of many values, an array can be passed
|
1001 |
-
* as the value:
|
1002 |
-
*
|
1003 |
-
* ``` php
|
1004 |
-
* <?php
|
1005 |
-
* $I->dontSeeInFormFields('.form-class', [
|
1006 |
-
* 'fieldName' => [
|
1007 |
-
* 'This value shouldn\'t be set',
|
1008 |
-
* 'And this value shouldn\'t be set',
|
1009 |
-
* ],
|
1010 |
-
* ]);
|
1011 |
-
* ?>
|
1012 |
-
* ```
|
1013 |
-
*
|
1014 |
-
* Additionally, checkbox values can be checked with a boolean.
|
1015 |
-
*
|
1016 |
-
* ``` php
|
1017 |
-
* <?php
|
1018 |
-
* $I->dontSeeInFormFields('#form-id', [
|
1019 |
-
* 'checkbox1' => true, // fails if checked
|
1020 |
-
* 'checkbox2' => false, // fails if unchecked
|
1021 |
-
* ]);
|
1022 |
-
* ?>
|
1023 |
-
* ```
|
1024 |
-
*
|
1025 |
-
* @param $formSelector
|
1026 |
-
* @param $params
|
1027 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1028 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
|
1029 |
-
*/
|
1030 |
-
public function cantSeeInFormFields($formSelector, $params) {
|
1031 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
|
1032 |
-
}
|
1033 |
-
/**
|
1034 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1035 |
-
*
|
1036 |
-
* Checks if the array of form parameters (name => value) are not set on the form matched with
|
1037 |
-
* the passed selector.
|
1038 |
-
*
|
1039 |
-
* ``` php
|
1040 |
-
* <?php
|
1041 |
-
* $I->dontSeeInFormFields('form[name=myform]', [
|
1042 |
-
* 'input1' => 'non-existent value',
|
1043 |
-
* 'input2' => 'other non-existent value',
|
1044 |
-
* ]);
|
1045 |
-
* ?>
|
1046 |
-
* ```
|
1047 |
-
*
|
1048 |
-
* To check that an element hasn't been assigned any one of many values, an array can be passed
|
1049 |
-
* as the value:
|
1050 |
-
*
|
1051 |
-
* ``` php
|
1052 |
-
* <?php
|
1053 |
-
* $I->dontSeeInFormFields('.form-class', [
|
1054 |
-
* 'fieldName' => [
|
1055 |
-
* 'This value shouldn\'t be set',
|
1056 |
-
* 'And this value shouldn\'t be set',
|
1057 |
-
* ],
|
1058 |
-
* ]);
|
1059 |
-
* ?>
|
1060 |
-
* ```
|
1061 |
-
*
|
1062 |
-
* Additionally, checkbox values can be checked with a boolean.
|
1063 |
-
*
|
1064 |
-
* ``` php
|
1065 |
-
* <?php
|
1066 |
-
* $I->dontSeeInFormFields('#form-id', [
|
1067 |
-
* 'checkbox1' => true, // fails if checked
|
1068 |
-
* 'checkbox2' => false, // fails if unchecked
|
1069 |
-
* ]);
|
1070 |
-
* ?>
|
1071 |
-
* ```
|
1072 |
-
*
|
1073 |
-
* @param $formSelector
|
1074 |
-
* @param $params
|
1075 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
|
1076 |
-
*/
|
1077 |
-
public function dontSeeInFormFields($formSelector, $params) {
|
1078 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
|
1082 |
-
/**
|
1083 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1084 |
-
*
|
1085 |
-
* Submits the given form on the page, optionally with the given form values.
|
1086 |
-
* Give the form fields values as an array.
|
1087 |
-
*
|
1088 |
-
* Skipped fields will be filled by their values from the page.
|
1089 |
-
* You don't need to click the 'Submit' button afterwards.
|
1090 |
-
* This command itself triggers the request to form's action.
|
1091 |
-
*
|
1092 |
-
* You can optionally specify what button's value to include
|
1093 |
-
* in the request with the last parameter as an alternative to
|
1094 |
-
* explicitly setting its value in the second parameter, as
|
1095 |
-
* button values are not otherwise included in the request.
|
1096 |
-
*
|
1097 |
-
* Examples:
|
1098 |
-
*
|
1099 |
-
* ``` php
|
1100 |
-
* <?php
|
1101 |
-
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
|
1102 |
-
* // or
|
1103 |
-
* $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'), 'submitButtonName');
|
1104 |
-
*
|
1105 |
-
* ```
|
1106 |
-
*
|
1107 |
-
* For example, given this sample "Sign Up" form:
|
1108 |
-
*
|
1109 |
-
* ``` html
|
1110 |
-
* <form action="/sign_up">
|
1111 |
-
* Login: <input type="text" name="user[login]" /><br/>
|
1112 |
-
* Password: <input type="password" name="user[password]" /><br/>
|
1113 |
-
* Do you agree to out terms? <input type="checkbox" name="user[agree]" /><br/>
|
1114 |
-
* Select pricing plan <select name="plan"><option value="1">Free</option><option value="2" selected="selected">Paid</option></select>
|
1115 |
-
* <input type="submit" name="submitButton" value="Submit" />
|
1116 |
-
* </form>
|
1117 |
-
* ```
|
1118 |
-
*
|
1119 |
-
* You could write the following to submit it:
|
1120 |
-
*
|
1121 |
-
* ``` php
|
1122 |
-
* <?php
|
1123 |
-
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)), 'submitButton');
|
1124 |
-
*
|
1125 |
-
* ```
|
1126 |
-
* Note that "2" will be the submitted value for the "plan" field, as it is the selected option.
|
1127 |
-
*
|
1128 |
-
* You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm.
|
1129 |
-
*
|
1130 |
-
* ```php
|
1131 |
-
* <?php
|
1132 |
-
* $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
|
1133 |
-
*
|
1134 |
-
* ```
|
1135 |
-
*
|
1136 |
-
* Pair this with seeInFormFields for quick testing magic.
|
1137 |
-
*
|
1138 |
-
* ``` php
|
1139 |
-
* <?php
|
1140 |
-
* $form = [
|
1141 |
-
* 'field1' => 'value',
|
1142 |
-
* 'field2' => 'another value',
|
1143 |
-
* 'checkbox1' => true,
|
1144 |
-
* // ...
|
1145 |
-
* ];
|
1146 |
-
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
1147 |
-
* // $I->amOnPage('/path/to/form-page') may be needed
|
1148 |
-
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
1149 |
-
* ?>
|
1150 |
-
* ```
|
1151 |
-
*
|
1152 |
-
* Parameter values can be set to arrays for multiple input fields
|
1153 |
-
* of the same name, or multi-select combo boxes. For checkboxes,
|
1154 |
-
* either the string value can be used, or boolean values which will
|
1155 |
-
* be replaced by the checkbox's value in the DOM.
|
1156 |
-
*
|
1157 |
-
* ``` php
|
1158 |
-
* <?php
|
1159 |
-
* $I->submitForm('#my-form', [
|
1160 |
-
* 'field1' => 'value',
|
1161 |
-
* 'checkbox' => [
|
1162 |
-
* 'value of first checkbox',
|
1163 |
-
* 'value of second checkbox,
|
1164 |
-
* ],
|
1165 |
-
* 'otherCheckboxes' => [
|
1166 |
-
* true,
|
1167 |
-
* false,
|
1168 |
-
* false
|
1169 |
-
* ],
|
1170 |
-
* 'multiselect' => [
|
1171 |
-
* 'first option value',
|
1172 |
-
* 'second option value'
|
1173 |
-
* ]
|
1174 |
-
* ]);
|
1175 |
-
* ?>
|
1176 |
-
* ```
|
1177 |
-
*
|
1178 |
-
* Mixing string and boolean values for a checkbox's value is not
|
1179 |
-
* supported and may produce unexpected results.
|
1180 |
-
*
|
1181 |
-
* @param $selector
|
1182 |
-
* @param $params
|
1183 |
-
* @param $button
|
1184 |
-
* @see \Codeception\Lib\InnerBrowser::submitForm()
|
1185 |
-
*/
|
1186 |
-
public function submitForm($selector, $params, $button = null) {
|
1187 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
|
1191 |
-
/**
|
1192 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1193 |
-
*
|
1194 |
-
* Fills a text field or textarea with the given string.
|
1195 |
-
*
|
1196 |
-
* ``` php
|
1197 |
-
* <?php
|
1198 |
-
* $I->fillField("//input[@type='text']", "Hello World!");
|
1199 |
-
* $I->fillField(['name' => 'email'], 'jon@mail.com');
|
1200 |
-
* ?>
|
1201 |
-
* ```
|
1202 |
-
*
|
1203 |
-
* @param $field
|
1204 |
-
* @param $value
|
1205 |
-
* @see \Codeception\Lib\InnerBrowser::fillField()
|
1206 |
-
*/
|
1207 |
-
public function fillField($field, $value) {
|
1208 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
|
1209 |
-
}
|
1210 |
-
|
1211 |
-
|
1212 |
-
/**
|
1213 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1214 |
-
*
|
1215 |
-
* Selects an option in a select tag or in radio button group.
|
1216 |
-
*
|
1217 |
-
* ``` php
|
1218 |
-
* <?php
|
1219 |
-
* $I->selectOption('form select[name=account]', 'Premium');
|
1220 |
-
* $I->selectOption('form input[name=payment]', 'Monthly');
|
1221 |
-
* $I->selectOption('//form/select[@name=account]', 'Monthly');
|
1222 |
-
* ?>
|
1223 |
-
* ```
|
1224 |
-
*
|
1225 |
-
* Provide an array for the second argument to select multiple options:
|
1226 |
-
*
|
1227 |
-
* ``` php
|
1228 |
-
* <?php
|
1229 |
-
* $I->selectOption('Which OS do you use?', array('Windows','Linux'));
|
1230 |
-
* ?>
|
1231 |
-
* ```
|
1232 |
-
*
|
1233 |
-
* @param $select
|
1234 |
-
* @param $option
|
1235 |
-
* @see \Codeception\Lib\InnerBrowser::selectOption()
|
1236 |
-
*/
|
1237 |
-
public function selectOption($select, $option) {
|
1238 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
|
1242 |
-
/**
|
1243 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1244 |
-
*
|
1245 |
-
* Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
|
1246 |
-
*
|
1247 |
-
* ``` php
|
1248 |
-
* <?php
|
1249 |
-
* $I->checkOption('#agree');
|
1250 |
-
* ?>
|
1251 |
-
* ```
|
1252 |
-
*
|
1253 |
-
* @param $option
|
1254 |
-
* @see \Codeception\Lib\InnerBrowser::checkOption()
|
1255 |
-
*/
|
1256 |
-
public function checkOption($option) {
|
1257 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
|
1258 |
-
}
|
1259 |
-
|
1260 |
-
|
1261 |
-
/**
|
1262 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1263 |
-
*
|
1264 |
-
* Unticks a checkbox.
|
1265 |
-
*
|
1266 |
-
* ``` php
|
1267 |
-
* <?php
|
1268 |
-
* $I->uncheckOption('#notify');
|
1269 |
-
* ?>
|
1270 |
-
* ```
|
1271 |
-
*
|
1272 |
-
* @param $option
|
1273 |
-
* @see \Codeception\Lib\InnerBrowser::uncheckOption()
|
1274 |
-
*/
|
1275 |
-
public function uncheckOption($option) {
|
1276 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
|
1277 |
-
}
|
1278 |
-
|
1279 |
-
|
1280 |
-
/**
|
1281 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1282 |
-
*
|
1283 |
-
* Attaches a file relative to the Codeception data directory to the given file upload field.
|
1284 |
-
*
|
1285 |
-
* ``` php
|
1286 |
-
* <?php
|
1287 |
-
* // file is stored in 'tests/_data/prices.xls'
|
1288 |
-
* $I->attachFile('input[@type="file"]', 'prices.xls');
|
1289 |
-
* ?>
|
1290 |
-
* ```
|
1291 |
-
*
|
1292 |
-
* @param $field
|
1293 |
-
* @param $filename
|
1294 |
-
* @see \Codeception\Lib\InnerBrowser::attachFile()
|
1295 |
-
*/
|
1296 |
-
public function attachFile($field, $filename) {
|
1297 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
|
1298 |
-
}
|
1299 |
-
|
1300 |
-
|
1301 |
-
/**
|
1302 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1303 |
-
*
|
1304 |
-
* If your page triggers an ajax request, you can perform it manually.
|
1305 |
-
* This action sends a GET ajax request with specified params.
|
1306 |
-
*
|
1307 |
-
* See ->sendAjaxPostRequest for examples.
|
1308 |
-
*
|
1309 |
-
* @param $uri
|
1310 |
-
* @param $params
|
1311 |
-
* @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
|
1312 |
-
*/
|
1313 |
-
public function sendAjaxGetRequest($uri, $params = null) {
|
1314 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
|
1315 |
-
}
|
1316 |
-
|
1317 |
-
|
1318 |
-
/**
|
1319 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1320 |
-
*
|
1321 |
-
* If your page triggers an ajax request, you can perform it manually.
|
1322 |
-
* This action sends a POST ajax request with specified params.
|
1323 |
-
* Additional params can be passed as array.
|
1324 |
-
*
|
1325 |
-
* Example:
|
1326 |
-
*
|
1327 |
-
* Imagine that by clicking checkbox you trigger ajax request which updates user settings.
|
1328 |
-
* We emulate that click by running this ajax request manually.
|
1329 |
-
*
|
1330 |
-
* ``` php
|
1331 |
-
* <?php
|
1332 |
-
* $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
|
1333 |
-
* $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
|
1334 |
-
*
|
1335 |
-
* ```
|
1336 |
-
*
|
1337 |
-
* @param $uri
|
1338 |
-
* @param $params
|
1339 |
-
* @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
|
1340 |
-
*/
|
1341 |
-
public function sendAjaxPostRequest($uri, $params = null) {
|
1342 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
|
1343 |
-
}
|
1344 |
-
|
1345 |
-
|
1346 |
-
/**
|
1347 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1348 |
-
*
|
1349 |
-
* If your page triggers an ajax request, you can perform it manually.
|
1350 |
-
* This action sends an ajax request with specified method and params.
|
1351 |
-
*
|
1352 |
-
* Example:
|
1353 |
-
*
|
1354 |
-
* You need to perform an ajax request specifying the HTTP method.
|
1355 |
-
*
|
1356 |
-
* ``` php
|
1357 |
-
* <?php
|
1358 |
-
* $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
|
1359 |
-
*
|
1360 |
-
* ```
|
1361 |
-
*
|
1362 |
-
* @param $method
|
1363 |
-
* @param $uri
|
1364 |
-
* @param $params
|
1365 |
-
* @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
|
1366 |
-
*/
|
1367 |
-
public function sendAjaxRequest($method, $uri, $params = null) {
|
1368 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
|
1369 |
-
}
|
1370 |
-
|
1371 |
-
|
1372 |
-
/**
|
1373 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1374 |
-
*
|
1375 |
-
* Finds and returns the text contents of the given element.
|
1376 |
-
* If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression.
|
1377 |
-
*
|
1378 |
-
* ``` php
|
1379 |
-
* <?php
|
1380 |
-
* $heading = $I->grabTextFrom('h1');
|
1381 |
-
* $heading = $I->grabTextFrom('descendant-or-self::h1');
|
1382 |
-
* $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
|
1383 |
-
* ?>
|
1384 |
-
* ```
|
1385 |
-
*
|
1386 |
-
* @param $cssOrXPathOrRegex
|
1387 |
-
*
|
1388 |
-
* @return mixed
|
1389 |
-
* @see \Codeception\Lib\InnerBrowser::grabTextFrom()
|
1390 |
-
*/
|
1391 |
-
public function grabTextFrom($cssOrXPathOrRegex) {
|
1392 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
|
1393 |
-
}
|
1394 |
-
|
1395 |
-
|
1396 |
-
/**
|
1397 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1398 |
-
*
|
1399 |
-
* Grabs the value of the given attribute value from the given element.
|
1400 |
-
* Fails if element is not found.
|
1401 |
-
*
|
1402 |
-
* ``` php
|
1403 |
-
* <?php
|
1404 |
-
* $I->grabAttributeFrom('#tooltip', 'title');
|
1405 |
-
* ?>
|
1406 |
-
* ```
|
1407 |
-
*
|
1408 |
-
*
|
1409 |
-
* @param $cssOrXpath
|
1410 |
-
* @param $attribute
|
1411 |
-
* @internal param $element
|
1412 |
-
* @return mixed
|
1413 |
-
* @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()
|
1414 |
-
*/
|
1415 |
-
public function grabAttributeFrom($cssOrXpath, $attribute) {
|
1416 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
|
1417 |
-
}
|
1418 |
-
|
1419 |
-
|
1420 |
-
/**
|
1421 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1422 |
-
*
|
1423 |
-
* @param $field
|
1424 |
-
*
|
1425 |
-
* @return array|mixed|null|string
|
1426 |
-
* @see \Codeception\Lib\InnerBrowser::grabValueFrom()
|
1427 |
-
*/
|
1428 |
-
public function grabValueFrom($field) {
|
1429 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
|
1430 |
-
}
|
1431 |
-
|
1432 |
-
|
1433 |
-
/**
|
1434 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1435 |
-
*
|
1436 |
-
* Sets a cookie with the given name and value.
|
1437 |
-
* You can set additional cookie params like `domain`, `path`, `expire`, `secure` in array passed as last argument.
|
1438 |
-
*
|
1439 |
-
* ``` php
|
1440 |
-
* <?php
|
1441 |
-
* $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3');
|
1442 |
-
* ?>
|
1443 |
-
* ```
|
1444 |
-
*
|
1445 |
-
* @param $name
|
1446 |
-
* @param $val
|
1447 |
-
* @param array $params
|
1448 |
-
* @internal param $cookie
|
1449 |
-
* @internal param $value
|
1450 |
-
*
|
1451 |
-
* @return mixed
|
1452 |
-
* @see \Codeception\Lib\InnerBrowser::setCookie()
|
1453 |
-
*/
|
1454 |
-
public function setCookie($name, $val, $params = null) {
|
1455 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
|
1456 |
-
}
|
1457 |
-
|
1458 |
-
|
1459 |
-
/**
|
1460 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1461 |
-
*
|
1462 |
-
* Grabs a cookie value.
|
1463 |
-
* You can set additional cookie params like `domain`, `path` in array passed as last argument.
|
1464 |
-
*
|
1465 |
-
* @param $cookie
|
1466 |
-
*
|
1467 |
-
* @param array $params
|
1468 |
-
* @return mixed
|
1469 |
-
* @see \Codeception\Lib\InnerBrowser::grabCookie()
|
1470 |
-
*/
|
1471 |
-
public function grabCookie($name, $params = null) {
|
1472 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
|
1476 |
-
/**
|
1477 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1478 |
-
*
|
1479 |
-
* Checks that a cookie with the given name is set.
|
1480 |
-
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1481 |
-
*
|
1482 |
-
* ``` php
|
1483 |
-
* <?php
|
1484 |
-
* $I->seeCookie('PHPSESSID');
|
1485 |
-
* ?>
|
1486 |
-
* ```
|
1487 |
-
*
|
1488 |
-
* @param $cookie
|
1489 |
-
* @param array $params
|
1490 |
-
* @return mixed
|
1491 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1492 |
-
* @see \Codeception\Lib\InnerBrowser::seeCookie()
|
1493 |
-
*/
|
1494 |
-
public function canSeeCookie($name, $params = null) {
|
1495 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
|
1496 |
-
}
|
1497 |
-
/**
|
1498 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1499 |
-
*
|
1500 |
-
* Checks that a cookie with the given name is set.
|
1501 |
-
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1502 |
-
*
|
1503 |
-
* ``` php
|
1504 |
-
* <?php
|
1505 |
-
* $I->seeCookie('PHPSESSID');
|
1506 |
-
* ?>
|
1507 |
-
* ```
|
1508 |
-
*
|
1509 |
-
* @param $cookie
|
1510 |
-
* @param array $params
|
1511 |
-
* @return mixed
|
1512 |
-
* @see \Codeception\Lib\InnerBrowser::seeCookie()
|
1513 |
-
*/
|
1514 |
-
public function seeCookie($name, $params = null) {
|
1515 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
|
1516 |
-
}
|
1517 |
-
|
1518 |
-
|
1519 |
-
/**
|
1520 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1521 |
-
*
|
1522 |
-
* Checks that there isn't a cookie with the given name.
|
1523 |
-
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1524 |
-
*
|
1525 |
-
* @param $cookie
|
1526 |
-
*
|
1527 |
-
* @param array $params
|
1528 |
-
* @return mixed
|
1529 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1530 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
|
1531 |
-
*/
|
1532 |
-
public function cantSeeCookie($name, $params = null) {
|
1533 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
|
1534 |
-
}
|
1535 |
-
/**
|
1536 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1537 |
-
*
|
1538 |
-
* Checks that there isn't a cookie with the given name.
|
1539 |
-
* You can set additional cookie params like `domain`, `path` as array passed in last argument.
|
1540 |
-
*
|
1541 |
-
* @param $cookie
|
1542 |
-
*
|
1543 |
-
* @param array $params
|
1544 |
-
* @return mixed
|
1545 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
|
1546 |
-
*/
|
1547 |
-
public function dontSeeCookie($name, $params = null) {
|
1548 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
|
1549 |
-
}
|
1550 |
-
|
1551 |
-
|
1552 |
-
/**
|
1553 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1554 |
-
*
|
1555 |
-
* Unsets cookie with the given name.
|
1556 |
-
* You can set additional cookie params like `domain`, `path` in array passed as last argument.
|
1557 |
-
*
|
1558 |
-
* @param $cookie
|
1559 |
-
*
|
1560 |
-
* @param array $params
|
1561 |
-
* @return mixed
|
1562 |
-
* @see \Codeception\Lib\InnerBrowser::resetCookie()
|
1563 |
-
*/
|
1564 |
-
public function resetCookie($name, $params = null) {
|
1565 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
|
1566 |
-
}
|
1567 |
-
|
1568 |
-
|
1569 |
-
/**
|
1570 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1571 |
-
*
|
1572 |
-
* Checks that the given element exists on the page and is visible.
|
1573 |
-
* You can also specify expected attributes of this element.
|
1574 |
-
*
|
1575 |
-
* ``` php
|
1576 |
-
* <?php
|
1577 |
-
* $I->seeElement('.error');
|
1578 |
-
* $I->seeElement('//form/input[1]');
|
1579 |
-
* $I->seeElement('input', ['name' => 'login']);
|
1580 |
-
* $I->seeElement('input', ['value' => '123456']);
|
1581 |
-
*
|
1582 |
-
* // strict locator in first arg, attributes in second
|
1583 |
-
* $I->seeElement(['css' => 'form input'], ['name' => 'login']);
|
1584 |
-
* ?>
|
1585 |
-
* ```
|
1586 |
-
*
|
1587 |
-
* @param $selector
|
1588 |
-
* @param array $attributes
|
1589 |
-
* @return
|
1590 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1591 |
-
* @see \Codeception\Lib\InnerBrowser::seeElement()
|
1592 |
-
*/
|
1593 |
-
public function canSeeElement($selector, $attributes = null) {
|
1594 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
|
1595 |
-
}
|
1596 |
-
/**
|
1597 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1598 |
-
*
|
1599 |
-
* Checks that the given element exists on the page and is visible.
|
1600 |
-
* You can also specify expected attributes of this element.
|
1601 |
-
*
|
1602 |
-
* ``` php
|
1603 |
-
* <?php
|
1604 |
-
* $I->seeElement('.error');
|
1605 |
-
* $I->seeElement('//form/input[1]');
|
1606 |
-
* $I->seeElement('input', ['name' => 'login']);
|
1607 |
-
* $I->seeElement('input', ['value' => '123456']);
|
1608 |
-
*
|
1609 |
-
* // strict locator in first arg, attributes in second
|
1610 |
-
* $I->seeElement(['css' => 'form input'], ['name' => 'login']);
|
1611 |
-
* ?>
|
1612 |
-
* ```
|
1613 |
-
*
|
1614 |
-
* @param $selector
|
1615 |
-
* @param array $attributes
|
1616 |
-
* @return
|
1617 |
-
* @see \Codeception\Lib\InnerBrowser::seeElement()
|
1618 |
-
*/
|
1619 |
-
public function seeElement($selector, $attributes = null) {
|
1620 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
|
1621 |
-
}
|
1622 |
-
|
1623 |
-
|
1624 |
-
/**
|
1625 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1626 |
-
*
|
1627 |
-
* Checks that the given element is invisible or not present on the page.
|
1628 |
-
* You can also specify expected attributes of this element.
|
1629 |
-
*
|
1630 |
-
* ``` php
|
1631 |
-
* <?php
|
1632 |
-
* $I->dontSeeElement('.error');
|
1633 |
-
* $I->dontSeeElement('//form/input[1]');
|
1634 |
-
* $I->dontSeeElement('input', ['name' => 'login']);
|
1635 |
-
* $I->dontSeeElement('input', ['value' => '123456']);
|
1636 |
-
* ?>
|
1637 |
-
* ```
|
1638 |
-
*
|
1639 |
-
* @param $selector
|
1640 |
-
* @param array $attributes
|
1641 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1642 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeElement()
|
1643 |
-
*/
|
1644 |
-
public function cantSeeElement($selector, $attributes = null) {
|
1645 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
|
1646 |
-
}
|
1647 |
-
/**
|
1648 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1649 |
-
*
|
1650 |
-
* Checks that the given element is invisible or not present on the page.
|
1651 |
-
* You can also specify expected attributes of this element.
|
1652 |
-
*
|
1653 |
-
* ``` php
|
1654 |
-
* <?php
|
1655 |
-
* $I->dontSeeElement('.error');
|
1656 |
-
* $I->dontSeeElement('//form/input[1]');
|
1657 |
-
* $I->dontSeeElement('input', ['name' => 'login']);
|
1658 |
-
* $I->dontSeeElement('input', ['value' => '123456']);
|
1659 |
-
* ?>
|
1660 |
-
* ```
|
1661 |
-
*
|
1662 |
-
* @param $selector
|
1663 |
-
* @param array $attributes
|
1664 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeElement()
|
1665 |
-
*/
|
1666 |
-
public function dontSeeElement($selector, $attributes = null) {
|
1667 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
|
1668 |
-
}
|
1669 |
-
|
1670 |
-
|
1671 |
-
/**
|
1672 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1673 |
-
*
|
1674 |
-
* Checks that there are a certain number of elements matched by the given locator on the page.
|
1675 |
-
*
|
1676 |
-
* ``` php
|
1677 |
-
* <?php
|
1678 |
-
* $I->seeNumberOfElements('tr', 10);
|
1679 |
-
* $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
|
1680 |
-
* ?>
|
1681 |
-
* ```
|
1682 |
-
* @param $selector
|
1683 |
-
* @param mixed $expected:
|
1684 |
-
* - string: strict number
|
1685 |
-
* - array: range of numbers [0,10]
|
1686 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1687 |
-
* @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
|
1688 |
-
*/
|
1689 |
-
public function canSeeNumberOfElements($selector, $expected) {
|
1690 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
|
1691 |
-
}
|
1692 |
-
/**
|
1693 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1694 |
-
*
|
1695 |
-
* Checks that there are a certain number of elements matched by the given locator on the page.
|
1696 |
-
*
|
1697 |
-
* ``` php
|
1698 |
-
* <?php
|
1699 |
-
* $I->seeNumberOfElements('tr', 10);
|
1700 |
-
* $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements
|
1701 |
-
* ?>
|
1702 |
-
* ```
|
1703 |
-
* @param $selector
|
1704 |
-
* @param mixed $expected:
|
1705 |
-
* - string: strict number
|
1706 |
-
* - array: range of numbers [0,10]
|
1707 |
-
* @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
|
1708 |
-
*/
|
1709 |
-
public function seeNumberOfElements($selector, $expected) {
|
1710 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
|
1711 |
-
}
|
1712 |
-
|
1713 |
-
|
1714 |
-
/**
|
1715 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1716 |
-
*
|
1717 |
-
* Checks that the given option is selected.
|
1718 |
-
*
|
1719 |
-
* ``` php
|
1720 |
-
* <?php
|
1721 |
-
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1722 |
-
* ?>
|
1723 |
-
* ```
|
1724 |
-
*
|
1725 |
-
* @param $selector
|
1726 |
-
* @param $optionText
|
1727 |
-
*
|
1728 |
-
* @return mixed
|
1729 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1730 |
-
* @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
|
1731 |
-
*/
|
1732 |
-
public function canSeeOptionIsSelected($select, $optionText) {
|
1733 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
|
1734 |
-
}
|
1735 |
-
/**
|
1736 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1737 |
-
*
|
1738 |
-
* Checks that the given option is selected.
|
1739 |
-
*
|
1740 |
-
* ``` php
|
1741 |
-
* <?php
|
1742 |
-
* $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1743 |
-
* ?>
|
1744 |
-
* ```
|
1745 |
-
*
|
1746 |
-
* @param $selector
|
1747 |
-
* @param $optionText
|
1748 |
-
*
|
1749 |
-
* @return mixed
|
1750 |
-
* @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
|
1751 |
-
*/
|
1752 |
-
public function seeOptionIsSelected($select, $optionText) {
|
1753 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
|
1754 |
-
}
|
1755 |
-
|
1756 |
-
|
1757 |
-
/**
|
1758 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1759 |
-
*
|
1760 |
-
* Checks that the given option is not selected.
|
1761 |
-
*
|
1762 |
-
* ``` php
|
1763 |
-
* <?php
|
1764 |
-
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1765 |
-
* ?>
|
1766 |
-
* ```
|
1767 |
-
*
|
1768 |
-
* @param $selector
|
1769 |
-
* @param $optionText
|
1770 |
-
*
|
1771 |
-
* @return mixed
|
1772 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1773 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
|
1774 |
-
*/
|
1775 |
-
public function cantSeeOptionIsSelected($select, $optionText) {
|
1776 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
|
1777 |
-
}
|
1778 |
-
/**
|
1779 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1780 |
-
*
|
1781 |
-
* Checks that the given option is not selected.
|
1782 |
-
*
|
1783 |
-
* ``` php
|
1784 |
-
* <?php
|
1785 |
-
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
|
1786 |
-
* ?>
|
1787 |
-
* ```
|
1788 |
-
*
|
1789 |
-
* @param $selector
|
1790 |
-
* @param $optionText
|
1791 |
-
*
|
1792 |
-
* @return mixed
|
1793 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
|
1794 |
-
*/
|
1795 |
-
public function dontSeeOptionIsSelected($select, $optionText) {
|
1796 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
|
1797 |
-
}
|
1798 |
-
|
1799 |
-
|
1800 |
-
/**
|
1801 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1802 |
-
*
|
1803 |
-
* Asserts that current page has 404 response status code.
|
1804 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1805 |
-
* @see \Codeception\Lib\InnerBrowser::seePageNotFound()
|
1806 |
-
*/
|
1807 |
-
public function canSeePageNotFound() {
|
1808 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
|
1809 |
-
}
|
1810 |
-
/**
|
1811 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1812 |
-
*
|
1813 |
-
* Asserts that current page has 404 response status code.
|
1814 |
-
* @see \Codeception\Lib\InnerBrowser::seePageNotFound()
|
1815 |
-
*/
|
1816 |
-
public function seePageNotFound() {
|
1817 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
|
1818 |
-
}
|
1819 |
-
|
1820 |
-
|
1821 |
-
/**
|
1822 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1823 |
-
*
|
1824 |
-
* Checks that response code is equal to value provided.
|
1825 |
-
*
|
1826 |
-
* @param $code
|
1827 |
-
*
|
1828 |
-
* @return mixed
|
1829 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1830 |
-
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
|
1831 |
-
*/
|
1832 |
-
public function canSeeResponseCodeIs($code) {
|
1833 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
|
1834 |
-
}
|
1835 |
-
/**
|
1836 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1837 |
-
*
|
1838 |
-
* Checks that response code is equal to value provided.
|
1839 |
-
*
|
1840 |
-
* @param $code
|
1841 |
-
*
|
1842 |
-
* @return mixed
|
1843 |
-
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
|
1844 |
-
*/
|
1845 |
-
public function seeResponseCodeIs($code) {
|
1846 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
|
1847 |
-
}
|
1848 |
-
|
1849 |
-
|
1850 |
-
/**
|
1851 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1852 |
-
*
|
1853 |
-
* Checks that the page title contains the given string.
|
1854 |
-
*
|
1855 |
-
* ``` php
|
1856 |
-
* <?php
|
1857 |
-
* $I->seeInTitle('Blog - Post #1');
|
1858 |
-
* ?>
|
1859 |
-
* ```
|
1860 |
-
*
|
1861 |
-
* @param $title
|
1862 |
-
*
|
1863 |
-
* @return mixed
|
1864 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1865 |
-
* @see \Codeception\Lib\InnerBrowser::seeInTitle()
|
1866 |
-
*/
|
1867 |
-
public function canSeeInTitle($title) {
|
1868 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
|
1869 |
-
}
|
1870 |
-
/**
|
1871 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1872 |
-
*
|
1873 |
-
* Checks that the page title contains the given string.
|
1874 |
-
*
|
1875 |
-
* ``` php
|
1876 |
-
* <?php
|
1877 |
-
* $I->seeInTitle('Blog - Post #1');
|
1878 |
-
* ?>
|
1879 |
-
* ```
|
1880 |
-
*
|
1881 |
-
* @param $title
|
1882 |
-
*
|
1883 |
-
* @return mixed
|
1884 |
-
* @see \Codeception\Lib\InnerBrowser::seeInTitle()
|
1885 |
-
*/
|
1886 |
-
public function seeInTitle($title) {
|
1887 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
|
1888 |
-
}
|
1889 |
-
|
1890 |
-
|
1891 |
-
/**
|
1892 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1893 |
-
*
|
1894 |
-
* Checks that the page title does not contain the given string.
|
1895 |
-
*
|
1896 |
-
* @param $title
|
1897 |
-
*
|
1898 |
-
* @return mixed
|
1899 |
-
* Conditional Assertion: Test won't be stopped on fail
|
1900 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
|
1901 |
-
*/
|
1902 |
-
public function cantSeeInTitle($title) {
|
1903 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
|
1904 |
-
}
|
1905 |
-
/**
|
1906 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
1907 |
-
*
|
1908 |
-
* Checks that the page title does not contain the given string.
|
1909 |
-
*
|
1910 |
-
* @param $title
|
1911 |
-
*
|
1912 |
-
* @return mixed
|
1913 |
-
* @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
|
1914 |
-
*/
|
1915 |
-
public function dontSeeInTitle($title) {
|
1916 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
|
1917 |
-
}
|
1918 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/acceptance/LoginCept.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* - login
|
4 |
-
* - navigate to plugins
|
5 |
-
* - deactivate landing pages
|
6 |
-
* - activate landing pages
|
7 |
-
* - confirm welcome page shows
|
8 |
-
*
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
$I = new AcceptanceTester($scenario);
|
13 |
-
|
14 |
-
|
15 |
-
$I->wantTo('login to wp-admin');
|
16 |
-
$I->amOnPage( site_url().'/wp-login.php' );
|
17 |
-
$I->fillField('Username', 'admin');
|
18 |
-
$I->fillField('Password','admin');
|
19 |
-
$I->click('Log In');
|
20 |
-
$I->see('Dashboard');
|
21 |
-
|
22 |
-
|
23 |
-
$I->wantTo('Navigate to plugins');
|
24 |
-
$I->click( [ 'link' => 'Installed Plugins']);
|
25 |
-
$I->see('Active');
|
26 |
-
|
27 |
-
$I->wantTo('Deactivate Landing Pages');
|
28 |
-
$I->click( '#landing-pages .deactivate a');
|
29 |
-
$I->see('deactivated');
|
30 |
-
|
31 |
-
$I->wantTo('Reactivate Landing Pages');
|
32 |
-
$I->click( '#landing-pages .activate a');
|
33 |
-
|
34 |
-
$I->wantTo('Confirm welcome page');
|
35 |
-
$I->see('Welcome to WordPress Landing Pages ');
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/acceptance/StatisticsCept.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This test is desnged to test the impressions/conversions systems of landing pages.
|
4 |
-
* Systems tested:
|
5 |
-
* [x] Login to WordPress
|
6 |
-
* [x] Navigate to Landing Pages
|
7 |
-
* [x] Open example landing page
|
8 |
-
* [x] Check if impression/conversion UI display on landing page edit screen
|
9 |
-
* [ ] Reset impressions/conversions and refresh page
|
10 |
-
* [ ] Make sure stats read 0
|
11 |
-
* [ ] Open landing page and make sure it does not 404
|
12 |
-
* [ ] Refresh landing page and make sure variation 2 loads
|
13 |
-
* [ ] Submit test conversion on variation 2
|
14 |
-
* [ ] Navigate back to edit page and make sure stats read correctly
|
15 |
-
*/
|
16 |
-
|
17 |
-
$I = new AcceptanceTester($scenario);
|
18 |
-
$I->wantTo('login to wp-admin');
|
19 |
-
$I->amOnPage( site_url().'/wp-login.php' );
|
20 |
-
$I->fillField('Username', 'admin');
|
21 |
-
$I->fillField('Password','admin');
|
22 |
-
$I->click('Log In');
|
23 |
-
$I->see('Dashboard');
|
24 |
-
$I->wantTo('Navigate to landing pages list');
|
25 |
-
$I->click('Landing Pages');
|
26 |
-
$I->amOnPage( admin_url( 'edit.php?post_type=landing-page') );
|
27 |
-
$I->see( 'Landing Pages');
|
28 |
-
$I->wantTo('Open example landing page');
|
29 |
-
$I->click( [ 'link' => 'A/B Testing Landing Page Example']);
|
30 |
-
$I->wantTo('check if impressions are correct for variation a');
|
31 |
-
$imp = $I->grabTextFrom('#lp-variation-A .bab-stat-span-impressions');
|
32 |
-
$I->assertContains( '30' , $imp );
|
33 |
-
$I->wantTo('check check impressions for variation b');
|
34 |
-
$imp = $I->grabTextFrom('#lp-variation-B .bab-stat-span-impressions');
|
35 |
-
$I->assertContains( '35' , $imp , '' );
|
36 |
-
$I->wantTo('check conversions for variation a');
|
37 |
-
$con = $I->grabTextFrom('#lp-variation-A .bab-stat-span-conversions');
|
38 |
-
$I->assertContains( '10' , $con , '' );
|
39 |
-
$I->wantTo('check conversions for variation b');
|
40 |
-
$con = $I->grabTextFrom('#lp-variation-B .bab-stat-span-conversions');
|
41 |
-
$I->assertContains( '15' , $con );
|
42 |
-
$I->wantTo('check the conversion rate of variation a');
|
43 |
-
$per = $I->grabTextFrom('#lp-variation-A .bab-stat-span-conversion_rate');
|
44 |
-
$I->assertContains( '33' , $per );
|
45 |
-
$I->wantTo('check the conversion rate of variation b');
|
46 |
-
$per = $I->grabTextFrom('#lp-variation-B .bab-stat-span-conversion_rate');
|
47 |
-
$I->assertContains( '43' , $per );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/acceptance/WelcomeCept.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$I = new AcceptanceTester($scenario);
|
4 |
-
$I->wantTo('Make sure the default WordPress homepage loads.');
|
5 |
-
$I->amOnPage( site_url() );
|
6 |
-
$I->see('Hello world!');
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/acceptance/_bootstrap.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Here you can initialize variables that will be available to your tests
|
|
|
|
tests/codeception/functional.suite.yml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
# Codeception Test Suite Configuration
|
2 |
-
|
3 |
-
# suite for functional (integration) tests.
|
4 |
-
# emulate web requests and make application process them.
|
5 |
-
# Include one of framework modules (Symfony2, Yii2, Laravel4) to use it.
|
6 |
-
|
7 |
-
class_name: FunctionalTester
|
8 |
-
modules:
|
9 |
-
enabled: [Filesystem, FunctionalHelper]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/functional/FunctionalTester.php
DELETED
@@ -1,360 +0,0 @@
|
|
1 |
-
<?php //[STAMP] fa259e6277a310881c0cdeb89563ce4c
|
2 |
-
|
3 |
-
// This class was automatically generated by build task
|
4 |
-
// You should not change it manually as it will be overwritten on next build
|
5 |
-
// @codingStandardsIgnoreFile
|
6 |
-
|
7 |
-
|
8 |
-
use Codeception\Module\Filesystem;
|
9 |
-
use Codeception\Module\FunctionalHelper;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Inherited Methods
|
13 |
-
* @method void wantToTest($text)
|
14 |
-
* @method void wantTo($text)
|
15 |
-
* @method void execute($callable)
|
16 |
-
* @method void expectTo($prediction)
|
17 |
-
* @method void expect($prediction)
|
18 |
-
* @method void amGoingTo($argumentation)
|
19 |
-
* @method void am($role)
|
20 |
-
* @method void lookForwardTo($achieveValue)
|
21 |
-
* @method void comment($description)
|
22 |
-
* @method void haveFriend($name, $actorClass = null)
|
23 |
-
*
|
24 |
-
* @SuppressWarnings(PHPMD)
|
25 |
-
*/
|
26 |
-
class FunctionalTester extends \Codeception\Actor
|
27 |
-
{
|
28 |
-
|
29 |
-
/**
|
30 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
31 |
-
*
|
32 |
-
* Enters a directory In local filesystem.
|
33 |
-
* Project root directory is used by default
|
34 |
-
*
|
35 |
-
* @param $path
|
36 |
-
* @see \Codeception\Module\Filesystem::amInPath()
|
37 |
-
*/
|
38 |
-
public function amInPath($path) {
|
39 |
-
return $this->scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
/**
|
44 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
45 |
-
*
|
46 |
-
* Opens a file and stores it's content.
|
47 |
-
*
|
48 |
-
* Usage:
|
49 |
-
*
|
50 |
-
* ``` php
|
51 |
-
* <?php
|
52 |
-
* $I->openFile('composer.json');
|
53 |
-
* $I->seeInThisFile('codeception/codeception');
|
54 |
-
* ?>
|
55 |
-
* ```
|
56 |
-
*
|
57 |
-
* @param $filename
|
58 |
-
* @see \Codeception\Module\Filesystem::openFile()
|
59 |
-
*/
|
60 |
-
public function openFile($filename) {
|
61 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
|
62 |
-
}
|
63 |
-
|
64 |
-
|
65 |
-
/**
|
66 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
67 |
-
*
|
68 |
-
* Deletes a file
|
69 |
-
*
|
70 |
-
* ``` php
|
71 |
-
* <?php
|
72 |
-
* $I->deleteFile('composer.lock');
|
73 |
-
* ?>
|
74 |
-
* ```
|
75 |
-
*
|
76 |
-
* @param $filename
|
77 |
-
* @see \Codeception\Module\Filesystem::deleteFile()
|
78 |
-
*/
|
79 |
-
public function deleteFile($filename) {
|
80 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
/**
|
85 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
86 |
-
*
|
87 |
-
* Deletes directory with all subdirectories
|
88 |
-
*
|
89 |
-
* ``` php
|
90 |
-
* <?php
|
91 |
-
* $I->deleteDir('vendor');
|
92 |
-
* ?>
|
93 |
-
* ```
|
94 |
-
*
|
95 |
-
* @param $dirname
|
96 |
-
* @see \Codeception\Module\Filesystem::deleteDir()
|
97 |
-
*/
|
98 |
-
public function deleteDir($dirname) {
|
99 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
|
100 |
-
}
|
101 |
-
|
102 |
-
|
103 |
-
/**
|
104 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
105 |
-
*
|
106 |
-
* Copies directory with all contents
|
107 |
-
*
|
108 |
-
* ``` php
|
109 |
-
* <?php
|
110 |
-
* $I->copyDir('vendor','old_vendor');
|
111 |
-
* ?>
|
112 |
-
* ```
|
113 |
-
*
|
114 |
-
* @param $src
|
115 |
-
* @param $dst
|
116 |
-
* @see \Codeception\Module\Filesystem::copyDir()
|
117 |
-
*/
|
118 |
-
public function copyDir($src, $dst) {
|
119 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
|
120 |
-
}
|
121 |
-
|
122 |
-
|
123 |
-
/**
|
124 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
125 |
-
*
|
126 |
-
* Checks If opened file has `text` in it.
|
127 |
-
*
|
128 |
-
* Usage:
|
129 |
-
*
|
130 |
-
* ``` php
|
131 |
-
* <?php
|
132 |
-
* $I->openFile('composer.json');
|
133 |
-
* $I->seeInThisFile('codeception/codeception');
|
134 |
-
* ?>
|
135 |
-
* ```
|
136 |
-
*
|
137 |
-
* @param $text
|
138 |
-
* Conditional Assertion: Test won't be stopped on fail
|
139 |
-
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
140 |
-
*/
|
141 |
-
public function canSeeInThisFile($text) {
|
142 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
|
143 |
-
}
|
144 |
-
/**
|
145 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
146 |
-
*
|
147 |
-
* Checks If opened file has `text` in it.
|
148 |
-
*
|
149 |
-
* Usage:
|
150 |
-
*
|
151 |
-
* ``` php
|
152 |
-
* <?php
|
153 |
-
* $I->openFile('composer.json');
|
154 |
-
* $I->seeInThisFile('codeception/codeception');
|
155 |
-
* ?>
|
156 |
-
* ```
|
157 |
-
*
|
158 |
-
* @param $text
|
159 |
-
* @see \Codeception\Module\Filesystem::seeInThisFile()
|
160 |
-
*/
|
161 |
-
public function seeInThisFile($text) {
|
162 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
|
163 |
-
}
|
164 |
-
|
165 |
-
|
166 |
-
/**
|
167 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
168 |
-
*
|
169 |
-
* Checks the strict matching of file contents.
|
170 |
-
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
171 |
-
* Better to use with HEREDOC strings.
|
172 |
-
* Matching is done after removing "\r" chars from file content.
|
173 |
-
*
|
174 |
-
* ``` php
|
175 |
-
* <?php
|
176 |
-
* $I->openFile('process.pid');
|
177 |
-
* $I->seeFileContentsEqual('3192');
|
178 |
-
* ?>
|
179 |
-
* ```
|
180 |
-
*
|
181 |
-
* @param $text
|
182 |
-
* Conditional Assertion: Test won't be stopped on fail
|
183 |
-
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
184 |
-
*/
|
185 |
-
public function canSeeFileContentsEqual($text) {
|
186 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
|
187 |
-
}
|
188 |
-
/**
|
189 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
190 |
-
*
|
191 |
-
* Checks the strict matching of file contents.
|
192 |
-
* Unlike `seeInThisFile` will fail if file has something more than expected lines.
|
193 |
-
* Better to use with HEREDOC strings.
|
194 |
-
* Matching is done after removing "\r" chars from file content.
|
195 |
-
*
|
196 |
-
* ``` php
|
197 |
-
* <?php
|
198 |
-
* $I->openFile('process.pid');
|
199 |
-
* $I->seeFileContentsEqual('3192');
|
200 |
-
* ?>
|
201 |
-
* ```
|
202 |
-
*
|
203 |
-
* @param $text
|
204 |
-
* @see \Codeception\Module\Filesystem::seeFileContentsEqual()
|
205 |
-
*/
|
206 |
-
public function seeFileContentsEqual($text) {
|
207 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
|
208 |
-
}
|
209 |
-
|
210 |
-
|
211 |
-
/**
|
212 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
213 |
-
*
|
214 |
-
* Checks If opened file doesn't contain `text` in it
|
215 |
-
*
|
216 |
-
* ``` php
|
217 |
-
* <?php
|
218 |
-
* $I->openFile('composer.json');
|
219 |
-
* $I->dontSeeInThisFile('codeception/codeception');
|
220 |
-
* ?>
|
221 |
-
* ```
|
222 |
-
*
|
223 |
-
* @param $text
|
224 |
-
* Conditional Assertion: Test won't be stopped on fail
|
225 |
-
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
226 |
-
*/
|
227 |
-
public function cantSeeInThisFile($text) {
|
228 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
|
229 |
-
}
|
230 |
-
/**
|
231 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
232 |
-
*
|
233 |
-
* Checks If opened file doesn't contain `text` in it
|
234 |
-
*
|
235 |
-
* ``` php
|
236 |
-
* <?php
|
237 |
-
* $I->openFile('composer.json');
|
238 |
-
* $I->dontSeeInThisFile('codeception/codeception');
|
239 |
-
* ?>
|
240 |
-
* ```
|
241 |
-
*
|
242 |
-
* @param $text
|
243 |
-
* @see \Codeception\Module\Filesystem::dontSeeInThisFile()
|
244 |
-
*/
|
245 |
-
public function dontSeeInThisFile($text) {
|
246 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
|
247 |
-
}
|
248 |
-
|
249 |
-
|
250 |
-
/**
|
251 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
252 |
-
*
|
253 |
-
* Deletes a file
|
254 |
-
* @see \Codeception\Module\Filesystem::deleteThisFile()
|
255 |
-
*/
|
256 |
-
public function deleteThisFile() {
|
257 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
|
258 |
-
}
|
259 |
-
|
260 |
-
|
261 |
-
/**
|
262 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
263 |
-
*
|
264 |
-
* Checks if file exists in path.
|
265 |
-
* Opens a file when it's exists
|
266 |
-
*
|
267 |
-
* ``` php
|
268 |
-
* <?php
|
269 |
-
* $I->seeFileFound('UserModel.php','app/models');
|
270 |
-
* ?>
|
271 |
-
* ```
|
272 |
-
*
|
273 |
-
* @param $filename
|
274 |
-
* @param string $path
|
275 |
-
* Conditional Assertion: Test won't be stopped on fail
|
276 |
-
* @see \Codeception\Module\Filesystem::seeFileFound()
|
277 |
-
*/
|
278 |
-
public function canSeeFileFound($filename, $path = null) {
|
279 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
|
280 |
-
}
|
281 |
-
/**
|
282 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
283 |
-
*
|
284 |
-
* Checks if file exists in path.
|
285 |
-
* Opens a file when it's exists
|
286 |
-
*
|
287 |
-
* ``` php
|
288 |
-
* <?php
|
289 |
-
* $I->seeFileFound('UserModel.php','app/models');
|
290 |
-
* ?>
|
291 |
-
* ```
|
292 |
-
*
|
293 |
-
* @param $filename
|
294 |
-
* @param string $path
|
295 |
-
* @see \Codeception\Module\Filesystem::seeFileFound()
|
296 |
-
*/
|
297 |
-
public function seeFileFound($filename, $path = null) {
|
298 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
|
299 |
-
}
|
300 |
-
|
301 |
-
|
302 |
-
/**
|
303 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
304 |
-
*
|
305 |
-
* Checks if file does not exists in path
|
306 |
-
*
|
307 |
-
* @param $filename
|
308 |
-
* @param string $path
|
309 |
-
* Conditional Assertion: Test won't be stopped on fail
|
310 |
-
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
311 |
-
*/
|
312 |
-
public function cantSeeFileFound($filename, $path = null) {
|
313 |
-
return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
|
314 |
-
}
|
315 |
-
/**
|
316 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
317 |
-
*
|
318 |
-
* Checks if file does not exists in path
|
319 |
-
*
|
320 |
-
* @param $filename
|
321 |
-
* @param string $path
|
322 |
-
* @see \Codeception\Module\Filesystem::dontSeeFileFound()
|
323 |
-
*/
|
324 |
-
public function dontSeeFileFound($filename, $path = null) {
|
325 |
-
return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
|
326 |
-
}
|
327 |
-
|
328 |
-
|
329 |
-
/**
|
330 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
331 |
-
*
|
332 |
-
* Erases directory contents
|
333 |
-
*
|
334 |
-
* ``` php
|
335 |
-
* <?php
|
336 |
-
* $I->cleanDir('logs');
|
337 |
-
* ?>
|
338 |
-
* ```
|
339 |
-
*
|
340 |
-
* @param $dirname
|
341 |
-
* @see \Codeception\Module\Filesystem::cleanDir()
|
342 |
-
*/
|
343 |
-
public function cleanDir($dirname) {
|
344 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
|
345 |
-
}
|
346 |
-
|
347 |
-
|
348 |
-
/**
|
349 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
350 |
-
*
|
351 |
-
* Saves contents to file
|
352 |
-
*
|
353 |
-
* @param $filename
|
354 |
-
* @param $contents
|
355 |
-
* @see \Codeception\Module\Filesystem::writeToFile()
|
356 |
-
*/
|
357 |
-
public function writeToFile($filename, $contents) {
|
358 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
|
359 |
-
}
|
360 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/functional/_bootstrap.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Here you can initialize variables that will be available to your tests
|
|
|
|
tests/codeception/unit.suite.yml
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
# Codeception Test Suite Configuration
|
2 |
-
|
3 |
-
# suite for unit (internal) tests.
|
4 |
-
class_name: UnitTester
|
5 |
-
modules:
|
6 |
-
enabled: [Asserts, UnitHelper]
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/unit/UnitTester.php
DELETED
@@ -1,300 +0,0 @@
|
|
1 |
-
<?php //[STAMP] c8568e8eab4a240544c36ae031f88bd8
|
2 |
-
|
3 |
-
// This class was automatically generated by build task
|
4 |
-
// You should not change it manually as it will be overwritten on next build
|
5 |
-
// @codingStandardsIgnoreFile
|
6 |
-
|
7 |
-
|
8 |
-
use Codeception\Module\Asserts;
|
9 |
-
use Codeception\Module\UnitHelper;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Inherited Methods
|
13 |
-
* @method void wantToTest($text)
|
14 |
-
* @method void wantTo($text)
|
15 |
-
* @method void execute($callable)
|
16 |
-
* @method void expectTo($prediction)
|
17 |
-
* @method void expect($prediction)
|
18 |
-
* @method void amGoingTo($argumentation)
|
19 |
-
* @method void am($role)
|
20 |
-
* @method void lookForwardTo($achieveValue)
|
21 |
-
* @method void comment($description)
|
22 |
-
* @method void haveFriend($name, $actorClass = null)
|
23 |
-
*
|
24 |
-
* @SuppressWarnings(PHPMD)
|
25 |
-
*/
|
26 |
-
class UnitTester extends \Codeception\Actor
|
27 |
-
{
|
28 |
-
|
29 |
-
/**
|
30 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
31 |
-
*
|
32 |
-
* Checks that two variables are equal.
|
33 |
-
*
|
34 |
-
* @param $expected
|
35 |
-
* @param $actual
|
36 |
-
* @param string $message
|
37 |
-
*
|
38 |
-
* @return mixed
|
39 |
-
* @see \Codeception\Module\Asserts::assertEquals()
|
40 |
-
*/
|
41 |
-
public function assertEquals($expected, $actual, $message = null) {
|
42 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
/**
|
47 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
48 |
-
*
|
49 |
-
* Checks that two variables are not equal
|
50 |
-
*
|
51 |
-
* @param $expected
|
52 |
-
* @param $actual
|
53 |
-
* @param string $message
|
54 |
-
* @see \Codeception\Module\Asserts::assertNotEquals()
|
55 |
-
*/
|
56 |
-
public function assertNotEquals($expected, $actual, $message = null) {
|
57 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
/**
|
62 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
63 |
-
*
|
64 |
-
* Checks that two variables are same
|
65 |
-
*
|
66 |
-
* @param $expected
|
67 |
-
* @param $actual
|
68 |
-
* @param string $message
|
69 |
-
*
|
70 |
-
* @return mixed
|
71 |
-
* @see \Codeception\Module\Asserts::assertSame()
|
72 |
-
*/
|
73 |
-
public function assertSame($expected, $actual, $message = null) {
|
74 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
/**
|
79 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
80 |
-
*
|
81 |
-
* Checks that two variables are not same
|
82 |
-
*
|
83 |
-
* @param $expected
|
84 |
-
* @param $actual
|
85 |
-
* @param string $message
|
86 |
-
* @see \Codeception\Module\Asserts::assertNotSame()
|
87 |
-
*/
|
88 |
-
public function assertNotSame($expected, $actual, $message = null) {
|
89 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
|
90 |
-
}
|
91 |
-
|
92 |
-
|
93 |
-
/**
|
94 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
95 |
-
*
|
96 |
-
* Checks that expected is greater than actual
|
97 |
-
*
|
98 |
-
* @param $expected
|
99 |
-
* @param $actual
|
100 |
-
* @param string $message
|
101 |
-
* @see \Codeception\Module\Asserts::assertGreaterThan()
|
102 |
-
*/
|
103 |
-
public function assertGreaterThan($expected, $actual, $message = null) {
|
104 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
|
105 |
-
}
|
106 |
-
|
107 |
-
|
108 |
-
/**
|
109 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
110 |
-
*
|
111 |
-
* @deprecated
|
112 |
-
* @see \Codeception\Module\Asserts::assertGreaterThen()
|
113 |
-
*/
|
114 |
-
public function assertGreaterThen($expected, $actual, $message = null) {
|
115 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));
|
116 |
-
}
|
117 |
-
|
118 |
-
|
119 |
-
/**
|
120 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
121 |
-
*
|
122 |
-
* Checks that expected is greater or equal than actual
|
123 |
-
*
|
124 |
-
* @param $expected
|
125 |
-
* @param $actual
|
126 |
-
* @param string $message
|
127 |
-
* @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
|
128 |
-
*/
|
129 |
-
public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
|
130 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
|
131 |
-
}
|
132 |
-
|
133 |
-
|
134 |
-
/**
|
135 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
136 |
-
*
|
137 |
-
* @deprecated
|
138 |
-
* @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
|
139 |
-
*/
|
140 |
-
public function assertGreaterThenOrEqual($expected, $actual, $message = null) {
|
141 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));
|
142 |
-
}
|
143 |
-
|
144 |
-
|
145 |
-
/**
|
146 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
147 |
-
*
|
148 |
-
* Checks that expected is less than actual
|
149 |
-
*
|
150 |
-
* @param $expected
|
151 |
-
* @param $actual
|
152 |
-
* @param string $message
|
153 |
-
* @see \Codeception\Module\Asserts::assertLessThan()
|
154 |
-
*/
|
155 |
-
public function assertLessThan($expected, $actual, $message = null) {
|
156 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
|
157 |
-
}
|
158 |
-
|
159 |
-
|
160 |
-
/**
|
161 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
162 |
-
*
|
163 |
-
* Checks that expected is less or equal than actual
|
164 |
-
*
|
165 |
-
* @param $expected
|
166 |
-
* @param $actual
|
167 |
-
* @param string $message
|
168 |
-
* @see \Codeception\Module\Asserts::assertLessThanOrEqual()
|
169 |
-
*/
|
170 |
-
public function assertLessThanOrEqual($expected, $actual, $message = null) {
|
171 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
|
172 |
-
}
|
173 |
-
|
174 |
-
|
175 |
-
/**
|
176 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
177 |
-
*
|
178 |
-
* Checks that haystack contains needle
|
179 |
-
*
|
180 |
-
* @param $needle
|
181 |
-
* @param $haystack
|
182 |
-
* @param string $message
|
183 |
-
* @see \Codeception\Module\Asserts::assertContains()
|
184 |
-
*/
|
185 |
-
public function assertContains($needle, $haystack, $message = null) {
|
186 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
|
187 |
-
}
|
188 |
-
|
189 |
-
|
190 |
-
/**
|
191 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
192 |
-
*
|
193 |
-
* Checks that haystack doesn't contain needle.
|
194 |
-
*
|
195 |
-
* @param $needle
|
196 |
-
* @param $haystack
|
197 |
-
* @param string $message
|
198 |
-
* @see \Codeception\Module\Asserts::assertNotContains()
|
199 |
-
*/
|
200 |
-
public function assertNotContains($needle, $haystack, $message = null) {
|
201 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
|
202 |
-
}
|
203 |
-
|
204 |
-
|
205 |
-
/**
|
206 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
207 |
-
*
|
208 |
-
* Checks that variable is empty.
|
209 |
-
*
|
210 |
-
* @param $actual
|
211 |
-
* @param string $message
|
212 |
-
* @see \Codeception\Module\Asserts::assertEmpty()
|
213 |
-
*/
|
214 |
-
public function assertEmpty($actual, $message = null) {
|
215 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
|
216 |
-
}
|
217 |
-
|
218 |
-
|
219 |
-
/**
|
220 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
221 |
-
*
|
222 |
-
* Checks that variable is not empty.
|
223 |
-
*
|
224 |
-
* @param $actual
|
225 |
-
* @param string $message
|
226 |
-
* @see \Codeception\Module\Asserts::assertNotEmpty()
|
227 |
-
*/
|
228 |
-
public function assertNotEmpty($actual, $message = null) {
|
229 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
|
230 |
-
}
|
231 |
-
|
232 |
-
|
233 |
-
/**
|
234 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
235 |
-
*
|
236 |
-
* Checks that variable is NULL
|
237 |
-
*
|
238 |
-
* @param $actual
|
239 |
-
* @param string $message
|
240 |
-
* @see \Codeception\Module\Asserts::assertNull()
|
241 |
-
*/
|
242 |
-
public function assertNull($actual, $message = null) {
|
243 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
|
244 |
-
}
|
245 |
-
|
246 |
-
|
247 |
-
/**
|
248 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
249 |
-
*
|
250 |
-
* Checks that variable is not NULL
|
251 |
-
*
|
252 |
-
* @param $actual
|
253 |
-
* @param string $message
|
254 |
-
* @see \Codeception\Module\Asserts::assertNotNull()
|
255 |
-
*/
|
256 |
-
public function assertNotNull($actual, $message = null) {
|
257 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
|
258 |
-
}
|
259 |
-
|
260 |
-
|
261 |
-
/**
|
262 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
263 |
-
*
|
264 |
-
* Checks that condition is positive.
|
265 |
-
*
|
266 |
-
* @param $condition
|
267 |
-
* @param string $message
|
268 |
-
* @see \Codeception\Module\Asserts::assertTrue()
|
269 |
-
*/
|
270 |
-
public function assertTrue($condition, $message = null) {
|
271 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
|
272 |
-
}
|
273 |
-
|
274 |
-
|
275 |
-
/**
|
276 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
277 |
-
*
|
278 |
-
* Checks that condition is negative.
|
279 |
-
*
|
280 |
-
* @param $condition
|
281 |
-
* @param string $message
|
282 |
-
* @see \Codeception\Module\Asserts::assertFalse()
|
283 |
-
*/
|
284 |
-
public function assertFalse($condition, $message = null) {
|
285 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
|
286 |
-
}
|
287 |
-
|
288 |
-
|
289 |
-
/**
|
290 |
-
* [!] Method is generated. Documentation taken from corresponding module.
|
291 |
-
*
|
292 |
-
* Fails the test with message.
|
293 |
-
*
|
294 |
-
* @param $message
|
295 |
-
* @see \Codeception\Module\Asserts::fail()
|
296 |
-
*/
|
297 |
-
public function fail($message) {
|
298 |
-
return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args()));
|
299 |
-
}
|
300 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/codeception/unit/_bootstrap.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Here you can initialize variables that will be available to your tests
|
|
|
|
tests/phantomjs/server.js
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* PhantomJs server for calling webpages & processing JS
|
3 |
-
* returns page content
|
4 |
-
*/
|
5 |
-
|
6 |
-
var args = require('system').args;
|
7 |
-
var address = args[1];
|
8 |
-
var page = new WebPage();
|
9 |
-
|
10 |
-
var renderPage = function(){
|
11 |
-
|
12 |
-
page = require('webpage').create();
|
13 |
-
var myArgs = Array.prototype.slice.call(arguments),
|
14 |
-
url_str = myArgs[0];
|
15 |
-
|
16 |
-
console.log('accessing:'+url_str);
|
17 |
-
|
18 |
-
page.onError = function(msg){console.log('js error');}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* From PhantomJS documentation:
|
22 |
-
* This callback is invoked when there is a JavaScript console. The callback may accept up to three arguments:
|
23 |
-
* the string for the message, the line number, and the source identifier.
|
24 |
-
*/
|
25 |
-
page.onConsoleMessage = function (msg, line, source) {
|
26 |
-
console.log('console> ' + msg);
|
27 |
-
};
|
28 |
-
|
29 |
-
/**
|
30 |
-
* From PhantomJS documentation:
|
31 |
-
* This callback is invoked when there is a JavaScript alert. The only argument passed to the callback is the string for the message.
|
32 |
-
*/
|
33 |
-
page.onAlert = function (msg) {
|
34 |
-
console.log('alert!!> ' + msg);
|
35 |
-
};
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Handle Redirection
|
39 |
-
*/
|
40 |
-
page.onNavigationRequested = function(url_sub_str, type, willNavigate, main) {
|
41 |
-
if (main && url_sub_str != url_str) {
|
42 |
-
url_str = url_sub_str;
|
43 |
-
console.log("redirect caught");
|
44 |
-
page.close();
|
45 |
-
setTimeout(function() {
|
46 |
-
renderPage(url_str)
|
47 |
-
},1);
|
48 |
-
}
|
49 |
-
};
|
50 |
-
|
51 |
-
page.onResourceReceived = function (response) {
|
52 |
-
//console.log('Receive ' + JSON.stringify(response, undefined, 4));
|
53 |
-
};
|
54 |
-
|
55 |
-
//page.onLoadFinished = function() { console.log("onLoadFinished FIRED"); }
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Open the web page and run RRunner
|
59 |
-
*/
|
60 |
-
page.open(url_str, function(status) {
|
61 |
-
console.log('here');
|
62 |
-
if (status === 'success') {
|
63 |
-
console.log(page.content);
|
64 |
-
page.close();
|
65 |
-
setTimeout( function() {
|
66 |
-
|
67 |
-
phantom.exit();
|
68 |
-
} , 5000);
|
69 |
-
} else {
|
70 |
-
console.log('failed');
|
71 |
-
phantom.exit();
|
72 |
-
}
|
73 |
-
});
|
74 |
-
};
|
75 |
-
|
76 |
-
|
77 |
-
address = 'http://local.wordpress.dev/test.php';
|
78 |
-
//address = 'http://local.wordpress.dev/';
|
79 |
-
//address = 'http://www.simpleweb.org/';
|
80 |
-
renderPage(address);
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/phantomjs/server.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//echo shell_exec( '/usr/bin/phantomjs /vagrant/www/wordpress-default/wp-content/plugins/landing-pages/tests/phantomjs/server.js' );
|
3 |
-
//sleep(10);
|
4 |
-
|
5 |
-
//$output = shell_exec('/usr/bin/phantomjs server.js');
|
6 |
-
//echo "<pre>$output</pre>";
|
7 |
-
error_reporting(E_ALL);
|
8 |
-
session_write_close();
|
9 |
-
$result = shell_exec('phantomjs --web-security=false --ssl-protocol=any server.js ' . $_GET['url'] );
|
10 |
-
echo $result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/phantomjs/server.sh
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
#!/bin/sh
|
2 |
-
export DISPLAY=:0
|
3 |
-
phantomjs --ignore-ssl-errors=true server.js 2>&1
|
|
|
|
|
|
tests/phpunit/bootstrap.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Bootstrap the plugin unit testing environment.
|
4 |
-
*
|
5 |
-
* @package wordpress-plugin-tests
|
6 |
-
*/
|
7 |
-
|
8 |
-
/* load wp environemnt */
|
9 |
-
require '../../../wp-load.php';
|
10 |
-
|
11 |
-
/* load plugins */
|
12 |
-
require '../../../wp-admin/includes/plugin.php';
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/phpunit/test.activations.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Tests to test that that testing framework is testing tests. Meta, huh?
|
5 |
-
*
|
6 |
-
* @package wordpress-plugins-tests
|
7 |
-
*/
|
8 |
-
class Tests_Activation extends PHPUnit_Framework_TestCase {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Run a simple test to ensure that the tests are running
|
12 |
-
*/
|
13 |
-
function test_tests() {
|
14 |
-
$this->assertTrue( true );
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Ensure landing pages is active
|
19 |
-
*/
|
20 |
-
function test_lading_pages_activated() {
|
21 |
-
$this->assertTrue( is_plugin_active( 'landing-pages/landing-pages.php' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Ensure that the Leads has been installed and activated.
|
26 |
-
*/
|
27 |
-
function test_leads_activated() {
|
28 |
-
$this->assertTrue( is_plugin_active( 'leads/leads.php' ) );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Ensure that the Calls to Action has been installed and activated.
|
33 |
-
*/
|
34 |
-
function test_cta_activated() {
|
35 |
-
$this->assertTrue( is_plugin_active( 'cta/calls-to-action.php' ) );
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Run upgrade routines and check option to see if complete
|
40 |
-
*/
|
41 |
-
function test_run_upgrade_routines() {
|
42 |
-
include_once LANDINGPAGES_PATH . 'classes/class.activation.php';
|
43 |
-
include_once LANDINGPAGES_PATH . 'classes/class.activation.upgrade-routines.php';
|
44 |
-
Landing_Pages_Activation::run_updates();
|
45 |
-
$this->assertTrue( true );
|
46 |
-
}
|
47 |
-
|
48 |
-
}
|
49 |
-
|
50 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/phpunit/test.statistics.php
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Test design to juse phantomjs to interact with front end. This test is disabled in favor for codeception tests
|
5 |
-
*
|
6 |
-
* @package wordpress-plugins-tests
|
7 |
-
*/
|
8 |
-
class Tests_Statistics extends PHPUnit_Framework_TestCase {
|
9 |
-
|
10 |
-
var $lp_id;
|
11 |
-
var $variations;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* setup
|
15 |
-
*/
|
16 |
-
function setUp() {
|
17 |
-
return;
|
18 |
-
/* includes */
|
19 |
-
include_once LANDINGPAGES_PATH . 'modules/module.install.php';
|
20 |
-
include_once LANDINGPAGES_PATH . 'classes/class.statistics.php';
|
21 |
-
|
22 |
-
$this->lp_id = inbound_install_example_lander();
|
23 |
-
/* clear the stats */
|
24 |
-
$this->variations = Landing_Pages_Statistics::get_variations($this->lp_id );
|
25 |
-
foreach ($this->variations as $vid) {
|
26 |
-
Landing_Pages_Statistics::set_impression_count( $this->lp_id , $vid, 0 );
|
27 |
-
Landing_Pages_Statistics::set_conversion_count( $this->lp_id , $vid, 0 );
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Tear down
|
33 |
-
*/
|
34 |
-
function tearDown() {
|
35 |
-
return;
|
36 |
-
//delete_option('lp_settings_general');
|
37 |
-
//wp_delete_post( $this->lp_id , false );
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Test is Landing_Pages_Statistics::read_statistics works
|
43 |
-
*/
|
44 |
-
function test_read_statistics() {
|
45 |
-
return;
|
46 |
-
|
47 |
-
/* includes */
|
48 |
-
include_once LANDINGPAGES_PATH . 'classes/class.statistics.php';
|
49 |
-
|
50 |
-
$stats = Landing_Pages_Statistics::read_statistics( $this->lp_id );
|
51 |
-
|
52 |
-
$this->assertEquals( count($stats) , 3 );
|
53 |
-
$this->assertEquals( $stats['impressions'][0] , 0 );
|
54 |
-
$this->assertEquals( $stats['conversions'][0] , 0 );
|
55 |
-
$this->assertEquals( $stats['impressions'][1] , 0 );
|
56 |
-
$this->assertEquals( $stats['conversions'][1] , 0 );
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* launch a landing page
|
61 |
-
*/
|
62 |
-
function test_landing_page_read() {
|
63 |
-
return;
|
64 |
-
|
65 |
-
/* includes */
|
66 |
-
include_once LANDINGPAGES_PATH . 'classes/class.statistics.php';
|
67 |
-
|
68 |
-
$permalink = get_post_permalink( $this->lp_id , false );
|
69 |
-
echo $permalink."\r\n";
|
70 |
-
$permalink = 'http://local.wordpress.dev/go/ab-testing-landing-page-example-104/?lp-variation-id=1';
|
71 |
-
$permalink = 'http://local.wordpress.dev/';
|
72 |
-
print_r(inbound_remote_get( $permalink ));
|
73 |
-
/*
|
74 |
-
sleep(5);
|
75 |
-
$response = inbound_remote_get( $permalink );
|
76 |
-
sleep(5);
|
77 |
-
$response = inbound_remote_get( $permalink );
|
78 |
-
sleep(5);
|
79 |
-
$response = inbound_remote_get( $permalink );
|
80 |
-
sleep(5);
|
81 |
-
$response = inbound_remote_get( add_query_arg( array('lp-variation-id'=> 0 ) , $permalink ) );
|
82 |
-
sleep(5);
|
83 |
-
$response = inbound_remote_get( add_query_arg( array('lp-variation-id'=> 1 ) , $permalink ) );
|
84 |
-
sleep(5);
|
85 |
-
*/
|
86 |
-
$stats = Landing_Pages_Statistics::read_statistics( $this->lp_id );
|
87 |
-
print_r($stats);
|
88 |
-
|
89 |
-
$this->assertEquals( $stats['impressions'][0] , 3 );
|
90 |
-
$this->assertEquals( $stats['conversions'][0] , 0 );
|
91 |
-
$this->assertEquals( $stats['impressions'][1] , 3 );
|
92 |
-
$this->assertEquals( $stats['conversions'][1] , 0 );
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/test_check_impressions.php
DELETED
File without changes
|
tests/test_wordpress_plugin_tests.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Tests to test that that testing framework is testing tests. Meta, huh?
|
5 |
-
*
|
6 |
-
* @package wordpress-plugins-tests
|
7 |
-
*/
|
8 |
-
class WP_Test_WordPress_Plugin_Tests extends WP_UnitTestCase {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Run a simple test to ensure that the tests are running
|
12 |
-
*/
|
13 |
-
function test_tests() {
|
14 |
-
|
15 |
-
$this->assertTrue( true );
|
16 |
-
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Ensure that the plugin has been installed and activated.
|
21 |
-
*/
|
22 |
-
function test_plugin_activated() {
|
23 |
-
|
24 |
-
$this->assertTrue( is_plugin_active( 'plugin-slug/main-plugin-file.php' ) );
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/travis-ci/bootstrap.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Bootstrap the plugin unit testing environment.
|
4 |
-
*
|
5 |
-
* Edit 'active_plugins' setting below to point to your main plugin file.
|
6 |
-
*
|
7 |
-
* @package wordpress-plugin-tests
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Activates this plugin in WordPress so it can be tested.
|
11 |
-
$GLOBALS['wp_tests_options'] = array(
|
12 |
-
'active_plugins' => array(
|
13 |
-
'landing-pages/landing-pages.php',
|
14 |
-
'cta/wordpress-cta.php',
|
15 |
-
'leads/wordpress-leads.php',
|
16 |
-
),
|
17 |
-
);
|
18 |
-
|
19 |
-
// If the develop repo location is defined (as WP_DEVELOP_DIR), use that
|
20 |
-
// location. Otherwise, we'll just assume that this plugin is installed in a
|
21 |
-
// WordPress develop SVN checkout.
|
22 |
-
|
23 |
-
if( false !== getenv( 'WP_DEVELOP_DIR' ) ) {
|
24 |
-
require getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/bootstrap.php';
|
25 |
-
} else {
|
26 |
-
require '../../../../tests/phpunit/includes/bootstrap.php';
|
27 |
-
}
|
28 |
-
|
29 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/travis-ci/test.activations.php
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Tests to test that that testing framework is testing tests. Meta, huh?
|
5 |
-
*
|
6 |
-
* @package wordpress-plugins-tests
|
7 |
-
*/
|
8 |
-
class Tests_Activation extends WP_UnitTestCase {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Run a simple test to ensure that the tests are running
|
12 |
-
*/
|
13 |
-
function test_tests() {
|
14 |
-
$this->assertTrue( true );
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Ensure landing pages is active
|
19 |
-
*/
|
20 |
-
function test_lading_pages_activated() {
|
21 |
-
$this->assertTrue( is_plugin_active( 'landing-pages/landing-pages.php' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Ensure that the Leads has been installed and activated.
|
26 |
-
*/
|
27 |
-
function test_leads_activated() {
|
28 |
-
$this->assertTrue( is_plugin_active( 'leads/wordpress-leads.php' ) );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Ensure that the Calls to Action has been installed and activated.
|
33 |
-
*/
|
34 |
-
function test_cta_activated() {
|
35 |
-
$this->assertTrue( is_plugin_active( 'cta/wordpress-cta.php' ) );
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Run upgrade routines and check option to see if complete
|
40 |
-
*/
|
41 |
-
function test_run_upgrade_routines() {
|
42 |
-
include_once LANDINGPAGES_PATH . 'classes/class.activation.php';
|
43 |
-
include_once LANDINGPAGES_PATH . 'classes/class.activation.upgrade-routines.php';
|
44 |
-
Landing_Pages_Activation::run_updates();
|
45 |
-
$this->assertTrue( true );
|
46 |
-
}
|
47 |
-
|
48 |
-
}
|
49 |
-
|
50 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests/travis-ci/test.statistics.php
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Tests to test that that testing framework is testing tests. Meta, huh?
|
5 |
-
*
|
6 |
-
* @package wordpress-plugins-tests
|
7 |
-
*/
|
8 |
-
class Tests_Statistics extends WP_UnitTestCase {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Test to see if get_post works.
|
12 |
-
*
|
13 |
-
* Compares a post ID ($org_post_id) with post ID
|
14 |
-
* taken out of get_post ($new_post_id).
|
15 |
-
* If they don't match, get_post() doesn't work, and it will
|
16 |
-
* return an error.
|
17 |
-
*/
|
18 |
-
function test_get_post() {
|
19 |
-
//Create new post using method provided by WP
|
20 |
-
$org_post_id = $this->factory->post->create();
|
21 |
-
|
22 |
-
//get post object using the new post's ID
|
23 |
-
$post_obj = get_post( $org_post_id );
|
24 |
-
|
25 |
-
//Get the post ID as given to us by get_post
|
26 |
-
$new_post_id = $post_obj->ID;
|
27 |
-
|
28 |
-
//Use pre-defined method to test if the two ID's match
|
29 |
-
$this->assertEquals( $org_post_id, $new_post_id );
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* creates a dummy landing page for testing
|
35 |
-
*/
|
36 |
-
function test_create_demo_lander() {
|
37 |
-
/* load the class used to create the dummy landing page */
|
38 |
-
include_once LANDINGPAGES_PATH . 'modules/module.install.php';
|
39 |
-
$lp_id = inbound_create_default_post_type();
|
40 |
-
$this->assertEquals( $lp_id , 4 );
|
41 |
-
echo 1;
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Check if landing-page post type exists
|
48 |
-
*/
|
49 |
-
function test_check_if_landing_page_post_type_exist() {
|
50 |
-
$this->assertTrue( post_type_exists( 'landing-page' ) );
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Set landing page stats to zero for testing
|
57 |
-
*/
|
58 |
-
function test_reset_landing_page_stats() {
|
59 |
-
echo 2;
|
60 |
-
print_r( get_option( 'lp_settings_general' ) );
|
61 |
-
$landing_page = get_post( 4 );
|
62 |
-
var_dump($landing_page);
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|