Last Updated: Aug. 30, 2022 at 02:50pm UTC
Class

KeyFactory

Creats randomly generated strings for use as public and private keys.

Static Method
make public
Class

SecretStore

Manages a stored secret and guarentees that one is always available.

Static Method
getOrCreate public
Static Method
validate public
Class

Token

Creates an encoded public/private key hash and validates it.

Method
__construct public
Param
string $privateKey
Method
create public
Param
string $publicKey
Return
string
Method
validate public
Param
string $token
Return
bool
Method
hash protected
Param
string $publicKey
Return
string
Class

TokenFactory

Creates a new token using the stored secret.

Static Method
make public
Class

FieldsBuilder

Method
__construct public
Method
get public
Method
Method
toArray protected
Class

FieldsBuilderFactory

Method
make public
Method
$field
Class

FormsBuilder

Method
__construct public
Method
get public
Method
Method
toArray protected
Class

FormsBuilderFactory

Method
make public
Method
$form
Class

SubmissionsBuilder

Static Method
make public
Method
__construct public
Method
get public
Method
toArray protected
Method
formatValue protected
Method
constructOutputForFieldset protected
Construct string representation of fieldset repeater data for block
Param
array $fieldsetSubmissionValues
Return
string
Method
normalizeArrayKeys protected
Method
initializeFieldsetRepeater protected
Isolate construction of FieldsetRepeater
Class

SubmissionsBuilderFactory

Method
make public
Param
int $formID
Param
int $perPage
Param
int $page
Return
SubmissionsBuilder
Method
Class

Static Method
flattenPostmeta protected
Class

KeyFactoryTest

Method
testKeyLength public
Class

KeyFactoryTest

Method
get_option
Method
update_option
Class

SecretTest

Method
testCreatesASecretIfDoesNotExist public
Method
testDefaultDefinedConstant public
Method
testWrongTypeSecretSelfCorrects public
Class

HashTest

Method
testTokenValidates public
Method
testTokenDoesNotValidate public
Class

FieldsBuilderTest

Method
testReturnsLimitedArray public
Method
testReturnsOnlyUserInputFields public
Class

FormsBuilderTest

Method
testReturnsKeyedArray public
Class

FormsBuilderTest

Method
is_serialized
Class

SubmissionsBuilderTest

Method
testReturnsNormalizedKeys public
Method
testReturnsFlattenedFileUploads public
Class

NF_AJAX_Controllers_DeleteAllData

Method
__construct public
Method
delete_all_data public
Method
prepare_in private
Class

NF_AJAX_Controllers_DispatchPoints

Method
__construct public
Method
undo_click public
Method
form_telemetry public
Class

NF_AJAX_Controllers_Fields

Method
__construct public
Method
maybe_delete_field public
Check if the field has data, if so let the front-end know to show delete field modal
Class

NF_AJAX_Controllers_Form

Method
__construct public
Method
plugins_loaded public
Method
save public
Method
delete public
Method
remove_maintenance_mode public
This function will take all form out of maintenance mode( in case some are still in maintenance mode after some required updates )
Since
3.4.0
Method
get_new_nonce public
Let's generate a unique nonce for each form render so that we don't get caught with an expiring nonce accidentally and fail to allow a submission
Since
3.2
Class

NF_AJAX_Controllers_FormEndpoints

Method
__construct public
Method
get_forms public
Method
get_new_form_templates public
Method
delete public
Method
duplicate public
Class

NF_AJAX_Controllers_JSError

Method
__construct public
Method
log_error public
Class

NF_AJAX_Controllers_Preview

Method
__construct public
Method
update public
Method
filter_action_settings public
Method
get_form_data private
Method
update_form_data private
Class

NF_AJAX_Controllers_SavedFields

Method
__construct public
Method
create public
Method
update public
Method
delete public
Class

NF_AJAX_Controllers_Submission

Method
__construct public
Method
submit public
Method
resume public
Method
process protected
Method
validate_field protected
Method
process_field protected
Method
maybe_halt protected
Method
sort_form_actions protected
Method
shutdown public
Method
form_data_check protected
Method
is_preview protected
Method
_respond protected
Method
process_repeater_fields_merge_tags protected
Process fields merge tags for fields inside a repeater fieldset
Param
object $field The Repeater Fieldset
Class

NF_AJAX_Processes_NullProcess

Method
task protected
Class

NF_AJAX_Processes_UpdateFields

Method
task protected
Class

NF_AJAX_REST_BatchProcess

Method
__construct public
Method
post public
POST /forms//
Param
array $request_data [ int $clone_id ]
Return
array $data [ int $new_form_id ]
Method
get_request_data protected
Class

NF_AJAX_REST_Controller

Method
__construct public
Setup admin-ajax to access the endpoint router.
Method
route public
Map admin-ajax requests to the corresponding method callback.
Method
get_request_data protected
[OVERRIDE THIS] Get sanitized request data for use in method callbacks.
Return
array
Method
shutdown public
Returns debugging data when a fatal error is triggered.
Class

NF_AJAX_REST_Forms

Method
__construct public
Method
post public
POST /forms//
Param
array $request_data [ int $clone_id ]
Return
array $data [ int $new_form_id ]
Method
get public
GET forms/
Return
array [ $forms ]
Method
delete public
DELETE forms//
Param
array $request_data => [ form_id ]
Return
array $data => [ delete => null ]
Method
get_request_data protected
Form ID, Clone ID
Return
array $request_data
Class

NF_AJAX_REST_NewFormTemplates

Method
get public
GET new-form-templates/
Return
array [ $new_form_templates ]
Method
cmp private
Comparison function used to sort templates alphabetically by title
Since
3.2.22
Param
array $a item being compared
Param
array $b item being compared
Return
int
Class

NF_AJAX_REST_RequiredUpdate

Method
__construct public
Method
post public
POST
Param
array $request_data [ int $clone_id ]
Return
array $data [ int $new_form_id ]
Method
get public
GET
Param
$request_data (Array)
Return
$data (Array)
Since
3.4.0
Method
get_request_data protected
Method
get_current_updates private
Function to get the list of updates that need to run.
Param
$processed (Array) The list of updates that have already run on this install.
Return
Array
Method
sort_updates private
Function to sort the updates to be run.
Param
$current (Array) The list of updates to be run.
Param
$previous (Array) The list of updates that have already been run.
Return
Array
Class

NF_AJAX_Requests_DeleteField

Method
handle protected
Class

NF_AJAX_Requests_NullRequest

Method
handle protected
Class

NF_Abstracts_Action

Method
__construct public
Constructor
Method
save public
Save
Method
process abstract
Method
get_timing public
Get Timing
Returns the timing for an action.
Return
mixed
Method
get_priority public
Get Priority
Returns the priority for an action.
Return
int
Method
get_name public
Get Name
Returns the name of an action.
Return
string
Method
get_nicename public
Get Nicename
Returns the nicename of an action.
Return
string
Method
get_section public
Get Section
Returns the drawer section for an action.
Return
string
Method
get_image public
Get Image
Returns the url of a branded action's image.
Return
string
Method
get_settings public
Get Settings
Returns the settings for an action.
Return
array|mixed
Static Method
sort_actions public
Method
load_settings protected
Class

NF_Abstracts_ActionNewsletter

Method
__construct public
Constructor
Method
save public
Method
process public
Method
_get_lists public
Method
get_lists protected
Method
get_list_settings private
Method
cache_lists private
Class

NF_Abstracts_BatchProcess

Method
__construct public
Constructor
Method
init public
Decides whether we need to run startup or restart and then calls processing.
Since
3.4.0
Return
void
Method
process public
Function to loop over the batch.
Since
3.4.0
Return
void
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Return
void
Method
restart public
Function to run any setup steps necessary to begin processing for steps after the first.
Since
3.4.0
Return
void
Method
get_steps public
Returns how many steps we have in this process.
If this method isn't overwritten by a child, it defaults to 1.
Since
3.4.0
Return
int
Method
add_error public
Adds an error to the response object.
Param
$slug (String) The slug for this error code.
Param
$msg (String) The error message to be displayed.
Param
$type (String) warning or fatal, depending on the error. Defaults to warning.
Since
3.4.11
Method
cleanup public
Function to cleanup any lingering temporary elements of a batch process after completion.
Since
3.4.0
Return
void
Method
batch_complete public
Method called when we are finished with this process.
Deletes our "doing" option. Set's our response 'batch_complete' to true. Runs cleanup(). Responds to the JS front-end.
Since
3.4.0
Return
void
Method
next_step public
Method that immediately moves on to the next step.
Used in child methods to stop processing the current step an dmove to the next.
Since
3.4.0
Return
void
Method
respond public
Method that encodes $this->response and sends the data to the front-end.
Since
3.4.0 @updated 3.4.11
Return
void
Method
flag public
Method to check or modify our processor flag.
Since
3.5.0
Param
$flag (String) The flag to check
Param
$action (String) The type of interaction to be performed
Return
Mixed
Class

NF_Abstracts_Controller

Method
__construct public
NF_Abstracts_Controller constructor.
Method
_respond protected
Respond
A wrapper for the WordPress AJAX response pattern.
Class

NF_Abstracts_Element

Class

NF_Abstracts_Extension

Static Method
instance public
Method
autoloader public
Method
NF_Abstracts_Extension /** * The main function responsible for returning The Highlander Plugin * Instance to functions everywhere. * * Use this function like you would a global variable, except without needing * to declare the global. * * Example: <?php $nf = NF_Abstracts_Extension(); ?> * * @since 3.0 * @return Plugin Highlander Instance */
Class

NF_Abstracts_Field

Method
__construct public
Constructor
Method
validate public
Validate
Param
$field
Param
$data
Return
array $errors
Method
process public
Method
admin_form_element public
Admin Form Element
Returns the output for editing fields in a submission.
Param
$id
Param
$value
Return
string
Method
get_name public
Method
get_nicename public
Method
get_section public
Method
get_icon public
Method
get_aliases public
Method
get_type public
Method
get_parent_type public
Method
get_settings public
Method
use_merge_tags public
Method
get_test_value public
Method
get_templates public
Method
get_wrap_template public
Method
get_old_classname public
Method
show_in_builder public
Method
load_settings protected
Static Method
get_base_template public
Static Method
sort_by_order public
Method
localize_settings public
Class

NF_Abstracts_FieldOptIn

Method
__construct public
Method
addList protected
Method
addLists protected
Method
get_parent_type public
Class

NF_Abstracts_Input

Method
__construct public
Method
get_parent_type public
Class

NF_Abstracts_List

Method
__construct public
Method
get_parent_type public
Method
admin_form_element public
Method
custom_columns public
Method
query_string_default public
Class

NF_Abstracts_LogLevel


Describes log levels

Class

NF_Abstracts_Logger

Method
emergency public
System is unusable.
Param
string $message
Param
array $context
Return
null
Method
alert public
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
Param
string $message
Param
array $context
Return
null
Method
critical public
Critical conditions.
Example: Application component unavailable, unexpected exception.
Param
string $message
Param
array $context
Return
null
Method
error public
Runtime errors that do not require immediate action but should typically be logged and monitored.
Param
string $message
Param
array $context
Return
null
Method
warning public
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Param
string $message
Param
array $context
Return
null
Method
notice public
Normal but significant events.
Param
string $message
Param
array $context
Return
null
Method
info public
Interesting events.
Example: User logs in, SQL logs.
Param
string $message
Param
array $context
Return
null
Method
debug public
Detailed debug information.
Param
string $message
Param
array $context
Return
null
Class

NF_Abstracts_Logger

Method
emergency public
System is unusable.
Param
string $message
Param
array $context
Return
null
Method
alert public
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
Param
string $message
Param
array $context
Return
null
Method
critical public
Critical conditions.
Example: Application component unavailable, unexpected exception.
Param
string $message
Param
array $context
Return
null
Method
error public
Runtime errors that do not require immediate action but should typically be logged and monitored.
Param
string $message
Param
array $context
Return
null
Method
warning public
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Param
string $message
Param
array $context
Return
null
Method
notice public
Normal but significant events.
Param
string $message
Param
array $context
Return
null
Method
info public
Interesting events.
Example: User logs in, SQL logs.
Param
string $message
Param
array $context
Return
null
Method
debug public
Detailed debug information.
Param
string $message
Param
array $context
Return
null
Method
log public
Logs with an arbitrary level.
Param
mixed $level
Param
string $message
Param
array $context
Return
null
Class

NF_Abstracts_Menu

Method
__construct public
Constructor
Translate text and add the 'admin_menu' action.
Method
register public
Register the menu page.
Method
get_page_title public
Method
get_menu_title public
Method
get_menu_slug public
Method
get_capability public
Method
display abstract
Class

NF_Abstracts_MergeTags

Method
__construct public
Method
action_replace public
Method
replace public
Method
get_id public
Method
get_title public
Method
get_merge_tags public
Method
is_default_group public
Class

NF_Abstracts_Metabox

Method
__construct public
Method
add_meta_boxes public
Method
render_metabox public
Method
_save_post public
Method
save_post protected
Class

NF_Abstracts_Migration

Method
__construct public
Constructor method for the NF_Abstracts_Migration class.
Param
$table_name (String) The database table name managed by the extension.
Param
$flag (String) The wp option set to determine if this migration has already been run.
Since
3.0.0
Method
table_name public
Function to retrieve the full table name of the extension.
Return
(String) The full table name, including database prefix.
Since
3.0.28
Method
column_exists public
Function to check for the existence of a column in the extension's table.
Param
$column (String) The name of the column to search for.
Return
(Boolean) Whether or not the column exists.
Since
3.4.0
Method
charset_collate public
Funciton to get the charset and collate for migrations.
Param
$use_default (Boolean) Whether or not to include the DEFAULT keyword in the return pattern.
Return
(String) A SQL formatted charset and collate for use by table definition.
Since
3.0.28 @updated 3.1.14
Method
_do_upgrade public
Function to run our required update functions.
Param
$callback (String) The function to be run by this call.
Since
3.4.0
Method
_run public
Function to run our initial migration.
Since
3.0.0
Method
run abstract
Method
_drop public
Function to drop the table managed by this migration.
Since
3.0.28
Method
drop protected
Protection of inherited function drop.
Since
3.0.28
Class

NF_Abstracts_Model

Class NF_Abstracts_Model

Method
__construct public
NF_Abstracts_Model constructor.
Param
$db
Param
$id
Param
$parent_id
Method
get_id public
Get the Permanent ID
Return
int
Method
get_tmp_id public
Get the Temporary ID
Return
null|string
Method
get_type public
Get the Type
Return
string
Method
get_setting public
Get a single setting with a default fallback
Param
string $setting
Param
bool $default optional
Return
string|int|bool
Method
get_settings public
Get Settings
Param
string ...$only returns a subset of the object's settings
Return
array
Method
update_setting public
Update Setting
Param
$key
Param
$value
Return
bool|false|int
Method
update_settings public
Update Settings
Param
$data
Return
bool
Method
delete public
Delete
Delete the object, its children, and its relationships.
Return
bool
Method
find public
Find
Param
string $parent_id
Param
array $where
Return
array
Method
get_object_settings public
Method
save public
Save
Method
_insert_row public
Method
cache public
Cache Flag
Param
string $cache
Return
$this
Method
add_parent public
Add Parent
Set the Parent ID and Parent Type properties
Param
$parent_id
Param
$parent_type
Return
$this
Method
_save_setting protected
Save Setting
Save a single setting.
Param
$key
Param
$value
Return
bool|false|int
Method
_save_settings protected
Save Settings
Save all settings.
Return
bool
Method
_save_parent_relationship protected
Save Parent Relationship
Return
$this
Method
build_meta_query protected
Build Meta Query
Param
string $parent_id
Param
array $where
Return
string
Class

NF_Abstracts_ModelFactory

Class NF_Abstracts_ModelFactory

Method
__construct public
NF_Abstracts_ModelFactory constructor.
Param
$db
Param
$id
Method
__call public
PHP MAGIC method for catching undefined methods. Use this as a passthrough for methods of the form model.
Param
$method (String) The name of the called method.
Param
$args (Array) The arguments supplied to the method.
Return
(Mixed) Will match the return type of the supplied method.
Since
UPDATE_VERSION_ON_MERGE
Method
get public
Returns the parent object set by the constructor for chained methods.
Return
object
Method
get_forms public
Get Forms
Returns an array of Form Model Objects.
Param
array $where
Return
array|bool
Method
export_form public
Export Form
A wrapper for the Form Model export method.
Param
bool|FALSE $return
Return
array
Method
import_form public
Import Form
A wrapper for the Form Model import method.
Param
$import
Param
$decode_utf8
Param
$id
Param
$is_conversion
Method
field public
Sets the parent object for chained methods as a Field.
Param
string $id
Return
$this
Method
get_field public
Returns a field object.
Param
$id
Return
NF_Database_Models_Field
Method
get_fields public
Returns an array of field objects for the set form (object).
Param
array $where
Param
bool|FALSE $fresh
Return
array
Method
import_field public
Import Field
A wrapper for the Form Model import method.
Param
$import
Method
action public
Sets the parent object for chained methods as an Action.
Param
string $id
Return
$this
Method
get_action public
Returns an action object.
Param
$id
Return
NF_Database_Models_Action
Method
get_actions public
Returns an array of action objects for the set form (object).
Param
array $where
Param
bool|FALSE $fresh
Return
array
Method
object public
Sets the parent object for chained methods as an Object.
Param
string $id
Return
$this
Method
get_object public
Returns an object.
Param
$id
Return
NF_Database_Models_Object
Method
get_objects public
Returns an array of objects for the set object.
Param
array $where
Param
bool|FALSE $fresh
Return
array
Method
sub public
Submission
Returns a single submission by ID, or an empty submission.
Param
string $id
Return
$this
Method
get_sub public
Get Submission
Returns a single submission by ID.
Param
$id
Return
NF_Database_Models_Submission
Method
get_subs public
Get Submissions
Returns an array of Submission Model Objects.
Param
array $where
Param
bool|FALSE $fresh
Return
array
Method
export_subs public
Export Submissions
A wrapper for the Submission Model export method.
Param
array $sub_ids
Param
bool|FALSE $return
Return
string
Method
get_model public
Get Model
A generic method call for any object model type.
Param
$id
Param
$type
Return
bool|NF_Database_Models_Action|NF_Database_Models_Field|NF_Database_Models_Form|NF_Database_Models_Object
Class

NF_Abstracts_PaymentGateway

Method
__construct public
Method
get_slug public
Method
get_name public
Method
get_settings public
Method
_process public
Method
process protected
Class

NF_Abstracts_RequiredUpdate

Method
__construct public
Constructor
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
cleanup public
Function to cleanup any lingering temporary elements of required updates after completion.
Since
3.4.0
Method
respond public
Function to dump our JSON response and kill processing.
Since
3.4.0
Method
migrate protected
Function to run our table migrations.
Param
$callback (String) The callback function in the migration file.
Since
3.4.0
Method
prepare public
Function to prepare our query values for insert.
Param
$value (Mixed) The value to be escaped for SQL.
Return
(String) The escaped (and possibly serialized) value of the string.
Since
3.4.0
Method
query protected
Function used to call queries that are gated by debug.
Param
$sql (String) The query to be run.
Return
(Object) The response to the wpdb query call.
Since
3.4.0
Method
confirm_complete protected
Function to record the completion of our update in the DB.
Since
3.4.0
Method
enable_maintenance_mode public
Enable Maintenance mode Enables maintenance mode so the form will not render on the front end while updates are running.
Since
3.4.0
Param
$prefix - the db prefix.
Param
$form_id - The id of the form.
Method
disable_maintenance_mode public
Disable Maintenance Mode Disables maintenance mode, so the form will be displayed on the front end..
Since
3.4.0
Param
$prefix - the db prefix.
Param
$form_id - The id of the form.
Class

NF_Abstracts_Routes

Method
__construct public
Register the API routes
Since
3.4.33
Method
register_routes abstract
Class

NF_Abstracts_Submenu

Method
__construct public
Constructor
Translate text and add the 'admin_menu' action.
Method
register public
Register the menu page.
Method
get_page_title public
Method
get_menu_title public
Method
get_menu_slug public
Method
get_capability public
Method
display abstract
Class

SubmissionHandler

Method
__construct public
Registers command to export single submission as PDF
Return
void
Method
constructLabel protected
Method
addSubmissionHandler public
Method
doesAddHandler protected
Method
handle public
Perform extra handler action on a single submission
Param
SingleSubmission $singleSubmission
Return
array
Method
handleSubmission protected
Method
getDownload public
Returns payload for download
Return
string
Method
getSlug public
Return an identifying slug for the handler
Return
string
Method
getLabel public
Return a label for the handler
Return
string
Method
getHandlerClassName public
Class

NF_Abstracts_SubmissionMetabox

Method
__construct public
Class

NF_Abstracts_UserInfo

Method
__construct public
Method
filter_default_value public
Class

NF_Actions_Akismet

Method
__construct public
Constructor
Method
maybe_remove_action public
Remove the action registration if Akismet functions not available.
Param
array $action_type_settings
Return
array
Method
akismet_available protected
Is Akismet installed and connected with a valid key?
Return
bool
Method
process public
Process the action
Param
array $action_settings
Param
int $form_id
Param
array $data
Return
array
Method
is_submission_spam protected
Verify submission
Param
$name
Param
$email
Param
$url
Param
$message
Return
bool
Class

NF_Actions_CollectPayment

Method
__construct public
Constructor
Param
string $cp_nice_name
Param
string $cp_name
Method
save public
Method
process public
Method
register_payment_gateways public
Method
maybe_remove_action public
Class

NF_Actions_Custom

Method
__construct public
Constructor
Method
save public
Method
process public
Class

NF_Actions_DeleteDataRequest

Method
__construct public
Constructor
Method
save public
Method
process public
Creates a Erase Personal Data request for the user with the email provided
Param
$action_settings
Param
$form_id
Param
$data
Return
array
Class

NF_Actions_Email

Method
__construct public
Constructor
Method
process public
Method
sanitize_address_fields protected
Sanitizes email address settings
Since
3.2.2
Param
array $action_settings
Return
array
Method
check_for_errors protected
Method
_get_headers private
Method
_get_attachments private
Method
_format_from private
Method
_format_recipients private
Method
_format_recipient private
Method
_create_csv private
Method
_drop_csv private
Function to delete csv file from temp directory after Email Action has completed.
Method
_backwards_compatibility private
Method
ninja_forms_sub_csv_delimiter public
Method
ninja_sub_csv_enclosure public
Method
ninja_sub_csv_terminator public
Method
ninja_forms_action_email_attachments public
Method
format_plain_text_message private
Class

NF_Actions_ExportDataRequest

Method
__construct public
Constructor
Method
save public
Method
process public
Creates a Export Personal Data request for the user with the email provided
Param
$action_settings
Param
$form_id
Param
$data
Return
array
Class

NF_Actions_Recaptcha

Method
__construct public
Constructor
Method
set_form_id public
Setter method for the form_id and callback for the nf_get_form_id action.
Since
3.2.2
Param
string $form_id The ID of the current form.
Return
void
Method
get_form_id public
Method
maybe_remove_action public
Remove the action registration if Akismet functions not available.
Param
array $action_type_settings
Return
array
Method
is_action_enabled_for_form protected
Return
bool
Method
is_recaptcha_configured protected
Is the reCAPTCHA configured correctly
Return
bool
Method
is_action_configured protected
Is the reCAPTCHA action enabled
Return
bool
Method
maybe_output_field_template public
Method
get_field_id_hash protected
Method
maybe_remove_v2_field public
Remove v2 reCAPTCHA fields if still configured, when using the v3 Action
Param
array $fields
Return
array
Method
maybe_remove_v2_field_from_builder public
Don't show the v2 reCAPTCHA field in the builder when using the v3 Action
Param
bool $show
Param
NF_Abstracts_Field $field
Return
bool
Method
maybe_inject_field public
Param
array $fields
Param
int $form_id
Return
array
Method
enqueue_script public
Method
maybe_enqueue_recaptcha_js protected
Check to not load the Google reCAPTCHA JS if other plugins are doing it
Return
bool
Method
get_form_data protected
Method
get_recaptcha_response protected
Method
process public
Process the action
Param
array $action_settings
Param
int $form_id
Param
array $data
Return
array
Method
is_submission_human protected
Class

NF_Actions_Redirect

Method
__construct public
Constructor
Method
save public
Method
process public
Class

NF_Actions_Save

Method
__construct public
Constructor
Method
save public
Method
submission_expiration_processing public
Submission Expiration Processing Decides if the submission expiration data should be added to the submission expiration option or not.
Param
$action_settings - array.
Param
$form_id - ( int ) The ID of the Form.
Return
void
Method
compare_expiration_option public
Compare Expiration Option Accepts $expiration_data and checks to see if the values already exist in the array.
Since
3.3.2
Param
array $expiration_value - key/value pair $expiration_value[ 'form_id' ] = form_id(int) $expiration_value[ 'expire_time' ] = subs_expire_time(int)
Param
array $expiration_option - list of key/value pairs of the expiration options.
Return
void
Method
remove_expiration_option public
Remove Expiration Option If the expiration action setting is turned off this helper method removes the form id and expiration time from the option.
Param
array $expiration_value - key/value pair $expiration_value[ 'form_id' ] = form_id(int) $expiration_value[ 'expire_time' ] = subs_expire_time(int)
Param
array $expiration_option - list of key/value pairs of the expiration options.
Return
void
Method
process public
Class

NF_Actions_SuccessMessage

Method
__construct public
Constructor
Method
save public
Method
process public
Method
import_form_action_success_message public
Class

NF_Adapters_SubmissionsFields

Method
__construct public
Method
get_value public
Method
offsetSet public
Method
offsetExists public
Method
offsetUnset public
Method
offsetGet public
Method
key public
Method
current public
Method
next public
Method
rewind public
Method
valid public
Class

NF_Adapters_SubmissionsSubmission

Method
__construct public
Method
offsetExists public
Method
offsetGet public
Method
offsetMaybeCreate protected
Method
current public
Class

NF_Admin_AddFormModal

Add a button to tinyMCE editors when eidting posts/pages.

Since
2.9.22

Method
__construct
Method
insert_form_tinymce_buttons public
Output our tinyMCE field buttons
Access
public
Since
2.8
Return
void
Method
output_tinymce_button_js public
Output our tinyMCE field buttons
Access
public
Since
2.8
Return
void
Class

NF_Admin_AllFormsTable

Method
__construct public
Class constructor
Method
no_items public
Method
prepare_items public
Prepare the items for the table to process
Return
Void
Method
get_columns public
Override the parent columns method. Defines the columns to use in your listing table
Return
Array
Method
get_hidden_columns public
Define which columns are hidden
Return
Array
Method
get_sortable_columns public
Define the sortable columns
Return
Array
Method
table_data private
Get the table data
Return
Array
Method
column_default public
Define what data to show on each column of the table
Param
Array $item Data
Param
String $column_name - Current column name
Return
Mixed
Method
sort_data private
Allows you to sort the data by the variables set in the $_GET
Return
Mixed
Method
column_cb
Method
column_title
Method
single_row public
Method
get_bulk_actions public
Returns an associative array containing the bulk action
Return
array
Static Method
process_bulk_action public
Static Method
delete_item public
Class

NF_Admin_CPT_DownloadAllSubmissions

Method
__construct
Method
loading public
Method
step public
Method
complete public
Method
random_filename public
Add an integar to the end of our filename to make sure it is unique
Access
public
Since
2.7.6
Return
$filename
Method
bulk_admin_footer public
Method
get_sub_count
Class

NF_Admin_CPT_Submission

Class NF_Admin_CPT_Submission

Method
__construct public
Constructor
Method
custom_post_type /** * Custom Post Type */
Method
nf_trash_sub public
Method
enqueue_scripts public
Method
post_row_actions public
Method
change_columns public
Method
custom_columns public
Method
save_nf_sub public
Method
add_meta_boxes public
Meta Boxes
Method
fields_meta_box public
Fields Meta Box
Param
$post
Static Method
sort_fields public
Method
info_meta_box public
Info Meta Box
Param
$post
Method
remove_meta_boxes public
Remove Meta Boxes
Method
cap_filter public
Method
filter_hidden_columns public
Filter our hidden columns so that they are handled on a per-form basis.
Access
public
Since
2.7
Return
void
Method
convert_hidden_columns private
Convert Hidden Columns Looks for 2.9.x hidden columns formatting and converts it to the formatting 3.0 expects.
Param
$form_id
Param
$hidden_columns
Return
mixed
Method
hide_columns public
Save our hidden columns per form id.
Access
public
Since
2.7
Return
void
Method
$field
Method
not_found_message private
Class

NF_Admin_FooterMessage

Update the admin footer text for Ninja Forms pages

Since
3.6.12

Method
__construct public

Method
nf_admin_footer_text public
Changes the admin footer text
Adds Ninja Forms review request.
Return
String
Class

NF_Admin_Menus_AddNew

Method
__construct public
Method
nf_upgrade_redirect public
If we have required updates, unregister the menu item
Method
get_page_title public
Method
get_capability public
Method
display public
Class

NF_Admin_Menus_Addons

Method
__construct public
Method
nf_upgrade_redirect public
If we have required updates, unregister the menu item
Method
get_page_title public
Method
get_capability public
Method
display public
Static Method
filterItemsByCategroy public
Method
Method
Class

NF_Admin_Menus_Dashboard

Method
__construct public
Method
get_page_title public
Method
get_capability public
Method
display public
Method
enqueue_dashboard_script public
Enqueue dashboard page elements
Class

NF_Admin_Menus_Divider

Method
__construct public
Method
display public
Class

NF_Admin_Menus_Forms

Method
__construct public
Method
nf_upgrade_redirect public
If we have required updates, redirect to the main Ninja Forms page
Method
body_class public
Method
get_page_title public
Method
admin_init public
Method
display public
Method
submenu_separators public
Method
import_from_template private
TODO: Remove this function and its hook because we are handling template imports via the batch processor.
Since
3.0
Return
void
Method
_enqueue_the_things private
Method
_localize_form_data private
Method
null_data_check private
Null Data Check Accepts array of settings and removes null data the array.
Param
$settings - a key/value pair of settings.
Return
array
Method
_localize_field_type_data private
Method
_localize_action_type_data private
Method
_localize_form_settings protected
Method
_localize_merge_tags protected
Method
_group_settings protected
Method
_unique_settings protected
Method
_setting_defaults protected
Method
_fetch_action_feed protected
Method
_fetch_settings_feed protected
Method
_fetch_field_feed protected
Method
setting_group_priority protected
Method
get_capability public
Class

NF_Admin_Menus_ImportExport

Method
__construct public
Method
nf_upgrade_redirect public
Method
get_page_title public
Method
import_form_listener public
Method
export_form_listener public
Method
import_fields_listener public
Method
sanitizeUnserialize protected
Ensure unserialized value is sanitized against malicious objects
Param
string $serializedValue
Return
array Expected return is indexed array
Method
export_fields_listener public
Method
display public
Method
add_meta_boxes public
Method
template_import_forms public
Method
template_export_forms public
Method
template_import_favorite_fields public
Method
template_export_favorite_fields public
Method
import_fields_backwards_compatibility public
Method
upload_error_check private
Method
get_capability public
Class

NF_Admin_Menus_Licenses

Method
__construct public
Method
submit_listener public
Method
register_licenses public
Method
add_meta_boxes public
Method
display public
Method
get_license private
Method
activate_license private
Method
deactivate_license private
Class

NF_Admin_Menus_MockData

Method
__construct public
Method
mock_and_redirect public
Method
display public
Method
mock_data private
Class

NF_Admin_Menus_Settings

Method
__construct public
Method
maybe_hide_rollback public
Function to detect installations without 2.9x tables and prevent them from accessing 2.9x.
Since
3.5
Param
Array $settings The Ninja Forms settings array.
Return
Array
Method
body_class public
Method
ninja_forms_cf7_notice public
Function to notify users of CF7 conflict Since 3.0
Param
(array) $notices
Return
(array) $notices
Method
get_page_title public
Method
get_capability public
Method
display public
Method
update_settings public
Method
get_settings private
Method
prefix private
Class

NF_Admin_Menus_Submissions

Method
__construct public
Constructor
Method
remove_legacy_submissions_page public
Remove the old Submissions page link when legacy mode is not enabled
Param
$screen object of current screen details
Method
manage_bulk_actions public
Add an option in the bulk action select field
Method
nf_upgrade_redirect public
If we have required updates, redirect to the main Ninja Forms page
Method
change_views public
Change Views WordPress hook that modifies the links on our submissions CPT to allow users to switch between completed and trashed submissions.
Since
3.2.17
Param
$views The views that are associated with this CPT. $views[ 'view' ]
Return
array Returns modified views to allow our users access to the trash.
Method
change_columns public
Change Columns
Return
array
Method
custom_columns public
Custom Columns
Param
$column
Param
$sub_id
Method
remove_filter_show_all_dates public
Remove Filter: Show All Dates
Param
$months
Return
array
Method
add_filters public
Add Filters
Return
bool
Method
table_filter public
Method
search public
@updated 3.3.21.2
Method
remove_bulk_edit public
Method
bulk_admin_footer public
Method
export_listen public
Method
hide_page_title_action public
Method
custom_columns_seq_num private
Custom Columns: ID
Param
$sub
Return
mixed
Method
custom_columns_sub_date private
Custom Columns: Submission Date
Param
$sub
Return
mixed
Method
custom_columns_field private
Custom Columns: Field
Param
$sub
Param
$column
Return
bool
Method
table_filter_by_form private
Method
table_filter_by_date private
Method
enqueue_legacy_scripts public
Method
get_page_title public
Method
display public
Display
Method
body_class public
Method
enqueue_scripts public
enqueue scripts here
Method
get_capability public
Class

NF_Admin_Menus_SystemStatus

Method
__construct public
Method
get_page_title public
Method
get_capability public
Method
display public
Class

NF_Admin_Metaboxes_AppendAForm

Method
__construct public
Method
append_form public
Method
save_post public
Method
render_metabox public
Class

NF_Admin_Metaboxes_Calculations

Method
__construct public
Method
render_metabox public
Method
registerReactMetabox protected
Register the React metabox for calculations
Return
void
Method
nfAddMetabox public
Add a metabox constructor to the react.js submissions page
Param
array $metaboxHandlers
Return
array
Class

CalculationsReact

Construct Calculations metabox for the React Submissions page
Class must have a public function handle that can receive the $extraValue and a NF submission. Output of handle method is a \NinjaForms\Includes\Entities\MetaboxOutputEntity with two properties: 'title' (string output of metabox title/header) 'labelValueCollection' – indexed array of label values Each label value array has three keys: 'label' – label of the output 'value' – value of that being output 'styling' – currently accepts 'alert' to add an 'alert' class for CSS styling

Method
handle public
Given submission '$extra' data and the complete submission, return array construct for metabox If nothing to output, then return null
If the '$extra' data contains all required information, then simply construct that as label/value/styling arrays.
If your output requires other information from the submission, use the $nfSub to extract the required information.
Note that in this example, we want additional information from the submission for output so we disregard the $extraValue and work directly with the $nfSub to extract the information.
Param
mixed $extraValue
Param
NF_Database_Models_Submission $nfSub
Return
\NinjaForms\Includes\Entities\MetaboxOutputEntity|null
Static Method
extractResponses protected
Method
isDebugSet protected
Determine/return if calc debug is set Checks for string `&calcs_debug` in URI
Return
boolean
Class

NF_Admin_Metaboxes_Example

Method
__construct public
Method
render_metabox public
Class

NF_Admin_Notices

NF_Notices Class
Can be simply used be adding another line into the nf_admin_notices() function under notices.php
Can be extended to create more advanced notices to include triggered events

Since
2.9

Static Method
instance public
Method
__construct public
Method
nf_admin_notice public
Method
admin_notice public
Method
anti_notice_spam public
Method
admin_notice_ignore public
Method
admin_notice_temp_ignore public
Method
admin_notice_pages_blacklist public
Method
admin_notice_pages public
Method
required_fields public
Method
special_parameters public
Class

NF_Admin_Processes_ChunkPublish

Class NF_Abstracts_Batch_Process

Method
__construct public
Constructor
Method
process public
Function to loop over the batch.
Return
JSON Str last_response = success/failure Bool batch_complete = true/false Int requesting = x
Method
startup public
Function to run any setup steps necessary to begin processing.
Method
cleanup public
Function to cleanup any lingering temporary elements of a batch process after completion.
Method
get_chunk public
Function to get our chunk data from the chunks table.
Param
$slug (string) The name of the option in the db.
Return
string or FALSE
Method
add_chunk public
Function to replace update_option.
Param
$slug (string) The name of the option in the db.
Param
$content (string) The data to be stored in the option.
Method
remove_option public
Class

DeleteBatchFile

Deletes a file given file path

Method
delete public
Delete a file, given a filepath
Param
string $filePath
Return
string Result of the attempt to delete file
Class

NF_Admin_Processes_ExpiredSubmissionCleanup

Class NF_Abstracts_Batch_Process

Method
startup public
Function to run any setup steps necessary to begin processing.
Method
restart public
Function to run any setup steps necessary to begin processing for steps after the first.
Since
3.4.0
Return
void
Method
process public
Function to loop over the batch.
Since
3.4.0
Return
void
Method
cleanup public
Function to cleanup any lingering temporary elements of a batch process after completion.
Since
3.4.0
Return
void
Method
get_steps public
Get Steps Determines the amount of steps needed for the step processors.
Since
3.4.0
Return
int of the number of steps.
Method
get_expired_subs public
Get Expired Subs Gathers our expired subs puts them into an array and returns it.
Param
$form_id - ( int ) ID of the Form.
Param
$expiration_time - ( int ) number of days the submissions are set to expire in
Return
array of all the expired subs that were found.
Class

NF_Admin_Processes_ExportSubmissions

Class NF_Abstracts_Batch_Process

Method
__construct public
Override parent construct to pass form Ids
Param
array $forms
Method
startup public
Function to run any setup steps necessary to begin processing.
Method
restart public
Function to run any setup steps necessary to begin processing for steps after the first.
Since
3.5.0
Return
void
Method
process public
Function to loop over the batch.
Since
3.5.0
Return
void
Method
batch_complete public
Delete temp file before calling parent method @inheritDoc
Method
writeBatch public
Method
respond public
Method that encodes $this->response and sends the data to the front-end.
Since
3.4.0 @updated 3.4.11
Return
void
Method
cleanup public
Function to cleanup any lingering temporary elements of a batch process after completion.
Since
3.5.0
Return
void
Method
get_steps public
Get Steps Determines the amount of steps needed for the step processors.
Since
3.5.0
Return
int of the number of steps.
Method
constructFilepath protected
Get the filepath of our constructed csv.
Return
string
Method
flag public
Overwrites the default flag method to use user options instead of using the default options.
Since
3.5.0
Param
$flag (String) The flag to check
Param
$action (String) The type of interaction to be performed
Return
Mixed
Method
getFileUrl public
Get file URL of downloaded file in default directory
Method
getFilePath public
Get filepath of downloaded file in default directory
Class

NF_Admin_Processes_ImportForm

Class NF_Abstracts_Batch_Process

Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Return
void
Method
sanitize_field_settings public
Check field settings data before it is being cached
Since
3.6.10
Return
array of $data
Method
restart public
On processing steps after the first, we need to grab our data from our saved option.
Since
3.4.0
Return
void
Method
process public
Function to loop over the batch.
Since
3.4.0
Return
void
Method
cleanup public
Function to cleanup any lingering temporary elements of a batch process after completion.
Method
get_steps public
Method
insert_form public
Insert our form using $this->_db->insert by building an array of column => value pairs and %s, %d types.
Since
3.4.0
Return
void
Method
insert_form_meta public
Insert Form Meta.
Loop over our remaining form settings that we need to insert into meta. Add them to our "Values" string for insertion later.
Since
3.4.0
Return
void
Method
insert_actions public
Insert Actions and Action Meta.
Loop over actions for this form and insert actions and action meta.
Since
3.4.0
Return
void
Method
insert_fields public
If we have a Form ID set, then we've already inserted our Form, Form Meta, Actions, and Action Meta. All we have left to insert are fields.
Loop over our fields array and insert up to $this->fields_per_step. After we've inserted the field, unset it from our form array. Update our processing option with $this->form. Respond with the remaining steps.
Since
3.4.0
Return
void
Method
modifyFieldsetIds protected
Method
import_form_backwards_compatibility public
Method
import_merge_tags_backwards_compatibility public
Method
import_action_backwards_compatibility public
Method
import_field_backwards_compatibility public
Method
base64_decode private
Method to obfuscate the global base64_decode method.
Since
3.6.10.1
Param
String $data A base64 encoded string.
Return
String
Class

NF_Admin_Processes_ImportFormTemplate

Class NF_Abstracts_Batch_Process

Method
startup public
Function to run any setup steps necessary to begin processing.
Class

NF_Admin_SlimPromo

NF_Slim_Promo Class

Since
3.6

Method
__construct public

Method
isNFAdminPage public
Method
maybeShowSlimPromo public
Check if we should show the slim promo
Return
bool
Method
setTransient public
Set the ninja_forms_disable_slim_promo transient
Return
Void
Method
getNoticeHtml public
Echo the html for the notice
Return
Void
Class

NF_Admin_UserDataRequests

Method
__construct public
Class constructor
Method
plugin_register_exporters /** * Register exporter for Plugin user data. * * @param array $exporters * * @return array */
Method
plugin_register_erasers /** * Register eraser for Plugin user data. * * @param array $erasers * * @return array */
Method
plugin_user_data_exporter /** * Adds Ninja Forms Submission data to the default HTML export file that * WordPress creates on converted request * * @param $email_address * @param int $page * * @return array */
Method
plugin_user_data_eraser /** * Eraser for Plugin user data. This will completely erase all Ninja Form * submission data for the user when converted by the admin. * * @param $email_address * @param int $page * * @return array */
Method
get_related_subs private
Retrieve all submissions related(by author id or email address) to the given email address
Param
$email_address
Return
array
Method
get_subs_by_email private
Get submission ids where the submission has the give email address as data
Param
$email_address
Return
array
Method
delete_submissions private
Delete Submissions
Param
$subs
Method
anonymize_submissions private
This will (redact) personal data and anonymize submissions
Param
$subs
Method
anonymize_fields private
This will anonymize personally identifiable fields and anonymize submissions submitted by the user with the provided email address
Param
$sub
Param
$fields
Class

NF_Admin_UserDataRequests

Method
get_type public
Get field type
Return
string
Method
get_setting public
Get a field setting
Param
string $setting
Param
mixed $default
Return
mixed
Method
get_settings public
Get all field settings
Return
array
Method
update_setting public
Update a field setting
Param
string $key
Param
mixed $value
Method
update_settings public
Update all settings
Param
array $data
Return
Field
Method
delete public
Delete field
Return
void
Method
find public
Find
Param
string $parent_id
Param
array $where
Return
array
Method
get_object_settings public
Get object settings
Param
[type] $obj_array
Return
array
Method
save public
Save field
Return
void
Method
_insert_row public
Insert row
Param
array $data
Return
void
Method
cache public
Cache
Param
string $cache
Return
Field
Method
add_parent public
Add parent
Param
[type] $parent_id
Param
[type] $parent_type
Return
Field
Static Method
import public
Class

NF_Admin_UserDataRequests

Method
retrieveSubmissionMeta public
Retrieve a collection of submissions meta given filtering args
Param
array $args
Return
SingleSubmission[]
Method
retrieveSubmissionValues public
Populate with submission values a single submission in a collection
Submission collection may initially only contain submission meta to save time/memory. When called, this method retrieves the complete submission values for the provided SingleSubmision
Param
SingleSubmission $singleSubmission
Return
SingleSubmission
Method
retrieveSingleSubmission public
Retrieve a single submission with values
Absent a previously filtered collection of single submissions within the aggregate, request a single submission, fully populate it, and return.
Param
SingleSubmission $singleSubmission
Return
SingleSubmission
Method
deleteSubmission public
Delete a submission from the data source
Param
SingleSubmission $singleSubmission
Return
SubmissionDataSource
Method
restoreSubmission public
Restore a submission from the data source
Param
SingleSubmission $singleSubmission
Return
SubmissionDataSource
Method
updateSubmission public
Update a submission from the data source
Param
SingleSubmission $singleSubmission
Return
SubmissionDataSource
Method
getDataSource public
Return the dataSource id
Identifies the implementing class, enabling retrieval of submission specifics by calling the implementing class
Return
string
Class

NF_Admin_UserDataRequests

Method
getSlug public
Return an identifying slug for the handler
Return
string
Method
getLabel public
Return a label for the handler
Return
string
Method
getHandlerClassName public
Return class name of SubmissionHandler
Return
string
Method
handle public
Perform action on a single submission
Param
SingleSubmission $singleSubmission
Return
void
Method
getDownload public
Returns downloadable
Return
string
Class

CalderaSubmissionDataSource

Retrieves a single Caldera Forms submission by its entry id

Method
retrieveSubmissionMeta public
@inheritDoc
Method
retrieveSingleSubmission public
@inheritDoc
Method
applySearchCriterion protected
Apply search string filter to submission collection
Runs a WP Query to search for all post Ids with both a form Id from the submission filter and also a search string in any meta value of the same form. It then filters the submission collection to only those submissions that meet these additional requirements.
Return
void
Method
lookupCfFormIdByNfFormId protected
Adds CF lookup for given NF form id
If given NF id lookup is not set, checks to see if there is a corresponding CF form. If not, the value is set to `null` so that the instance knows that the form id has been checked.
Param
string $nfFormId
Return
void
Method
retrieveSubmissionValues public
@inheritDoc
Method
deleteSubmission public
@inheritDoc
Method
restoreSubmission public
@inheritDoc
Method
updateSubmission public
@inheritDoc
Method
retrieveSubmissionMetaByCfFormId protected
Retrieve submissions for a given CF form Id
Return
void
Method
includeByDateFilter protected
Boolean to include as per date filter true=>include, false=>omit
Return
boolean
Method
getDataSource public
@inheritDoc
Class

CptSubmissionDataSource

Retrieves a CPT Ninja Forms submission by its form id CPT indicates NF submissions stored as custom post type

Method
retrieveSubmissionMeta public
@inheritDoc
Method
retrieveSingleSubmission public
@inheritDoc
Method
retrieveSubmissionValues public
@inheritDoc
Method
deleteSubmission public
@inheritDoc
Method
restoreSubmission public
@inheritDoc
Method
updateSubmission public
@inheritDoc
Method
getNfSub protected
Get the NF_Submission for a SingleSubmission entity
Method
fullyPopulateSingleSubmission protected
Populate submission values, extra values, handlers
Param
SingleSubmission $singleSubmission
Param
NF_Database_Models_Submission $nfSub
Return
SingleSubmission
Method
populateSubmissionValues protected
Populate a single submissin with submitted values
Param
SingleSubmission $singleSubmission
Param
NF_Database_Models_Submission $nfSub
Return
SingleSubmission
Method
getExtraValueHandlers protected
Provide a filtered list of extra value keys storing extra data Non-core actions can filter the list to provide their keys for retrieval
Return
array
Method
retrieveExtraValues protected
Retrieve extraValues as constructed into MetaboxOutputEntities
Param
NF_Database_Models_Submission $nfSub
Param
array $extraValueHandlers
Return
array
Method
applySearchCriterion protected
Apply search string filter to submission collection
Runs a WP Query to search for all post Ids with both a form Id from the submission filter and also a search string in any meta value of the same form. It then filters the submission collection to only those submissions that meet these additional requirements.
Return
void
Method
retrieveSubmissionMetaByNfFormId protected
Retrieve submissions Ids for a given NF form Id
User Id is conditionally added if submission filter's property is explicityly set (-1 is default value, indicating that no filtering on User Id).
WPDB query args is changed from individual args to being passed as array; this makes for cleaner structure when sequence of arguments is variable.
Return
void
Method
includeByDateFilter protected
Boolean to include as per date filter true=>include, false=>omit
Return
boolean
Method
getDataSource public
@inheritDoc
Class

NF_Database_FieldsController

Method
__construct public
Method
run public
Method
get_updated_fields_data public
Method
parse_fields private
Method
parse_field_meta private
Method
get_existing_meta private
Method
update_new_field_ids private
Method
check_update_new_repeater_field_ids private
Method
get_new_field_ids public
Method
insert_field private
Method
get_insert_fields_query public
Method
update_field private
Method
get_update_fields_query public
Method
insert_field_meta private
Method
run_insert_field_meta_query public
Method
update_field_meta private
Method
run_update_field_meta_query public
Class

NF_Database_FormsController

Method
__construct public
Method
setFormsData public
Method
getFormsData public
Class

NF_Database_Logger

Method
log public
Logs with an arbitrary level.
Param
mixed $level
Param
string $message
Param
array $context
Return
null
Method
get_current public
Get current logs for the request lifecycle
Param
string $level
Return
array
Method
interpolate protected
Interpolates context values into the message placeholders.
Param
$message
Param
array $context
Return
string
Class

NF_Database_Migrations

Method
__construct public
Constructor method for the NF_Database_Migrations class.
Since
3.0.0 @updated 3.3.8
Method
migrate public
Function to run each migration on the stack.
Since
3.0.0
Method
do_upgrade public
Function to run any required database upgrades.
Param
$callback (String) The method this upgrade will call from individual migration files.
Since
3.4.0
Method
nuke public
This function drops ninja forms tables and options
Param
$areYouSure (Boolean)
Param
$areYouReallySure (Boolean)
Param
$nuke_multisite (Boolean)
Since
2.9.34 @updated 3.3.16
Method
_nuke private
Function to handle the actual deletion of tables and caches.
Since
3.1.0
Method
nuke_settings public
Function to nuke our 3.0 settings.
Param
$areYouSure (Boolean)
Param
$areYouReallySure (Boolean)
Since
3.1.0
Method
_nuke_settings private
Function to handle the actual deletion of our 3.0 settings.
Since
3.1.0
Method
nuke_deprecated public
Function to nuke our 2.9 database tables.
Param
$areYouSure (Boolean)
Param
$areYouReallySure (Boolean)
Since
3.1.0
Method
_nuke_deprecated private
Function to handle the actual deletion of deprecated tables and options.
Since
3.1.0
Class

NF_Database_Migrations_ActionMeta

Method
__construct public
Constructor method for the NF_Database_Migrations_ActionMeta class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_actions public
Function to be run as part of our CacheCollateActions required update.
Since
3.3.12 @updated 3.4.0
Class

NF_Database_Migrations_Actions

Method
__construct public
Constructor method for the NF_Database_Migrations_Actions class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_actions public
Function to be run as part of our CacheCollateActions required update.
Since
3.3.12 @updated 3.4.0
Class

NF_Database_Migrations_Chunks

Method
__construct public
Constructor function for the chunks table migration.
Method
run public
Function to define the chunks table.
Class

NF_Database_Migrations_FieldMeta

Method
__construct public
Constructor method for the NF_Database_Migrations_FieldMeta class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_fields public
Function to run our stage three upgrades.
Since
3.3.12 @updated 3.4.0
Class

NF_Database_Migrations_Fields

Method
__construct public
Constructor method for the NF_Database_Migrations_Fields class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_fields public
Function to run our stage two upgrades.
Since
3.3.12 @updated 3.4.0
Class

NF_Database_Migrations_FormMeta

Method
__construct public
Constructor method for the NF_Database_Migrations_Actions class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_forms public
Function to be run as part of our CacheCollateForms required update.
Since
3.4.0
Class

NF_Database_Migrations_Forms

Method
__construct public
Constructor method for the NF_Database_Migrations_Actions class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_forms public
Function to be run as part of our CacheCollateForms required update.
Since
3.4.0
Class

NF_Database_Migrations_ObjectMeta

Method
__construct public
Constructor method for the NF_Database_Migrations_ObjectMeta class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_objects public
Function to ensure proper collation of the object_meta table.
Since
3.4.0
Class

NF_Database_Migrations_Objects

Method
__construct public
Constructor method for the NF_Database_Migrations_Objects class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0 @updated 3.4.0
Method
cache_collate_objects public
Function to ensure proper collation of the objects table.
Since
3.4.0
Class

NF_Database_Migrations_Relationships

Method
__construct public
Constructor method for the NF_Database_Migrations_Relationships class.
Since
3.0.0
Method
run public
Function to run our initial migration.
Since
3.0.0
Method
cache_collate_objects public
Function to ensure proper collation of the relationships table.
Since
3.4.0
Class

NF_Database_Migrations_Settings

Method
__construct public
Method
run public
Class

NF_Database_Migrations_Upgrades

Method
__construct public
Constructor method for the NF_Database_Migrations_Fields class.
Since
3.3.11
Method
run public
Function to run our initial migration.
Since
3.3.11 @updated 3.4.0
Method
cache_collate_fields public
Function to define our maintenance column.
Since
3.4.0
Class

NF_Database_MockData

Method
__construct public
Method
saved_fields public
Method
form_blank_form public
Method
form_contact_form_1 public
Method
form_contact_form_2 public
Method
form_kitchen_sink public
Method
form_bathroom_sink public
Method
form_long_form public
Method
form_email_submission public
Method
form_product_1 public
Method
form_product_2 public
Method
form_product_3 public
Method
form_calc_form public
Method
_migrate private
Class

NF_Database_Models_Action

Method
__construct public
Class

NF_Database_Models_Field

Method
__construct public
Method
delete public
Delete
Delete the object, its children, and its relationships.
Also deletes data associated with field
Return
bool
Static Method
import public
Class

NF_Database_Models_Form

Method
__construct public
Method
delete public
Method
delete_submissions private
Method
prepare_in private
Static Method
get_next_sub_seq public
Static Method
import public
Static Method
import_admin_notice public
Static Method
duplicate public
Static Method
get_sql_queries private
Static Method
export public
Method
import_form_backwards_compatibility public
Method
import_merge_tags_backwards_compatibility public
Method
import_action_backwards_compatibility public
Method
import_field_backwards_compatibility public
Class

NF_Database_Models_Object

Method
__construct public
Method
save public
Class

NF_Database_Models_Submission

Method
__construct public
Method
get_id public
Get Submission ID
Return
int
Method
get_status public
Method
get_user public
Method
get_form_id public
Method
get_form_title public
Method
get_seq_num public
Method
get_sub_date public
Method
get_mod_date public
Method
get_field_value public
Get Field Value
Returns a single submission value by field ID or field key.
Param
int|string $field_ref
Return
string
Method
get_field_value_for_fieldset_child protected
Get field values of a single child field within a fieldset repeater field get_field_value(), which calls this method, is expected to return a string. Fieldset Repeater child fields have a unique field reference, differentiated by their delimiter that ensures that the requesting external caller knows that it is requesting a fieldset repeater field. This this method returns a serialized string of values, honoring the get_field_value() method with the expectation that the external caller will unserialize this value.
Param
int $fieldsetId
Param
int $childFieldId
Method
get_field_values public
Get Field Values
Return
array|mixed
Method
update_field_value public
Update Field Value
Param
$field_ref
Param
$value
Return
$this
Method
update_field_values public
Update Field Values
Param
$data
Return
$this
Method
get_extra_value public
Method
get_extra_values public
Method
update_extra_value public
Method
update_extra_values public
Method
find public
Find Submissions
Param
$form_id
Param
array $where
Return
array
Method
delete public
Delete Submission
Method
trash public
Trash Submission
Method
save public
Save Submission
Return
$this|NF_Database_Models_Submission|void
Static Method
export public
Method
_save_field_value protected
Save Field Value
Param
$field_id
Param
$value
Return
$this
Method
_save_field_values protected
Save Field Values
Return
$this|void
Method
_save_extra_values protected
Method
format_meta_query protected
Format Meta Query
Param
array $where
Return
array
Method
get_field_id_by_key protected
Get Field ID By Key
Param
$field_key
Return
mixed
Static Method
sort_fields public
Class

NF_Database_PublishProcessing

Method
task protected
Class

NF_Database_SubmissionExpirationCron

Method
__construct public
NF_Database_SubmissionExpirationCron constructor. Sets up our our submission expiration CRON job.
Method
expired_submission_cron public
Expired Submission Cron Checks our subs to see if any are expired and sends them to be deleted if there are any that need to be removed.
Param
$options
Return
void
Method
get_expired_subs public
Get Expired Subs Gathers our expired subs puts them into an array and returns it.
Param
$form_id - ( int ) ID of the Form.
Param
$expiration_time - ( int ) number of days the submissions are set to expire in
Return
array of all the expired subs that were found.
Method
delete_expired_subs public
Delete Expired Subs Helper method that removes our expired subs.
Param
$expired_subs - array of sub ids that need to be deleted.
Param
$cap - The cap of the amount of subs you want deleted at 1 time.
Return
void
Class

NF_Dispatcher

Method
should_we_send public
Returns bool true if we are opted-in or have a premium add-on. If a premium add-on is installed, then users have opted into tracked via our terms and conditions. If no premium add-ons are installed, check to see if the user has opted in or out of anonymous usage tracking.
Since
version
Return
bool
Method
update_environment_vars public
Package up our environment variables and send those to our API endpoint.
Since
3.2
Return
void @updated 3.3.17
Method
form_data public
Package up our form data and send it to our API endpoint.
Since
3.2
Return
void
Method
send public
Sends a campaign slug and data to our API endpoint. Checks to ensure that the user has 1) opted into tracking or 2) they have a premium add-on installed.
Since
3.2
Param
string $slug Campaign slug
Param
array $data Array of data being sent. Should NOT already be a JSON string.
Return
void
Class

NF_Display_Page

Method
__construct public
Method
get_content public
Return
string HTML
Method
get_title abstract
Method
get_guid abstract
Method
modify_wp_query public
Modifies the WP Query to our liking
Return
void
Class

NF_Display_PageEmbedForm

Method
__construct public
Method
get_content public
Return
string HTML
Method
get_title public
Return
string
Method
get_guid public
Return
string
Class

NF_Display_PagePublicLink

Method
__construct public
Method
get_content public
Return
string HTML
Method
get_title public
Return
string
Method
get_guid public
Return
string
Class

NF_Display_Preview

Method
__construct public
Method
pre_get_posts public
Method
the_title /** * @return string */
Method
the_content /** * @return string */
Method
template_include /** * @return string */
Method
post_thumbnail_html
Class

NF_Display_Render

Static Method
localize public
Static Method
checkRepeaterChildType public
Static Method
checkRepeaterChildSetting public
Static Method
localize_preview public
Static Method
enqueue_scripts public
Static Method
enqueue_styles_display public
Static Method
load_template public
Static Method
output_templates public
Static Method
is_template_loaded protected
Class

NF_Display_Shortcodes

Method
__construct public
Method
display_form_preview public
Method
display_form_front_end public
Method
display_no_id private
TODO: Extract output to template files.
Return
string
Class

NF_EmailTelemetry

Measure email throughput to determine the potential scale of email related issues. @TODO: Remove this entire file at a later date.

Method
__construct public
Constructor which takes in a paremeter to tell the class whether the site is opted in for telemetry or not
Param
$opted_in
Since
3.3.21
Method
setup public
@hook phpmailer_init The last action before the email is sent.
Method
update_metrics public
@NOTE No need to return $phpmailer as it is passed in by reference (aka Output Parameter).
Method
maybe_schedule_push public
Method
push_telemetry public
Class

MetaboxOutputEntity

Entity holding title and label/value/styling output for metaboxes

Static Method
fromArray public
Method
toArray public
Constructs an array representation
Method
validateLabelValueCollection protected
Method
getTitle public
Get metabox title
Return
string
Method
setTitle public
Set metabox title
Param
string $title Metabox title
Return
MetaboxOutputEntity
Method
getLabelValueCollection public
Get the value of labelValueCollection
Method
setLabelValueCollection public
Set the value of labelValueCollection
Return
MetaboxOutputEntity
Class

SimpleEntity

Simple entity abstract upon which all entities are built
Entities are classes that pass well defined data honoring contracts. Single parameters and arrays, when passed into an entity, can be relied upon to provide the data defined by the entity, even if the original data did not fully define values.

Method
toArray public
Constructs an array representation
Method
jsonSerialize public
Sets data for json_encode
Return
void
Method
__get public
Magic method getter for properties
Param
string $name
Return
void
Method
__set public
Magic method setter for properties
Usually does not support setting undefined properties, but this class is enabling that, although it is kept as a separate command in case it must be modified. This is because field definitions can have an undetermined collection of settings and this class will enable setting of all those values, while maintaining the ability to define sets and gets that filter values for proper types.
Param
string $name
Param
mixed $value
Return
SimpleEntity
Class

SingleSubmission

Entity defining Single Submission data structure

Method
getSubmissionFieldValue public
Get a field value by the field slug
Param
string $fieldSlug
Return
void
Static Method
fromArray public
Method
toArray public
Constructs an array representation
Method
getSubmissionRecordId public
Get submission Id
Return
string
Method
setSubmissionId public
Set submission Id
Param
string $submissionRecordId Submission Id
Return
self
Method
getTimestamp public
Get submission time stamp
Return
string
Method
setTimestamp public
Set submission time stamp
Force standard format
Param
string $timestamp Submission time stamp
Return
self
Method
getFormId public
Get form Id to which the submission belongs
Return
string
Method
setFormId public
Set form Id to which the submission belongs
Param
string $formId Form Id to which the submission belongs
Return
self
Method
getDataSource public
Get dataSource Typical locations include NF post, CF table
Return
string
Method
setSubmissionFieldCollection public
Set submitted values as collection of SubmissionField entities
Param
array $submissionFieldCollection SubmissionField entities keyed on field slug
Return
SingleSubmission
Method
getSubmissionFieldCollection public
Get submitted values as collection of SubmissionField entities
Return
array
Method
getFieldSlugs public
Return array of field slugs for submissionFieldCollection
Return
array
Method
getExtraValues public
Get extra data values stored with submission
Return
array
Method
setExtraValues public
Set extra data values stored with submission
Param
array $extraValues Extra data values stored with submission
Return
SingleSubmission
Method
getSubmissionHandlers public
Get associative array (string) of classes providing additional submission handling
[slug]=>(string)ClassName implements SubmissionHandler
Return
array
Method
setSubmissionHandlers public
Set associative array (string) of classes providing additional submission handling
Param
array $submissionHandlers Associative array (string) of classes providing additional submission handling
Return
SingleSubmission
Method
getStatus public
Get submission status
Return
array
Method
setStatus public
Set submission status
Param
array $status Submission status
Return
SingleSubmission
Class

SubmissionExtraHandlerResponse

Defines data passed from SubmissionHandlers to submissions page NF>=3.6.1

Static Method
fromArray public
Method
getResponseType public
Get response type
Return
string
Method
setResponseType public
Set response type
Param
string $responseType Response type
Return
SubmissionExtraHandlerResponse
Method
getDownload public
Get download
Return
string
Method
setDownload public
Set download
Param
string $download Download
Return
SubmissionExtraHandlerResponse
Method
getBlobType public
Get blob type
Return
string
Method
setBlobType public
Set blob type
Param
string $blobType Blob type
Return
SubmissionExtraHandlerResponse
Method
getResult public
Get result
Return
string
Method
setResult public
Set result
Param
string $result Result
Return
SubmissionExtraHandlerResponse
Method
getFilename public
Get filename of the download, including file extension
Return
string
Method
setFilename public
Set filename of the download, including file extension
Param
string $filename Filename of the download, including file extension
Return
SubmissionExtraHandlerResponse
Class

SubmissionField

Entity defining a submission field, including value if present Submission field is the submission value for a single field within a form's field collection

Static Method
fromArray public
Method
getId public
Get field Id
Return
string
Method
setId public
Set field database record id
Param
string $id Field Id
Return
SubmissionField
Method
getSlug public
Get field slug
Return
string
Method
setSlug public
Set field slug
Param
string $slug Field slug
Return
SubmissionField
Method
getLabel public
Get field label
Return
string
Method
setLabel public
Set field label
Param
string $label Field label
Return
SubmissionField
Method
getAdminLabel public
Get amdin label
Return
string
Method
setAdminLabel public
Set amdin label
Param
string $adminLabel Admin label
Return
SubmissionField
Method
getType public
Get field type
Return
string
Method
setType public
Set field type
Param
string $type Field type
Return
SubmissionField
Method
getValue public
Get submission Value
Return
mixed
Method
setValue public
Set submission Value
Param
mixed $value Submission Value
Return
self
Method
getOptions public
Get indexed collection of option label/value/calc
Return
array
Method
setOptions public
Set indexed collection of option label/value/calc
Param
array $options Indexed collection of option label/value/calc
Return
SubmissionField
Method
getFieldsetRepeaterFields public
Get Indexed collection of fieldset repeater fields within parent field
Return
array
Method
setFieldsetRepeaterFields public
Set Indexed collection of fieldset repeater fields within parent field
Param
SubmissionField[] $fieldsetRepeater Indexed collection of fieldset repeater fields within parent field
Return
SubmissionField
Method
getOriginal public
Get original field settings as stored in NF DB tables
Return
array
Method
setOriginal public
Set original source field settings (from NF DB tables)
Param
array $original Original source is from NF DB tables
Return
SubmissionField
Class

SubmissionFilter

Define parameters used to filter submissions

Static Method
fromArray public
Method
getNfFormIds public
Get indexed array of string NF form Ids
Return
array
Method
setNfFormIds public
Set indexed array of string NF form Ids
Param
array $nfFormIds Indexed array of string NF form Ids
Return
self
Method
getStartDate public
Get start date for filter submissions
Return
int
Method
setStartDate public
Set start date for filter submissions
Param
int $startDate Start date for filter submissions
Return
SubmissionFilter
Method
getEndDate public
Get end date for filter submissions
Return
int
Method
setEndDate public
Set end date for filter submissions
Param
int $endDate End date for filter submissions
Return
SubmissionFilter
Method
getSearchString public
Get search string
Return
string
Method
setSearchString public
Set search string
Param
string $searchString Search string
Return
SubmissionFilter
Method
getStatus public
Get filter submissions by status
Return
array
Method
setStatus public
Set filter submissions by status
Param
array $status Filter submissions by status
Return
SubmissionFilter
Method
getUserId public
Get user Id for filter submissions
Return
int
Method
setUserId public
Set user Id for filter submissions
Param
int $userId User Id for filter submissions
Return
SubmissionFilter
Method
getSubmissionsIDs public
Get included submission IDs
Return
array
Method
setSubmissionsIDs public
Set submissions IDs
Param
array $submissionsIDs of Submissions IDs to include
Return
SubmissionFilter
Class

NF_Exports_BulkSubmissionEmail

Email exported submissions as an attachment

Method
__construct public
Instantiated with BulkSubmissionEmailParameters and string CSV content
Param
BulkSubmissionEmailParameters $bulkSubmissionEmailParameters
Param
array $attachmentFilenames Array of string filenames ready for attachment
Method
setDefaults protected
Set default properties
Method
handle public
Generate email, attach content, submit email
Method
sanitizeAddressFields protected
Put every email address through a sanitizing method
Method
sanitizeEmail protected
Sanitize a given email address
Param
string $incoming
Return
string
Method
getHeaders private
Construct and return header array Note that variable headers are run through sanitize_header method
Return
array
Method
sanitize_header protected
Sanitize header to prevent attacker is able to create new headers using charecter encoding.
Param
string $header
Return
void
Method
getAttachments private
Construct and return attachments
Return
array
Method
constructRecipientsHeader private
Format Reply-To, CC, and BCC address header
Return
array
Method
formatAddress private
Format address for header
Param
string $type
Param
string $email
Param
string $name
Return
string
Class

NF_Exports_BulkSubmissionEmailParameters

Entity to pass bulk export submission parameters Provides a guarantee that any requested or required parameters have a known default value and type

Method
getFormat public
Get output format
Return
string
Method
getFormId public
Get form Id
Return
int
Method
getEmailTo public
Get Email `To` addresses string - comma delimited
Return
string
Method
getEmailFrom public
Get Email `From` address
Return
string
Method
getEmailReplyTo public
Get Email `Reply To` address
Return
string
Method
getEmailSubject public
Get Email `Subject`
Return
string
Method
setEmailTo public
Set Email `To` addresses - comma delimited
Param
string $emailTo
Return
$this
Method
setEmailFrom public
Set Email `From` address
Param
string $emailFrom
Return
$this
Method
setEmailReplyTo public
Set Email `Reply To` address
Param
string $emailReplyTo
Return
$this
Method
setEmailSubject public
Set Email `Subject` address
Param
string $emailSubject
Return
$this
Method
setFormId public
Set form Id
Param
int $formId
Return
NF_Database_Models_SubmissionExportSettingsParameters
Method
setFormat public
Set output format
Param
string $format
Return
NF_Database_Models_SubmissionExportSettingsParameters
Method
toArray public
Convert instance to associative array
Return
array
Static Method
fromArray public
Method
__get public
Magic method to return property
Param
string $name
Return
mixed
Method
__set public
Param
string $name
Param
mixed $value
Return
NF_Database_Models_SubmissionCollectionInterfaceParameters
Class

NF_Exports_BulkSubmissionEmailParameters

Method
getFieldValue public
Get Field Value
Return a single submission value by field ID or field key.
Param
int|string $field_ref
Return
string
Method
getFieldValues public
Get all submission field values for a single, pre-defined submission
Return
array|mixed
Method
getId public
Return the submission Id
Return
int
Method
getSeqNum public
Return the Sequence Number of a predefined submission Id
Method
getSubmissionDate public
Return the submission date for predefined submission Id
Param
string $format Optional date format
Method
filterFieldValues public
Filter field values to return only provided keys NOTE: filter is performed on array KEYS of incoming parameter. This enables use of `field labels` array generated at the collection level, which is keyed off the same field keys as the submission for perfect matching of array columns.
Param
array $fieldKeys Array keyed on field keys with optional value
Return
array
Method
setExportDatetime public
Set timestamp of export
Param
int $unixTimestamp
Method
wasExported public
Return true if submission has been exported
Return
bool
Method
isUnread public
Return bool `true` if submission is unread
Return
bool
Class

NF_Exports_BulkSubmissionEmailParameters

Method
getFormId public
Return the form Id
Return
int
Method
getFormTitle public
Return the form title
Return
string
Method
getCounts public
Return count of submissions, exported, and unread
Method
filterByParameters public
Set all parameters using NF_Database_Models_SubmissionCollectionInterfaceParameters Using the object ensures all properties are set, with known defaults; this enables the requesting class to set only values that concerns it without needing to set any other value or default. The Submission Collection class knows that all values have valid parameters and can immediately run the filter.
Param
SubmissionCollectionFilterParameters $params
Method
setDateParameters public
Set start and end dates to filter submissions
Param
int|null $startDate Starting date
Param
int|null $endDate Ending date
Method
setIsUnreadParameter public
Set parameter to filter submissions by `isUnread` = true or false
Param
bool $isUnread
Method
setPreviouslyExportedParameter public
Set parameter to filter submissions by `previouslyExported` = true or false
Param
bool $previouslyExported
Method
setMaxReturnCount public
Set max number of submissions to return in a request
Param
int $maxReturnCount
Method
filterSubmissions public
Filter collection of submissions based on previously set parameters
Return
array
Method
getSubmissions public
Return submission collection array
Return
SingleSubmissionInterface[]
Method
getSubmissionIds public
Return array of submission Ids in the collection
Method
getLabels public
Return array of field labels keyed on field keys If hiddenFieldTypes array is set, labels filtered to hide those types
Param
bool $useAdminLabels Optionally use admin_labels
Return
array
Method
getFieldTypes public
Return array of field types keyed on field keys
Return
array
Method
getFieldIds public
Return array of field Ids keyed on field keys
Method
setHiddenFieldTypes public
Set field types to be removed before output Provided as indexed array of NF field types
Param
array $hidden
Class

NF_Exports_BulkSubmissionEmailParameters

Method
handle public
Generate CSV output and return
Return
string
Method
reverseSubmissionOrder public
Provide submissionCollection indices in reverse order CSV output sorts earliest to current; submissionAggregate returns in reverse order
Return
void
Method
constructRow public
Construct a CSV row for record at given submission aggregate's index
Param
mixed $aggregatedKey
Return
array
Method
setSubmissionCollection public
Set submission collection used in generating the CSV
Param
SubmissionCollectionInterface $submissionCollection
Method
setUseAdminLabels public
Set boolean useAdminLabels
Param
bool $useAdminLabels
Return
NF_Exports_Interfaces_SubmissionCsvExportInterface
Method
getLabels public
Return array of labels
Return
array
Method
setDateFormat public
Set date format
Param
string $dateFormat
Class

NF_Exports_SingleSubmissionCPT

Method
__construct public
Param
string|int $id
Method
getId public
Get Submission ID
Return
int
Method
getSeqNum public
@inheritDoc
Return
int
Method
getSubmissionDate public
@inheritDoc
Param
string $format
Return
string
Method
filterFieldValues public
Filter field values to return only provided keys NOTE: filter is performed on array KEYS of incoming parameter. This enables use of a previously generated `field labels` array, which is keyed off the same field keys as the submission for perfect matching of array columns.
Param
array $fieldKeys Array keyed on field keys with optional value
Return
array
Method
getFieldValue public
Get Field Value
Returns a single submission value by field ID or field key.
Param
int|string $field_ref
Return
string
Method
getFieldValues public
Get Field Values - from existing NF_Database_Models_Submission Returns all post meta
Return
array|mixed
Method
getExtraValue public
Method
getFieldIdByKey protected
Get Field ID By Key
Param
$field_key
Return
mixed
Method
setExportDatetime public
Set timestamp of export
Param
int $unixTimestamp
Return
NF_Database_Models_SingleSubmissionInterface
Method
wasExported public
Return bool true if submission has exported datetime set
Return
bool
Method
isUnread public
Return bool `is submission unread?` If not set, default is false (submission has been read). Thus new submissions must be explicitly set as unread. Without this, all preexisting submissions will be marked as unread and can confuse existing installations.
Return
boolean
Method
markAsRead public
Mark the submission as `unread` via post_meta
Method
markAsUnread public
Mark the submission as `read` via post_meta
Class

NF_Exports_SubmissionCollectionCPT

Method
__construct public
Construct submission collection with provided form Id
Param
string|int $form_id
Method
getFormId public
Return form Id
Return
int
Method
getFormTitle public
Return form title
Return
string
Method
setDateParameters public
Set start and end dates to filter submissions
Param
int|null $startDate Starting date
Param
int|null $endDate Ending date
Method
setIsUnreadParameter public
Set parameter to filter submissions by `isUnread` = true or false
Param
bool $isUnread
Method
setPreviouslyExportedParameter public
Set parameter to filter submissions by `previouslyExported` = true or false
Param
bool $previouslyExported
Method
setMaxReturnCount public
Set max number of submissions to return in a request
Param
int $maxReturnCount
Method
filterByParameters public
Set all parameters using NF_Database_Models_SubmissionCollectionInterfaceParameters Using the object ensures all properties are set, with known defaults; this enables the requesting class to set only values that concerns it without needing to set any other value or default. The Submission Collection class knows that all values have valid paramters and can immediately run the filter.
Param
NF_Database_Models_SubmissionCollectionInterfaceParameters $params
Return
SubmissionCollectionInterface
Method
filterSubmissions public
Filter collection of submissions based on previously set parameters
Return
array
Method
getCounts public
Return count of submissions, exported, and unread
Method
addMetaFilters protected
Add meta query filters
Param
array $filter
Return
array
Method
constructDefaultFilter protected
Construct/return default filter args array for WP's get_post
Return
array
Method
constructIsUnreadQuery protected
Construct meta query for isUnread; empty array if null param
Return
array
Method
constructPreviouslyExportedQuery protected
Construct meta query for previously exported; empty array if null parameter
Param
bool|null $previouslyExported
Return
array
Method
constructDateQuery protected
Construct meta query for start/end dates; empty array if null parameters
Return
array
Method
getSubmissions public
Return submission collection array
Return
\NF_Database_Models_SingleSubmissionInterface[]
Method
getSubmissionIds public
Return array of submission Ids in the collection Generated at time of request to ensure it is up to date after last query / construction
Return
array
Method
getLabels public
Return array of field labels keyed on field key If hiddenFieldTypes array is set, labels filtered to hide those types
Param
bool|null $useAdminLabels
Return
array
Method
getFieldTypes public
Return array of field types keyed on field key
Return
array
Method
getFieldIds public
Return array of field Ids keyed on field keys
Method
getFields protected
Get all fields for the instantiated form Id Stored as $this->fields for additional use w/o calling DB
Method
formatDate protected
Convert Unix date stamp to Wordpress post date format
Param
int|null $incoming
Return
string
Method
setHiddenFieldTypes public
Set field types to be removed before output Provided as indexed array of NF field types
Param
array $hidden
Class

NF_Exports_SubmissionCollectionFilterParameters

Entity of parameters to filter a submission collection Provides a guarantee that any requested or required parameters have a known default value and type. The default value for all unset parameters is `null` to differentiate an unset or purposefully null value from a boolean false or an empty array. This tells the caller that the value is not to be used in a filter, which is different than filtering on false, or empty array.

Method
getStartDate public
Get start date
Return
int|null
Method
getEndDate public
Get end date
Return
int|null
Method
getIsUnread public
Get IsUnread? boolean
Return
bool|null
Method
getPreviouslyExported public
Get IsPreviouslyExported? boolean
Return
bool|null
Method
getMaxReturnCount public
Get MaxReturnCount
Return
int|null
Method
getUseAdminLabels public
Get UseAdminLabels? boolean
Return
bool|null
Method
getHiddenFieldTypes public
Get hidden field types array
Return
array
Method
setStartDate public
Set start date
Param
int|null $startDate
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
setEndDate public
Set end date
Param
int|null $endDate
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
setIsUnread public
Set IsUnread? boolean
Param
bool $isUnread
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
setPreviouslyExported public
Set PreviouslyExported? boolean
Param
boolean $previouslyExported
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
setMaxReturnCount public
Set Maximum return count
Param
int $maxReturnCount
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
setUseAdminLabels public
Set UseAdminLabels? boolean
Param
bool $useAdminLabels
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
setHiddenFieldTypes public
Set HiddenFieldTypes array
Param
array $hiddenFieldTypes
Return
NF_Exports_SubmissionCollectionFilterParameters
Method
toArray public
Convert instance to associative array
Return
array
Static Method
fromArray public
Method
__get public
Magic method to return property
Param
string $name
Return
mixed
Method
__set public
Param
string $name
Param
mixed $value
Return
NF_Exports_SubmissionCollectionFilterParameters
Class

NF_Exports_SubmissionCsvExport

Method
handle public
Generate CSV output and return
Return
string
Method
reverseSubmissionOrder public
@inheritDoc
Method
constructRow public
@inheritDoc
Method
prepareCsv protected
Construct string output from previously set params, mark submissions read
Return
string
Method
appendRows protected
Append each submission from the collection as a row
Method
constructSeqNumLookup protected
For NF CPT, construct lookup from index for SeqNum
Param
string $aggregatedKey
Param
SingleSubmission $singleSubmission
Return
void
Method
constructSubmissionRow protected
Construct a single row in the CSV from a submission
ToDo
Refactor to remove DB call for NF()->form()->field() on each iteration
Param
SingleSubmission $submission
Return
array
Method
formatTimestamp protected
Format timestamp for output
Param
string $timestamp
Return
string
Method
constructLabels protected
Construct labels array Indexed array of labels, which serves as the column headers
Method
getLabels public
Return labels for the CSV, including SeqNum and Date
Return
array
Method
getFieldLabelsBeforeFields protected
Return filtered array of labels preceding fields
Return
array
Method
setSubmissionCollection public
Set submission collection used in generating the CSV
ToDo
Investigate reason for commented out type declarations
Param
SubmissionCollectionInterface $submissionCollection
Return
SubmissionCsvExportInterface
Method
setSubmissionAggregateCsvExportAdapter public
Set SubmissionAggregateCsvExport Adapter used in generating the CSV
Param
SubmissionAggregateCsvExportAdapter $submissionAggregateCsvExportAdapter
Return
SubmissionCsvExportInterface
Method
setUseAdminLabels public
Set boolean useAdminLabels
Param
bool $useAdminLabels
Return
SubmissionCsvExportInterface
Method
setDateFormat public
Set date format
Param
string $dateFormat
Return
SubmissionCsvExportInterface
Class

NF_Exports_TempFileWriter

Writes temporary files for attachment and uploading

Method
__construct public
Construct with the content to be written
Param
string $content
Method
writeFiles public
Write files to temporary location
Return
NfScheduledSubmissionExports\Storage\TempFileWriter
Method
getFileInfo public
Returns array of temp filenames, first file name if single
Param
bool $single
Method
getAttachmentNames public
Method
constructFileInfo protected
Static Method
generateFileInfo public
Method
writeTempFile protected
Write contents to temporary file location
Method
renameFile protected
Rename temp file to permanent file name
Param
string $filename
Return
string
Method
dropAttachmentFiles public
Delete file from directory after email with attachment has been sent
Static Method
dropAttachmentFile public
Class

SubmissionAggregateFactory

Method
submissionAggregate public
Construct SubmissionAggregate class with data sources
Return
SubmissionAggregate
Method
SubmissionAggregateCsvExportAdapter public
Constructs SubmissionAggregateCsvExportAdapter with SubmissionAggregate
Return
SubmissionAggregateCsvExportAdapter
Method
makeCalderaDataSource public
Construct a Caldera submissions data source
Return
CalderaSubmissionDataSource
Method
makeCptSubmissionDataSource public
Construct a Ninja Forms CPT data source
Return
CptSubmissionDataSource
Method
cfTablesExist protected
Check that both CF entry and values tables exist
Return
boolean
Class

SubmissionFilterFactory

Standardize the instantiation of a SubmissionFilter object

Method
unfiltered public
Empty submission filter with default properties
Return
SubmissionFilter
Method
startEndDates public
SubmissionFilter with start and end dates
Param
integer $startDate Epoch date
Param
integer $endDate Epoch date
Return
SubmissionFilter
Method
loggedInUser public
Add logged in user to SubmissionFilter
If user is not logged in, value is set to -1 because all non-logged in user submissions are set to user ID = 0, which is not desired output
Return
SubmissionFilter
Method
maybeLimitByLoggedInUser public
Add userId to SubmissionFilter conditionally by WP filter
Override SubmissionFilter userId default value if an applied WP filter specifies it
Return
SubmissionFilter
Method
getUserId protected
Return logged in user's ID
Return
integer If user not logged in, return 0
Method
provideLimitByLoggedInUserFilter protected
Provide WP filter to add logged in user to SubmissionFilter
Default is to retrieve all submissions, so return FALSE. This applies a filter that enables external code to change default behaviour.
Return
boolean
Class

NF_Fields_Address

Class NF_Fields_Address

Method
__construct public
Class

NF_Fields_Address2

Class NF_Fields_Address2

Method
__construct public
Class

NF_Fields_Button

Class NF_Field_Button

Method
__construct public
Class

NF_Fields_Checkbox

Class NF_Fields_Checkbox

Method
__construct public
NF_Fields_Checkbox constructor.
Since
3.0
Method
admin_form_element public
Admin Form Element Display the checkbox on the edit submissions area.
Since
3.0
Param
$id Field ID.
Param
$value Field value.
Return
string HTML used for display of checkbox.
Method
custom_columns public
Custom Columns Creates what is displayed in the columns on the submissions page.
Since
3.0
nf_subs_export_pre_value
Param
$value checkbox value
Param
$field field model.
Return
$value string|void
Method
filter_merge_tag_value public
Filter Merge Tag Value This is what provides the merge tag with the fields value.
Since
3.0
Param
$value Field value
Param
$field field model
Return
string|void
Method
filter_merge_tag_value_calc public
Filter Merge Tag Value Calc Provides the calculation value when the merge tag is used.
Since
3.0
Param
$value checkbox value
Param
$field field model
Return
$field
Method
export_value public
Export Value Determines the value to send to submission export.
Since
3.0
Param
$value checkbox field value
Param
$field checkbox field model
Return
string|void
Class

NF_Fields_City

Class NF_Fields_City

Method
__construct public
Class

NF_Fields_Confirm

Class NF_Fields_Confirm

Method
__construct public
Method
hide_field_type
Method
validate public
Class

NF_Fields_CreditCard

Class NF_Fields_CreditCard

Method
__construct public
Class

NF_Fields_CreditCardCVC

Class NF_Fields_CreditCardCVC

Method
__construct public
Method
hide_field_type
Class

NF_Fields_CreditCardExpiration

Class NF_Fields_CreditCardExpiration

Method
__construct public
Method
hide_field_type
Class

NF_Fields_CreditCardFullName

Class NF_Fields_CreditCardFullName

Method
__construct public
Method
hide_field_type
Class

NF_Fields_CreditCardNumber

Class NF_Fields_CreditCardNumber

Method
__construct public
Method
hide_field_type
Class

NF_Fields_CreditCardZip

Class NF_Fields_CreditCardZip

Method
__construct public
Method
hide_field_type
Class

NF_Fields_Date

Class NF_Fields_Date

Method
__construct public
Method
process public
Method
get_format private
Method
localizeField public
Since
3.0
Param
array $field Array of field settings
Return
void
Method
custom_columns public
Method
filter_csv_value public
Method
admin_form_element public
Method
stringify_value private
Method
get_hours_options private
Method
get_minutes_options private
Method
filter_merge_tag_value public
Filter Merge Tag Value This is what provides the merge tag with the fields value.
Since
3.0
Param
$value Field value
Param
$field field model
Return
string|void
Class

NF_Fields_Email

Class NF_Fields_Email

Method
__construct public
Method
validate public
Method
filter_default_value public
Class

NF_Fields_FirstName

Class NF_Fields_FirstName

Method
__construct public
Method
filter_default_value public
Class

NF_Fields_HTML

Class NF_Fields_HTML

Method
__construct public
Method
hide_field_type
Class

NF_Fields_Hidden

Class NF_Fields_Hidden

Method
__construct public
Class

NF_Fields_LastName

Class NF_Fields_FirstName

Method
__construct public
Method
filter_default_value public
Class

NF_Fields_ListCheckbox

Class NF_Fields_CheckboxList

Method
__construct public
Method
admin_form_element public
Method
get_calc_value public
Class

NF_Fields_ListCountry

Class NF_Fields_CountryList

Method
__construct public
Method
custom_columns public
Method
filter_options public
Method
sort_options_by_label private
Method
filter_options_preview public
Method
admin_form_element public
Method
get_default_value_options private
Method
get_options private
Method
filter_csv_value public
Class

NF_Fields_ListImage

Class NF_Fields_ListImage

Method
__construct public
Method
admin_form_element public
Method
custom_columns public
Method
get_calc_value public
Method
localizeField public
Class

NF_Fields_ListMultiselect

Class NF_Fields_MultiselectList

Method
__construct public
Method
admin_form_element public
Method
get_calc_value public
Class

NF_Fields_ListRadio

Class NF_Fields_RadioList

Method
__construct public
Method
get_calc_value public
Class

NF_Fields_ListSelect

Class NF_Fields_SelectList

Method
__construct public
Method
get_calc_value public
Class

NF_Fields_ListState

Class NF_Fields_ListState

Method
__construct public
Method
get_options private
Class

NF_Fields_Note

Class NF_Fields_Note

Method
__construct public
Method
hide_field_type
Class

NF_Fields_Number

Class NF_Fields_Number

Method
__construct public
Method
get_parent_type public
Class

NF_Fields_Password

Class NF_Fields_Password

Method
__construct public
Method
hide_field_type
Class

NF_Fields_PasswordConfirm

Class NF_Fields_PasswordConfirm

Method
__construct public
Method
hide_field_type
Method
validate public
Method
get_password_fields private
Method
is_matching_values private
Method
get_error_message private
Class

NF_Fields_Phone

Class NF_Fields_Phone

Method
__construct public
Class

NF_Fields_Product

Class NF_Fields_Product

Method
__construct public
Method
process public
Method
validate public
Validate
Param
$field
Param
$data
Return
array $errors
Method
filter_required_setting public
Method
merge_tag_value public
Method
custom_columns public
Method
admin_form_element public
Class

NF_Fields_Quantity

Class NF_Fields_ProductQuantity

Method
__construct public
Class

NF_Fields_Recaptcha

Class NF_Fields_Recaptcha

Method
__construct public
Method
localize_settings public
Method
validate public
Method
hide_field_type
Class

NF_Fields_RecaptchaV3

Class NF_Fields_RecaptchaV3
This is a dynamically injected field based on if a form has the reCAPTCHA action. It doesn't appear in the builder.

Class

NF_Fields_Repeater

Class NF_Fields_Repeater

Method
__construct public
Method
display_filter public
Method
admin_form_element public
Method
custom_columns public
Custom Columns Creates what is displayed in the columns on the submissions page.
Since
3.4.34 nf_subs_export_pre_value
Param
$value checkbox value
Param
$field field model.
Return
$value string|void
Class

NF_Fields_Shipping

Class NF_Field_Shipping

Method
__construct public
Method
add_setting_group public
Method
admin_form_element public
Method
merge_tag_value public
Class

NF_Fields_Spam

Class NF_Fields_Spam

Method
__construct public
Method
validate public
Validate
Param
$field
Param
$data
Return
array $errors
Method
get_parent_type public
Method
hide_field_type
Class

NF_Fields_StarRating

Class NF_Fields_StarRating

Method
__construct public
Class

NF_Fields_Submit

Class NF_Field_Button

Method
__construct public
Method
hide_field_type
Class

NF_Fields_Terms

Class NF_Fields_Terms

Method
__construct public
Method
process public
Method
init_settings public
Method
active_taxonomy_field_check public
Method
add_term_options public
Method
merge_tag_value public
Method
get_parent_type public
Class

NF_Fields_Textarea

Class NF_Field_Textarea

Method
__construct public
Method
admin_form_element public
Method
filter_csv_value public
Class

NF_Fields_Textbox

Class NF_Field_Textbox

Method
__construct public
Method
filter_csv_value public
Class

NF_Fields_Total

Class NF_Field_Total

Method
__construct public
Method
process public
Class

NF_Fields_Unknown

Class NF_Fields_Unknown

Method
__construct public
Method
validate public
Method
hide_field_type
Static Method
create public
Class

NF_Fields_Zip

Class NF_Fields_Zip

Method
__construct public
Class

NF_Fields_Hr

Class NF_Fields_Hr

Method
__construct public
Method
hide_field_type
Class

DateTimeConverter

Converts timestamps between formats, cognizant of WordPress settings
This class is aware of the WordPress timezone settings and can convert stringed times into integer timestamps and vice-versa, relieving all other classes of this responsibility.

Static Method
localizeDateTimeStringIntoEpoch public
Static Method
localizeEpochIntoString public
Static Method
getWpTimezoneSetting public
Class

Field

Honor Field contract providing NF Field object methods
Provides functionality normally handled by the field object created by \Ninja_Forms()->form()->get_field( $fieldId )

Method
get_id public
@inheritDoc
Method
get_tmp_id public
@inheritDoc
Method
get_type public
@inheritDoc
Method
get_setting public
@inheritDoc
Method
get_settings public
@inheritDoc
Method
update_setting public
@inheritDoc
Method
update_settings public
@inheritDoc
Method
delete public
@inheritDoc
Method
find public
@inheritDoc
Method
get_object_settings public
@inheritDoc
Method
save public
@inheritDoc
Method
_insert_row public
@inheritDoc
Method
cache public
@inheritDoc
Method
add_parent public
@inheritDoc
Static Method
import public
Static Method
fromArray public
Method
__get public
Magic method getter for properties
Param
string $name
Return
void
Method
__set public
Magic method setter for properties

Param
string $name
Param
mixed $value
Class

NF_Handlers_FieldsetRepeater

Handles data of a FieldsetRepeater Fieldset repeater field data are stored as part of the single fieldset repeater field. This includes both settings and submission data. Since these data are not managed by NF standard data handling, this class manages it. Requests for a field can be made by either an (int) field id or a (string) field reference, which prior to fieldset repeaters had been for the field key only. Fieldset fields are stored as {fieldsetRepeaterFieldId}{fieldsetDelimiter}{fieldsetFieldId}{submissionIndexDelimiter}{submissionIndex} FieldSettings are passed into this class so that this class is not dependent on NF core

Method
getFieldsetLabels public
Returns labels for the fieldset's fields keyed on id of each fieldset field
Param
string $fieldId ID of the Fieldset Repeater field
Param
array $fieldSettings Provided by (obj)$field->get_settings()
Param
bool $useAdminLabels
Return
array
Method
getFieldsetTypes public
Returns fieldsetField types keyed on fieldsetField ids
Param
string $fieldId ID of the Fieldset Repeater field
Param
array $fieldSettings Provided by (obj)$field->get_settings()
Return
array
Method
isRepeaterFieldByFieldReference public
Given a field reference (ID or Key), return boolean for 'is repeater field' Determines if the given field reference is a fieldset repeater construct. This is NOT the parent field; this is a request for a child field within the fieldset repeater. The field settings and values for such a field are stored differently than a standard field, so we need to know how to make requests for its settings/data. For disambiguation, a fieldset repeater field request for a specific field within the fieldset is in the form of: {fieldsetFieldId}{fieldsetDelimiter}{submissionIndexDelimiter}
Param
int|string $fieldReference ID or key for the field
Return
bool
Method
isFieldsetData public
Determine if data matches fieldset repeater construct
When given only a submission value without any meta data, check the construct of the value to asssert with some level of confidence that the value is from a fieldset repeater.
Logic: - is submission empty? then NO, we don't assert is is fieldset repeater data - can the array key be parsed as a fieldset repeater key? If not, then NO... - is each value an array with 'id' and 'value' keys, and the `id` matches the id of its parent? If not, then NO...
If all the above conditions are met for every entry in the submission, we assert that the submission value is that of a fieldset repeater.
Param
array $submission
Return
boolean
Method
parseSubmissionReference public
Parse field id, fieldset id, and submission index
Returns array of fieldId, fieldsetFieldId, submissionId If failing, fieldsetFieldId = -1
Param
string $reference
Return
array
Method
parseFieldsetFieldReference public
Given field reference, return field Id and fieldset field id Fieldset field is a field within the fieldset repeater. The child's field settings and its submission data are not stored individually in the field or submission tables, but rather as nested data inside the parent's keyed location. Caller should ensure field is fieldset type before calling.
Param
string $fieldReference
Return
array Keys: 'fieldId', 'fieldsetFieldId'
Method
parseSubmissionIndex public
Parses fieldsetFieldId and submissionIndex keys
Given string of expect fieldsetField and submissionIndex as a key under which submission data is stored, returns the fieldsetFieldId and submissionIndex id If cannot be parsed as expected, default values of -1 are returned to notify of failure
Param
string $submissionIndex
Return
array
Method
getFieldtype public
Returns field type of a field within a fieldset, given the field reference Field reference is the id of the field WITHIN the fieldset. The fieldset has a numerical field id under which all settings and submission values are stored for any field within the fieldset. Access to that setting and submission data are not handled by the standard core functions and are done through this class.
Param
string $fieldsetFieldId Fieldset Field reference
Param
array $fieldSettings Field settings (from (obj)$field->get_settings())
Return
string
Method
extractSubmissionsByFieldsetField public
Extract all repeater submission values for a given fieldset field Fieldset data is all stored within the main fieldset field. To prevent every caller from having to know the internal structure of the stored data, this method enables callers to provide the requested Fieldset Field's reference id with the full submission data and receive in return all the submitted values for that given field.
Param
string $fieldsetFieldId Fieldset Field reference
Param
array $fieldSubmissionValue Submission data for entire fieldset
Method
extractSubmissions public
Extract fieldset repeater submissions by submission index and fieldset field
Unknown values can be passed as empty string or arrays; the method will fill in what it can and set default values for those it can't
ToDo
Refactor this method after unit testing is in place. It is being used to share a common structure for output but refactoring should wait until unit testing can ensure the data structure of responses don't change during refactor.
Param
string $fieldId
Param
array $fieldSubmissionValue Submission data array for entire field
Param
array $fieldSettings Field settings (from (obj)$field->get_settings())
Return
array Array of submission values
{submissionIndex}=> {fieldsetFieldId}=>['value'=>{submitted value} 'type'=> {field type}, 'label'=> {label} ]
Class

NF_Handlers_LocaleNumberFormatting

Method
__construct public
Static Method
create public
Method
locale_decode_number public
Method
locale_encode_number public
Method
locale_decode_equation public
Class

SubmissionAggregate

Aggregates submissions from all provided data sources
Data sources include NF submissions stored as posts; may include pre-existing Caldera Forms submissions

Method
filterSubmissions public
Filter submissions to return a collection of SingleSubmission meta data only
Param
string $formId
Return
array
Method
requestSingleSubmission public
Retrieve a single submission populated with submission/extra values
Also populates the submissionAggregate such that the aggregate can be passed for handling elsewhere
Param
SingleSubmission $singleSubmission
Return
SingleSubmission
Method
requestSubmissionsByIds public
Retrieve a submissions by precise list of submissions IDs
Param
SubmissionFilter $submissionFilter
Return
SubmissionFilter
Method
getSubmissionValuesByAggregatedKey public
Retrieve submissionValues from submission at a given aggregated key
Param
string $key
Return
SingleSubmission
See
constructUniqueAgreggatedSubmissionKey()
Method
deleteSingleSubmission public
Delete a single submission
Param
SingleSubmission $singleSubmission
Return
SubmissionAggregate
Method
restoreSingleSubmission public
Restore a single submission
Param
SingleSubmission $singleSubmission
Return
SubmissionAggregate
Method
updateSingleSubmission public
Update a single submission
Param
SingleSubmission $singleSubmission
Return
SubmissionAggregate
Method
constructFieldDefinitionCollection protected
Construct field definition collection from formId
Param
string $formId
Return
void
Method
getFieldsCollection protected
Return the Ninja Forms field collection
Param
string $formId
Return
array
Method
constructUniqueAgreggatedSubmissionKey protected
Construct a unique aggregated submission key for each submission
Uses the dataSource's id plus the submission record id. Each submission is is unique within its dataSource, and each dataSource is unique, thus the combined string is unique
Param
SingleSubmission $singleSubmission
Return
string
Method
addDataSource public
Set collection of submission data sources
Param
SubmissionDataSource $dataSource Submission data source
Return
SubmissionAggregate
Method
getFieldDefinitionCollection public
Get collection of SubmissionFields
Return
SubmissionField[]
Method
getSubmissionCount public
Get submission count
Return
integer
Method
getAggregatedSubmissions public
Get indexed collection of submissions meeting the filtering parameters
Return
SingleSubmission[]
Method
getMasterFormId public
Get fields and the data within the aggregate.
Return
string
Method
setAggregatedSubmissions public
Set keyed collection of submissions
This method enables re-setting the aggregated submissions after performing array methods on it. This is useful to get a subset of the collection without needing to re-filter and run DB requests
Param
Array $aggregatedSubmissions Keyed collection of submissions meeting the filtering parameters
Return
self
Class

SubmissionAggregateCsvExportAdapter

Adapts SubmissionAggregate to provide data required by CSV Export
CSV Export requires specific structuring of submission data, too specialized to be included in the SubmissionAggregate. This class structures submission data as needed for CSV export

Method
__construct public
Construct with SubmissionAggregate
Lookup array properties are not populated until the first request for either fieldTypes, label/adminLable, or fieldIds.
Param
SubmissionAggregate $submissionAggregate
Method
getLabels public
Return array of field labels keyed on field keys If hiddenFieldTypes array is set, labels filtered to hide those types
Param
bool $useAdminLabels Optionally use admin_labels
Return
array
Method
getFieldTypes public
Return array of field types keyed on field keys
Return
array
Method
getFieldIds public
Return array of field Ids keyed on field keys
Method
getSubmissionIds public
Return array of submission Ids in the collection Generated at time of request to ensure it is up to date after last query / construction
Return
array
Method
getColumnValuesByAggregatedKey public
Get column values for a given submission aggregated key
Param
string $aggregatedKey
Return
array
Method
constructFieldLookups protected
Construct labels/adminLabels from submission aggregate
Return
void
Method
extractSubmissionFieldData protected
Given submission field, extract labels + meta, or submission values
Param
SubmissionField $submissionField
Param
boolean|null $labelsOnly
Return
void
Method
convertSubmissionFieldToNfField protected
Construct NF Field from SubmissionField NF Field is needed to apply existing NF filters

Param
SubmissionField $submissionField
Return
Field
Method
extractRepeaterFieldColumns protected
Extract repeater field column headers
ToDo
Enable external setting of in-CSV delimiter
ToDo
~L258 - adjust deconstructed value to handle listmultiselect arrays (other fields may also have arrays)
Param
SubmissionField $submissionField
Return
void
Method
extractRepeaterFieldsFromSubmisionField protected
Extracts collection of SubmissionFields within a fieldset repeater
Param
SubmissionField $submissionField
Return
SubmissionField[]
Method
constructRepeaterFieldSettingsLookup protected
Construct lookup of field settings for fields within fieldset repeater field
Param
SubmissionField $submissionField
Return
array
Method
getStringedValue protected
Ensure each repeater field value is a string
Param
SubmissionField $submissionField
Param
array $deconstructedValue
Param
string $repeatedValueDelimiter
Return
string
Method
deconstructRepeaterFieldValue protected
Deconstruct repeater field array by repeated fields
ToDo
Add exception handling for unexpected key structure
Param
array $constructedValue
Return
array
Method
setFieldLabels protected
Add key value lookups for labels and admin labels
Param
string $slug
Param
string $label
Param
string $adminLabel
Return
void
Method
setFieldMetaData protected
Add key value lookups for Id and type on all fields in collection This includes hidden fields and parent fieldset repeater fields
Param
SubmissionField $submissionField
Return
void
Method
setColumnValue protected
Set column value for a given field
Param
string $key
Param
string $value
Return
void
Method
filterRawValue protected
Method
setHiddenFieldTypes public
Set indexed array of field types to be omitted in output
Param
array $hiddenFieldTypes Indexed array of field types to be omitted in output
Return
SubmissionAggregateCsvExportAdapter
Class

WPN_Helper

Static Method
addslashes public
Static Method
utf8_encode public
Static Method
utf8_decode public
Static Method
json_cleanup public
Static Method
str_replace public
Static Method
html_entity_decode public
Static Method
htmlspecialchars public
Static Method
stripslashes public
Static Method
esc_html public
Static Method
kses_post public
Static Method
strip_tags public
Static Method
string_to_bytes public
Static Method
str_putcsv public
Static Method
get_query_string public
Static Method
sanitize_text_field public
Static Method
get_plugin_version public
Static Method
is_func_disabled public
Static Method
maybe_unserialize public
Static Method
get_nf_cache public
Static Method
update_nf_cache public
Static Method
get_stage public
Static Method
build_nf_cache public
Static Method
delete_nf_cache public
Static Method
parse_utf8_serialized private
Static Method
get_zuul public
Static Method
gated_release public
Static Method
form_in_maintenance public
Static Method
set_forms_maintenance_mode public
Static Method
use_cache public
Static Method
sanitize_classes public
Static Method
sanitize_string_setting_value public
Static Method
maybe_disallow_unfiltered_html_for_sanitization public
Static Method
maybe_disallow_unfiltered_html_for_escaping public
Class

EDD_SL_Plugin_Updater

Allows plugins to use their own update API.

Author
Easy Digital Downloads
Version
1.6.18

Method
__construct public
Class constructor.
@uses plugin_basename() @uses hook()
Param
string $_api_url The URL pointing to the custom API endpoint.
Param
string $_plugin_file Path to the plugin file.
Param
array $_api_data Optional data to send with API calls.
Method
init public
Set up WordPress filters to hook into WP's update process.
@uses add_filter()
Return
void
Method
check_update public
Check for Updates at the defined API endpoint and modify the update array.
This function dives into the update API just when WordPress creates its update array, then adds a custom API call and injects the custom plugin data retrieved from the API. It is reassembled from parts of the native WordPress plugin update code. See wp-includes/update.php line 121 for the original wp_update_plugins() function.
@uses api_request()
Param
array $_transient_data Update array build by WordPress.
Return
array Modified update array with custom plugin data.
Method
show_update_notification public
show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
Param
string $file
Param
array $plugin
Method
plugins_api_filter public
Updates information on the "View version x.x details" page with custom data.
@uses api_request()
Param
mixed $_data
Param
string $_action
Param
object $_args
Return
object $_data
Method
convert_object_to_array private
Convert some objects to arrays when injecting data into the update API
Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON decoding, they are objects. This method allows us to pass in the object and return an associative array.
Since
3.6.5
Param
stdClass $data
Return
array
Method
http_request_args public
Disable SSL verification in order to prevent download update failures
Param
array $args
Param
string $url
Return
object $array
Method
api_request private
Calls the API and, if successfull, returns the object delivered by the API.
@uses get_bloginfo() @uses wp_remote_post() @uses is_wp_error()
Param
string $_action The requested action.
Param
array $_data Parameters for the API action.
Return
false|object
Method
show_changelog public
Method
get_cached_version_info public
Method
set_version_info_cache public
Method
verify_ssl private
Returns if the SSL of the store should be verified.
Since
1.6.13
Return
bool
Class

NF_Extension_Updater

This class handles all the update-related stuff for extensions, including adding a license section to the license tab. It accepts two args: Product Name and Version.

Param
$product_name string
Param
$version string
Since
2.2.47
Return
void

Method
__construct public
Constructor function
Since
2.2.47 @updated 3.0
Return
void
Method
register /** * Function that adds the license entry fields to the license tab. * * @updated 3.0 * @param array $licenses * @return array $licenses */
Method
activate_license /* * * Function that activates our license * * @since 2.2.47 * @return void */
Method
show_license_error_notice public
Method
deactivate_license /* * * Function that deactivates our license if the user clicks the "Deactivate License" button. * * @since 2.2.47 * @return void */
Method
auto_update /** * Function that runs all of our auto-update functionality * * @since 2.2.47 * @updates 3.0 * @return void */
Method
maybe_prevent_install public
Function that maybe prevents a plugin update from installing if the php version is not high enough.
Since
3.4.24
Param
bool $default false
Param
array $extra array sent by the filter we're using.
Return
bool/WP_ERROR $default if we bail early, WP_ERROR if we don't.
Method
maybe_prevent_update_notice public
Check to see if this plugin update has a minimum PHP version. If it does, make sure that we meet it. If we don't meet it, then show the user an error message with a link to WordPress.org's minimum requirements page.
Since
3.4.24
Param
string $plugin_file plugin file for the row we're looking at
Param
array $plugin_data update data from the WordPress plugin update check
Param
string $plugin_status is this plugin active, inactive, etc.
Return
void
Method
is_valid public
Return whether or not this license is valid.
Access
public
Since
2.9
Return
bool
Method
get_error public
Get any error messages for this license field.
Access
public
Since
2.9
Return
string $error
Method
maybe_debug private
Class

NF_LoadLegacy

Conditionally install and activate NF Legacy plugin

Method
handle public
Conditionally install and activate NF Legacy plugin
Method
installLegacy protected
Request WP installation of NF Legacy plugin from public repository
Return
void
Method
checkLegacyActive protected
Check if NF Legacy plugin is active
Method
checkPreviousAttempt protected
Check if previously attempt to load has been made
Method
registerAttemptedInstallation protected
Register that an attempt to install Legacy has been made
Class

NF_LoadLegacy

Method
wp_ajax_ninja_forms_sendwp_remote_install_handler
Class

WP_Async_Request

Method
__construct public
Initiate new async request
Method
data public
Set data used during the request
Param
array $data Data.
Return
$this
Method
dispatch public
Dispatch the async request
Return
array|WP_Error
Method
get_query_args protected
Get query args
Return
array
Method
get_query_url protected
Get query URL
Return
string
Method
get_post_args protected
Get post args
Return
array
Method
maybe_handle public
Maybe handle
Check for correct nonce and pass to handler.
Method
handle protected
Class

WP_Background_Process

Method
__construct public
Initiate new background process
Method
dispatch public
Dispatch
Access
public
Return
void
Method
push_to_queue public
Push to queue
Param
mixed $data Data.
Return
$this
Method
save public
Save queue
Return
$this
Method
update public
Update queue
Param
string $key Key.
Param
array $data Data.
Return
$this
Method
delete public
Delete queue
Param
string $key Key.
Return
$this
Method
generate_key protected
Generate key
Generates a unique key based on microtime. Queue items are given a unique key so that they can be merged upon save.
Param
int $length Length.
Return
string
Method
maybe_handle public
Maybe process queue
Checks whether data exists within the queue and that the process is not already running.
Method
is_queue_empty protected
Is queue empty
Return
bool
Method
is_process_running protected
Is process running
Check whether the current process is already running in a background process.
Method
lock_process protected
Lock process
Lock the process so that multiple instances can't run simultaneously. Override if applicable, but the duration should be greater than that defined in the time_exceeded() method.
Method
unlock_process protected
Unlock process
Unlock the process so that other instances can spawn.
Return
$this
Method
get_batch protected
Get batch
Return
stdClass Return the first batch from the queue
Method
handle protected
Handle
Pass each queue item to the task handler, while remaining within server memory and time limit constraints.
Method
memory_exceeded protected
Memory exceeded
Ensures the batch process never exceeds 90% of the maximum WordPress memory.
Return
bool
Method
get_memory_limit protected
Get memory limit
Return
int
Method
time_exceeded protected
Time exceeded.
Ensures the batch never exceeds a sensible time limit. A timeout limit of 30s is common on shared hosting.
Return
bool
Method
complete protected
Complete.
Override if applicable, but ensure that the below actions are performed, or, call parent::complete().
Method
schedule_cron_healthcheck public
Schedule cron healthcheck
Access
public
Param
mixed $schedules Schedules.
Return
mixed
Method
handle_cron_healthcheck public
Handle cron healthcheck
Restart the background process if not already running and data exists in the queue.
Method
schedule_event protected
Schedule event
Method
clear_scheduled_event protected
Clear scheduled event
Method
cancel_process public
Cancel Process
Stop processing queue items, clear cronjob and delete batch.
Method
task protected
Class

NF_EOS_Parser

Equation Operating System (EOS) Parser
An EOS that can safely parse equations from unknown sources returning the calculated value of it. Can also handle solving equations with variables, if the variables are defined (useful for the Graph creation that the second and extended class in this file provides. {

See
eqGraph}) This class was created for PHP4 in 2005, updated to fully PHP5 in 2013.
Author
Jon Lawrence
Copyright
Copyright �2005-2013, Jon Lawrence @license http://opensource.org/licenses/LGPL-2.1 LGPL 2.1 License
Package
Math
Subpackage
EOS
Version
2.2.1

Method
__construct public
Construct method
Will initiate the class. If variable given, will assign to internal variable to solve with this::solveIF() without needing additional input. Initializing with a variable is not suggested.
See
Parser::solveIF()
Param
String $inFix Standard format equation
Method
checkInfix private
Check Infix for opening closing pair matches.
This function is meant to solely check to make sure every opening statement has a matching closing one, and throws an exception if it doesn't.
Param
String $infix Equation to check
Throws
Exception if malformed.
Return
Bool true if passes - throws an exception if not.
Method
in2post public
Infix to Postfix
Converts an infix (standard) equation to postfix (RPN) notation. Sets the internal variable $this->postFix for the Parser::solvePF() function to use.
Link
http://en.wikipedia.org/wiki/Infix_notation Infix Notation
Link
http://en.wikipedia.org/wiki/Reverse_Polish_notation Reverse Polish Notation
Param
String $infix A standard notation equation
Throws
Exception When parenthesis are mismatched.
Return
Array Fully formed RPN Stack
Method
solvePF public
Solve Postfix (RPN)
This function will solve a RPN array. Default action is to solve the RPN array stored in the class from Parser::in2post(), can take an array input to solve as well, though default action is preferred.
Link
http://en.wikipedia.org/wiki/Reverse_Polish_notation Postix Notation
Param
Array $pfArray RPN formatted array. Optional.
Throws
Exception On division by zero.
Return
Float Result of the operation.
Method
solve public
Method
solveIF /** * Solve Infix (Standard) Notation Equation * * Will take a standard equation with optional variables and solve it. Variables * must begin with '&' or '$' * The variable array must be in the format of 'variable' => value. If * variable array is scalar (ie 5), all variables will be replaced with it. * * @param String $infix Standard Equation to solve * @param String|Array $vArray Variable replacement * @throws Exception On division by zero and on NaN and lack of variable replacement. * @return Float Solved equation */
Method
factorial protected
Solve factorial (!)
Will take any real positive number and solve for it's factorial. Eg. `5!` will become `1
2
3
4
5` = `120` For integers and 5.2! will become gamma(6.2) for non-integers DONE: Solve for non-integer factorials 2015/07/02
Param
Float $num Non-negative real number to get factorial of
Throws
Exception if number is at or less than 0
Return
Float Solved factorial
Method
gamma public
Gamma Function
Because we can. This function exists as a catch-all for different numerical approx. of gamma if I decide to add any past Lanczos'. This method is public because a function doesn't currently exist within this parser to use it. That will change in the future.
Param
$z Number to compute gamma from
Return
Float The gamma (hopefully, I'll test it after writing the code)
Method
laGamma protected
Lanczos Approximation
The Lanczos Approximation method of finding gamma values
Link
http://www.rskey.org/CMS/index.php/the-library/11
Link
http://algolist.manual.ru/maths/count_fast/gamma_function.php
Link
https://en.wikipedia.org/wiki/Lanczos_approximation
Param
float $z Number to obtain the gamma of
Return
float Gamma of inputted number
Throws
Exception if Number is less than or equal to 0
Class

NF_EOS_Stack

Basic Stack Class.
Created for use with eqEOS. May eventually be replaced with native PHP functions `array_pop()`, `array_push()`, and `end()`

Author
Jon Lawrence
Copyright
Copyright �2005-2013 Jon Lawrence @license http://opensource.org/licenses/LGPL-2.1 LGPL 2.1 License
Package
Math
Subpackage
EOS
Version
2.0

Method
__construct public
Constructor
Initializes the stack
Method
peek public
Peek
Will view the last element of the stack without removing it
Return
Mixed An element of the array or false if none exist
Method
poke public
Poke
Will add an element to the end of the stack
Param
Mixed $data Element to add
Method
push public
Push
Alias of {
See
Stack::poke()} Adds element to the stack
Param
Mixed $data Element to add
Method
pop public
Pop
Retrives an element from the end of the stack, and removes it from the stack at the same time. If no elements, returns boolean false
Return
Mixed Element at end of stack or false if none exist
Method
clear public
Clear
Clears the stack to be reused.
Method
getStack public
Get Stack
Returns the array of stack elements, keeping all, indexed at 0
Return
Mixed Array of stack elements or false if none exist.
Class

Recursive_ArrayAccess

Recursive array class to allow multidimensional array access.

Package
WordPress
Since
3.6.0

Method
__construct protected
Default object constructor.
Param
array $data
Method
__clone public
Allow deep copies of objects
Method
toArray public
Output the data container as a multidimensional array.
Return
array
Method
offsetExists public
Whether a offset exists
Link
http://php.net/manual/en/arrayaccess.offsetexists.php
Param
mixed $offset An offset to check for.
Return
boolean true on success or false on failure.
Method
offsetGet public
Offset to retrieve
Link
http://php.net/manual/en/arrayaccess.offsetget.php
Param
mixed $offset The offset to retrieve.
Return
mixed Can return all value types.
Method
offsetSet public
Offset to set
Link
http://php.net/manual/en/arrayaccess.offsetset.php
Param
mixed $offset The offset to assign the value to.
Param
mixed $value The value to set.
Return
void
Method
offsetUnset public
Offset to unset
Link
http://php.net/manual/en/arrayaccess.offsetunset.php
Param
mixed $offset The offset to unset.
Return
void
Class

WP_Session

Static Method
get_instance public
Method
__construct protected
Default constructor. Will rebuild the session collection from the given session ID if it exists. Otherwise, will create a new session with that ID.
Param
$session_id @uses apply_filters Calls `wp_session_expiration` to determine how long until sessions expire.
Method
set_expiration protected
Set both the expiration time and the expiration variant.
If the current time is below the variant, we don't update the session's expiration time. If it's greater than the variant, then we update the expiration time in the database. This prevents writing to the database on every page load for active sessions and only updates the expiration time if we're nearing when the session actually expires.
By default, the expiration time is set to 30 minutes. By default, the expiration variant is set to 24 minutes.
As a result, the session expiration time - at a maximum - will only be written to the database once every 24 minutes. After 30 minutes, the session will have been expired. No cookie will be sent by the browser, and the old session will be queued for deletion by the garbage collector.
@uses apply_filters Calls `wp_session_expiration_variant` to get the max update window for session data. @uses apply_filters Calls `wp_session_expiration` to get the standard expiration time for sessions.
Method
set_cookie public
Method
generate_id protected
Generate a cryptographically strong unique ID for the session token.
Return
string
Method
is_valid_md5 protected
Checks if is valid md5 string
Param
string $md5
Return
int
Method
read_data protected
Read data from a transient for the current session.
Automatically resets the expiration time for the session transient to some time in the future.
Return
array
Method
write_data public
Write the data from the current session to the data storage system.
Method
json_out public
Output the current container contents as a JSON-encoded string.
Return
string
Method
json_in public
Decodes a JSON string and, if the object is an array, overwrites the session container with its contents.
Param
string $data
Return
bool
Method
regenerate_id public
Regenerate the current session's ID.
Param
bool $delete_old Flag whether or not to delete the old session data from the server.
Method
session_started public
Check if a session has been initialized.
Return
bool
Method
cache_expiration public
Return the read-only cache expiration value.
Return
int
Method
reset public
Flushes all session variables.
Method
current public
Current position of the array.
Link
http://php.net/manual/en/iterator.current.php
Return
mixed
Method
key public
Key of the current element.
Link
http://php.net/manual/en/iterator.key.php
Return
mixed
Method
next public
Move the internal point of the container array to the next item
Link
http://php.net/manual/en/iterator.next.php
Return
void
Method
rewind public
Rewind the internal point of the container array.
Link
http://php.net/manual/en/iterator.rewind.php
Return
void
Method
valid public
Is the current key valid?
Link
http://php.net/manual/en/iterator.rewind.php
Return
bool
Method
count public
Get the count of elements in the container array.
Link
http://php.net/manual/en/countable.count.php
Return
int
Class

WP_Session

Method
wp_session_cache_expire /** * Return the current cache expire setting. * * @return int */
Method
wp_session_commit /** * Alias of wp_session_write_close() */
Method
wp_session_decode /** * Load a JSON-encoded string into the current session. * * @param string $data */
Method
wp_session_encode /** * Encode the current session's data as a JSON string. * * @return string */
Method
wp_session_regenerate_id /** * Regenerate the session ID. * * @param bool $delete_old_session * * @return bool */
Method
wp_session_start /** * Start new or resume existing session. * * Resumes an existing session based on a value sent by the _wp_session cookie. * * @return bool */
Method
wp_session_status /** * Return the current session status. * * @return int */
Method
wp_session_unset /** * Unset all session variables. */
Method
wp_session_write_close /** * Write session data and end session */
Method
wp_session_cleanup /** * Clean up expired sessions by removing data and their expiration entries from * the WordPress options table. * * This method should never be called directly and should instead be triggered as part * of a scheduled task or cron job. */
Method
wp_session_register_garbage_collection /** * Register the garbage collector as a twice daily event. */
Class

NF_Php_Version_Whip

Method
__construct public
NF_Whip constructor. Hooks into the WordPress admin notice system and calls our whip_message. @Since 3.2.19
Method
whipMessage public
Whip Message Builds and outputs our message. @Since 3.2.19
Method
set_dismiss public
Set Dismiss Sets a transient for 4 weeks out that will remove the whip notice. @Since 3.2.19
Class

NF_MergeTags_Calcs

Method
__construct public
Method
__call public
Method
set_merge_tags public
Method
get_calc_value public
Method
get_formatted_calc_value public
Class

NF_MergeTags_Deprecated

Method
__construct public
Method
post_id protected
Method
post_title protected
Method
post_url protected
Method
post_author protected
Method
post_author_email protected
Method
user_id protected
Method
user_first_name protected
Method
user_last_name protected
Method
user_display_name protected
Method
user_email protected
Method
admin_email protected
Method
site_title protected
Method
site_url protected
Method
system_date protected
Method
system_ip protected
Class

NF_MergeTags_Fields

Method
__construct public
Method
__call public
Method
include_all_fields_merge_tags public
Helps process {all_fields_table} and {fields_table} This still requires to run add_field() for all fields in a submission before and after calling his function
Method
all_fields public
Method
all_fields_table public
Method
fields_table public
Method
all_field_plain public
Method
add_field public
Method
addRepeaterCalcValue protected
Generate repeater fieldset calc value based on the number of fieldsets filled by the user
Param
array $field Array of field information
Return
int of the number of fieldsets used
Method
addFieldsetRepeaterCallbacks protected
Generate fieldset-specific outputs
Param
array $field Array of field information
Param
bool $sanitize
Return
void
Method
generateFieldsetTableRows protected
Generate merge tag output for fieldset repeater table values
Param
array $field Array of field information
Return
void
Method
get_list_labels public
Get List Labels Accepts a field loops over options, compares field values and returns the labels.
Since
3.2.22
Param
$field array
Return
array - label of the option.
Method
add public
Add a callback value to the merge tags array Keyed on callback string, contains an array with tag, value, optional calc_value, sanitize boolean
Param
$callback
Param
$id
Param
$tag
Param
$value
Param
bool $calc_value
Param
bool $sanitize
Method
set_form_id public
Method
maybe_sanitize public
Method
stripShortcodesMaybeFieldset protected
Strip shortcodes in value
Param
int|string $id
Param
mixed $incoming Incoming value
Return
mixed
Method
stripTagsMaybeFieldset protected
Strip tags in value
Param
int|string $id
Param
mixed $incoming
Return
mixed
Method
determineFieldType protected
Determine the field type given a field id or key
Param
string $id
Return
string
Method
get_fields_sorted private
Static Method
sort_fields public
Method
calc_replace public
Method
pre_parse_calc_settings public
Method
force_field_calc_tags private
Class

NF_MergeTags_Form

Method
__construct public
Method
getSubSeq public
Return
mixed
Method
setSubSeq public
Param
mixed $sub_seq
Method
get_form_id public
Getter method for the form_id.
Return
void
Method
get_form_title public
Getter method for the form title.
Return
void
Method
set_form_id public
Setter method for the form_id and callback for the nf_get_form_id action.
Since
3.2.2
Param
string $form_id The ID of the current form.
Return
void
Method
set_form_title public
Setter method for the form_title
Param
string $form_title The title of the current form.
Return
void
Method
get_sub_count public
Gets a count of the form submissions and callback for the sub_count merge tag setting.
Since
3.2.2
Return
array|int Count of the form submissions.
Class

NF_MergeTags_Other

Method
__construct public
Method
replace public
Method
init public
Method
__call public
Method
set_merge_tags public
Assign a merge tag construct array to a key
Param
string $key
Param
mixed $value
Return
void
Method
system_date protected
Method
system_time protected
Method
user_ip protected
Class

NF_MergeTags_System

Method
__construct public
Method
admin_email protected
Method
site_title protected
Method
site_url protected
Class

NF_MergeTags_WP

Method
__construct public
Method
replace public
Custom replace() method for custom post meta or user meta.
Param
string|array $subject
Return
string
Method
post_id protected
Method
post_title protected
Method
post_url protected
Method
post_author protected
Method
post_author_email protected
Method
user_id protected
Method
user_first_name protected
Method
user_last_name protected
Method
user_display_name protected
Method
user_username protected
Method
user_email protected
Method
user_url protected
Method
admin_email protected
Method
site_title protected
Method
site_url protected
Class

NF_PromotionManager

Method
__construct public
Accepts a string of location to tell let us know where in the app we are sending promotions to. Then will return an array of promotions to run in the location.
Method
get_promotions public
Method
set_promotions private
Set our promtions array to our promotions property.
Method
is_layout_styles_active private
Method
is_conditional_logic_active private
Method
is_multi_part_active private
Method
is_file_uploads_active private
Method
is_personal_active private
Utilizes the helper methods above to determine if a a Membership is active on a site.
Method
maybe_remove_sendwp private
Method
maybe_remove_personal private
Method
remove_promotion private
Pass in a promotion type to have it removed from the list of active promotions.
Return
void
Method
sort_active_promotions_by_locations private
Sorts our promotions by where they will appear in app.
Return
void
Method
is_sendwp_active private
Method
is_ninja_mail_active private
Class

NF_Routes_Submissions

Method
register_routes /** * Register REST API routes related to submissions actions * * @since 3.4.33 * * @route "ninja-forms-submissions/export" * @route 'ninja-forms-submissions/email-action" */
Method
get_submissions_permission_callback public
Secure endpoint to allow users to read submissions
Since
3.5.8 Already passed Nonce validation via wp_rest and x_wp_nonce header checked against rest_cookie_check_errors()
Method
delete_submissions_permission_callback public
Secure endpoint to allow users to delete submissions
Since
3.5.8 Already passed Nonce validation via wp_rest and x_wp_nonce header checked against rest_cookie_check_errors()
Method
update_submission_permission_callback public
Secure endpoint to allow users to update a submission
Since
3.5.8 Already passed Nonce validation via wp_rest and x_wp_nonce header checked against rest_cookie_check_errors()
Method
handle_extra_submission_permission_callback public
Secure endpoint to allow users to perform extra handling
Since
3.5.8 Already passed Nonce validation via wp_rest and x_wp_nonce header checked against rest_cookie_check_errors()
Method
permission_callback public
Secure endpoint to allowed users
Security disclosure regarding <=3.5.7 showed that any logged in user could export form data, possibly exposing personally identifiable information. Permissions changed such that only admin can export submission data; a filter enables one to override that permission if desired.
Since
3.4.33
Already passed Nonce validation via wp_rest and x_wp_nonce header checked against rest_cookie_check_errors()
Method
bulk_export_submissions public
Bulk_export_submissions
Since
3.4.33
Return
array of CSVs by form
Method
download_all_submissions public
Download all submissions
Return
array
Method
delete_download_file public
Delete a file when provided valid file path
Param
WP_REST_Request $request Object with `file_path` property
Return
void
Method
trigger_email_action public
Trigger Email Action endpoint callback
Since
3.4.33
Return
bool|int depending on the value returned by wp_mail
Method
process_merge_tags public
Process Merge tags for a given Value
Since
3.4.33
Return
object of Email Action Model with merge tags settingsprocessed
Method
get_submissions public
Get Submissions
Since
3.5.8
Return
array of submissions for a Form
Method
set_submissions_settings public
Save submissions interface settings
Data passes a json string
Param
WP_REST_Request $request
Return
void
Method
get_submissions_settings public
Get submissions interface settings
Param
WP_REST_Request $request
Return
array of settings
Method
delete_submissions public
Request deletion of a collection of submissions
Data passes as a collection of single submission entities keyed under submissions {"submissions": SingleSubmission[]}
Param
WP_REST_Request $request
Return
void
Method
restore_submissions public
Request restoration of a collection of submissions
Data passes as a collection of single submission entities keyed under submissions {"submissions": SingleSubmission[]}
Param
WP_REST_Request $request
Return
void
Method
update_submission public
Request update of a single submission
Data passes as a single submission entity keyed under submission {"submission": SingleSubmission}
Param
WP_REST_Request $request
Return
void
Method
handle_extra_submission public
Handle extra request for submissions
This is a starting proof of concept that triggers a download for the PDF submissions add-on Data passes as a single submission entity keyed under submission and a Class to call the handler under handleExtra key { "submission": SingleSubmission, "handleExtra": HandleExtraClassName }
Param
WP_REST_Request $request
Return
object with string of responseType, blob of PDF download and string of blobType
Class

NF_Session

NF_Session Class

Since
1.5

Method
__construct public
Get things started
Defines our WP_Session constants, includes the necessary libraries and retrieves the WP Session instance
Since
2.9.18
Method
init public
Setup the WP_Session instance
Access
public
Since
2.9.18
Return
void
Method
get_id public
Retrieve session ID
Access
public
Since
2.9.18
Return
string Session ID
Method
get public
Retrieve a session variable
Access
public
Since
2.9.18
Param
string $key Session key
Return
string Session variable
Method
set public
Set a session variable
Since
2.9.18
Param
string $key Session key
Param
integer $value Session variable
Return
string Session variable
Method
delete public
Delete a session variable
Since
2.9.28
Param
string $key
Return
void
Method
set_expiration_variant_time public
Force the cookie expiration variant time to 23 minutes
Access
public
Since
2.9.18
Param
int $exp Default expiration (1 hour)
Return
int
Method
set_expiration_time public
Force the cookie expiration time to 24 minutes
Access
public
Since
2.9.18
Param
int $exp Default expiration (1 hour)
Return
int
Class

NF_Telemetry_CountMetric

Method
increment public
Class

NF_Telemetry_MaxMetric

Method
update public
Class

NF_Telemetry_Metric

Method
__construct public
Method
get public
Method
save public
Class

NF_Telemetry_MetricFactory

Static Method
create public
Class

NF_Telemetry_MetricRepository

Method
__construct public
Method
get public
Method
save public
Class

NF_Telemetry_MetricRepository

Method
get public
Method
save public
Class

NF_Updates_CacheCollateActions

Class NF_Updates_CacheCollateActions This class manages the step process of running through the CacheCollateActions required update. It will define an object to pull data from (if necessary) to pick back up if exited early. It will run an upgrade function to alter the nf3_actions and nf3_action_meta tables. Then, it will step over each form on the site, following this process: - Actions that exist in the data tables but not in the cache will be deleted. - Actions that exist in the cache but not in the data tables will be inserted. - Actions that exist in the data tables but have an incorrect form ID will be inserted as a new ID and referenced from the cache. - Actions that exist in both will be updated from the cache to ensure the data is correct. After completing the above for every form on the site, it will remove the data object that manages its location.

Method
__construct public
Constructor
Param
$data (Array) The data object passed in by the AJAX call.
Param
$running (Array) The array of required updates being run.
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
setup_vars private
Setup our global variables used in other methods.
Since
3.4.0
Return
void
Method
cleanup public
Function to cleanup any lingering temporary elements of a required update after completion.
Since
3.4.0
Method
end_of_step private
Check to see if we've locked processing. If we have, then we need to run this process again.
If we haven't locked processing, prepare to end this process.
Since
3.4.0
Return
void
Method
update_form_cache private
If we've made any changes to our form actions, update our form cache to match.
Since
3.4.0
Return
void
Method
maybe_update_actions private
Loop over all of our actions and update our database if necessary. Check each setting against $this->blacklist to make sure we want to insert that value.
Since
3.4.0
Return
void
Class

NF_Updates_CacheCollateCleanup

Class NF_Updates_CacheCollateCleanup This class manages the step process of running through the CacheCollateCleanup required update. It will define an object to pull data from (if necessary) to pick back up if exited early. It will then step over each table in our structure and ensure that orphan records are removed from storage. It will then step over all submissions, removing any orphans. It will then step over all submissions (by form), updating or removing any orphan field records. After completing the above for every form on the site, it will remove the data object that manages its location.

Method
__construct public
Constructor
Param
$data (Array) The data object passed in by the AJAX call.
Param
$running (Array) The array of required updates being run.
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
cleanup public
Function to cleanup any lingering temporary elements of a required update after completion.
Since
3.4.0
Method
get_total public
Function to get the number of objects in a table.
Param
$table (String) The name of the target table.
Return
(Int) The count of rows.
Since
3.4.0
Method
do_easy_delete private
Function to perform a simple, single-step delete of orphan data.
Since
3.4.0 @updated 3.4.11
Method
do_step_delete private
Function to perform a multi-step delete of orphan data.
Since
3.4.0 @updated 3.4.11
Method
uniquify private
Function called by array_filter to remove ALL duplicate results.
Param
$v (Int) The number of results.
Return
(Boolean)
Since
3.4.0
Method
adopt_subs private
Function to remove orphan submissions from the posts and postmeta tables.
Since
3.4.0
Method
adopt_fields private
Function to remove orphan field data that's still attached to valid submissions from the postmeta table.
Since
3.4.0
Method
array_squash private
Function to compress our db results into a more useful format.
Param
$data (Array) The result to be compressed.
Return
(Array) Associative if our data was complex. Non-associative if our data was a single item.
Since
3.4.0
Class

NF_Updates_CacheCollateFields

Class NF_Updates_CacheCollateFields This class manages the step process of running through the CacheCollateFields required update. It will define an object to pull data from (if necessary) to pick back up if exited early. It will run an upgrade function to alter the nf3_fields and nf3_field_meta tables. Then, it will step over each form on the site, following this process: - Fields that exist in the data tables but not in the cache will be deleted. - Fields that exist in the cache but not in the data tables will be inserted. - Fields that exist in the data tables but have an incorrect form ID will be inserted as a new ID and referenced from the cache. - Fields that exist in both will be updated from the cache to ensure the data is correct. After completing the above for every form on the site, it will remove the data object that manages its location.

Method
__construct public
Constructor
Param
$data (Array) The data object passed in by the AJAX call.
Param
$running (Array) The array of required updates being run.
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
cleanup public
Function to cleanup any lingering temporary elements of a required update after completion.
Since
3.4.0
Method
maybe_delete_fields public
Function to delete unncessary items from our existing tables.
Param
$items (Array) The list of ids to be deleted.
Since
3.4.0
Method
setup_vars private
Most of the methods in this class use class vars to access and store data.
This method sets the initial state of these class vars. Class vars include: $form <- reference to the form currently being processed. $field_ids <- non-associatve array of field ids from the cache. $insert <- array that tracks what we should we insert because it exists in our cache but not in the Fields table. $submission_updates <- array that tracks fields that have had their id changed. $fields_by_id <- associative array of field ids from the cache, using the field id as the key.
If we are not running a form for the first time, we set class vars based on what we have been passed. After setting those class vars, we bail early. If we are running for the first time, set have to hit the database to get the information for class vars.
We need to compare the fields in our form cache to those in the fields table. Ultimately, we're trying to make sure that our fields table matches our form cache. Since we're treating the cache as the truth, we want to remove fields that don't exist in the cache. We also want to insert any fields that exist in the cache, but not in the fields table.
This method doesn't perform those operations, but it sets the class vars that the appropriate methods use to figure out what to add and remove.
Since
3.4.0
Return
void
Method
maybe_insert_fields private
Our setup_vars method adds fields to the insert class var. Any fields that are in this array need to be inserted into our database.
This is the first insert/update method to run, so it doesn't check lock_process. If the insert class var is empty, then we bail early.
Since
3.4.0
Return
void
Method
maybe_update_submissions private
If we have any duplicate field ids, we need to update any existing submissions with the new field ID.
The $this->submission_updates array will look like:
$this->submission_updates[ original_id ] = new_id;
This method: Checks to see if we have any fields in our $this->submission_updates array (have a changed ID) Makes sure that processing isn't locked Loops over fields in our $this->submission_updates array Fetches submission post meta for the specific form ID and _field_OLDID Uses a SQL UPDATE statement to replace _field_OLDID with _field_NEWID
Since
3.4.0
Return
void
Method
maybe_update_fields private
If we still have field_ids in our class var, then we need to update the field table.
If lock_process is true or we have no field_ids, we bail early.
Since
3.4.0
Return
void
Method
update_form_cache private
If we've inserted any fields that have changed ids, we want to update those ids in our cache. This method grabs the cache, updates any field ids, then updates the cache.
Since
3.4.0
Return
void
Method
end_of_step private
After we've done our processing, but before we get to step cleanup, we need to store process information.
This method updates our form class var so that it can be passed to the next step. If we've completed this step, it calls the cleanup method.
Since
3.4.0
Return
void
Class

NF_Updates_CacheCollateForms

Class NF_Updates_CacheCollateForms This class manages the step process of running through the CacheCollateForms required update. It will define an object to pull data from (if necessary) to pick back up if exited early. It will run an upgrade function to alter the nf3_forms and nf3_form_meta tables. Then, it will step over each form on the site, following this process: - New columns in the nf3_forms table will be populated with data from the cache. - New and existing columns in the nf3_form_meta tables will be populated from the cache. - A new record of the cache will be saved to the nf3_upgrades table (if it does not already exist). After completing the above for every form on the site, it will remove the data object that manages its location.

Method
__construct public
Constructor
Param
$data (Array) The data object passed in by the AJAX call.
Param
$running (Array) The array of required updates being run.
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
cleanup public
Function to cleanup any lingering temporary elements of a required update after completion.
Since
3.4.0
Method
end_of_step private
Since
3.4.0
Return
void
Method
update_form private
Update our form table for the current form. We have new table columns, so we want to make sure that those are populated properly.
Also checks meta values against our $this->blacklist.
Since
3.4.0 @updated 3.4.4
Return
[type] [description]
Class

NF_Updates_CacheCollateObjects

Class NF_Updates_CacheCollateForms This class manages the step process of running through the CacheCollateObjects required update. It will define an object to pull data from (if necessary) to pick back up if exited early. It will run an upgrade function to alter the nf3_objects and nf3_object_meta tables. Then, it will step over each object in the db, following this process: - Append the object_title Then, it will step over each object_meta in the db, following this process: - Copy over the meta_key - Append the meta_value After completing the above for every form on the site, it will remove the data object that manages its location.

Method
__construct public
Constructor
Param
$data (Array) The data object passed in by the AJAX call.
Param
$running (Array) The array of required updates being run.
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
cleanup public
Function to cleanup any lingering temporary elements of a required update after completion.
Since
3.4.0
Method
maybe_update_objects private
Function to manage the updating of our objects table.
Return
Void
Since
3.4.0
Method
maybe_update_object_meta private
Function to manage the updating of our object_meta table.
Return
Void
Since
3.4.0
Class

NF_Updates_CacheFieldReconcilliation

Class NF_Updates_CacheFieldReconcilliation This allows us to make sure that the data being saved to the database is in the fields table.

Method
__construct public
Constructor
Param
$data (Array) The data object passed in by the AJAX call.
Param
$running (Array) The array of required updates being run.
Since
3.4.0
Method
process public
Function to loop over the batch.
Since
3.4.0
Method
startup public
Function to run any setup steps necessary to begin processing.
Since
3.4.0
Method
get_fields_this_step public
Method
update_fields public
Update field table records with data from field meta
Method
get_field_meta public
Get meta data to use for updating
Method
get_field_meta_query public
Construct the query to get meta data return String $meta_query
Method
format_field_meta public
Format the data into format that helps us construct the insert/update query
Param
Array $metadata
Return
Array $meta_data
Method
get_update_query public
Construct field update query
Method
cleanup public
Function to cleanup any lingering temporary elements of a required update after completion.
Since
3.4.0
Method
end_of_step private
After we've done our processing, but before we get to step cleanup, we need to store process information.
This method updates our form class var so that it can be passed to the next step. If we've completed this step, it calls the cleanup method.
Since
3.4.0
Return
void
Method
array_squash private
Function to compress our db results into a more useful format.
Param
$data (Array) The result to be compressed.
Return
(Array) Associative if our data was complex. Non-associative if our data was a single item.
Since
UPDATE_VERSION_ON_MERGE
Class

NF_WPCLI_NinjaFormsCommand

The Ninja Forms WP-CLI Command

Method
info /** * Display Ninja Forms Information * * @subcommand info */
Method
create_form public
Creates a Form
## OPTIONS
: The form title. <br /> ## EXAMPLES <br /> wp ninja-forms form "My New Form" <br /> @synopsis <title> @subcommand form @alias create-form </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> list_forms <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> @subcommand list @alias list-forms </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_form <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> @synopsis <id> @subcommand get @alias get-form </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> mock <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Installs mock form data </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> peeking_ninja <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Widget</h3> <p class="text-gray-600 mb-4"> Adds Ninja Forms widget. </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Register widget with WordPress. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> widget <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Front-end display of widget. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> WP_Widget::widget() <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $args Widget arguments. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $instance Saved values from database. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> update <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Sanitize widget form values as they are saved. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> WP_Widget::update() <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $new_instance Values just sent to be saved. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $old_instance Previously saved values from database. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array Updated safe values to be saved. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> form <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Back-end widget form. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> WP_Widget::form() <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $instance Previously saved values from database. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> NF_register_widgets <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Register NF widget * * @see 'widgets_init' */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Widget</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_display_form <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /* |-------------------------------------------------------------------------- | Deprecated Functions |-------------------------------------------------------------------------- */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_get_fields_by_form_id <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_get_all_forms <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Included for backwards compatibility with Visual Composer. */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_is_func_disabled <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> _nf_get_actions <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> _nf_post_actions <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> _nf_removed_hooks <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> // add_action( 'shutdown', '_nf_removed_hooks' ); </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_get_form_by_id <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Conversion_Calculations</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> run <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> reduce_operations <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> reduce_auto_total <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> merge_tag <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> set_tax <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> Sets a float formatted tax rate. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|int|float $tax <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> float|int </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_conversion_calculations <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_AddonChecker</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> check_plugins <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> deactivation_notice <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_AddonChecker</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> run <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_ExceptionHandlerJS</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> wp_head <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Tracking</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> NF_Tracking constructor. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> maybe_opt_in <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Check if an opt in/out action should be performed. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Access</div> public @hook admin_init </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> report_optin <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Report that a user has opted-in. * * @param array $data Dispatch event data. */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> can_opt_in <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> Check if the current user is allowed to opt in on behalf of a site <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> bool </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> is_opted_in <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Check if a site is opted in <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Access</div> public <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> bool </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> opt_in <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Opt In a site for tracking <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Access</div> private <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> null </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> is_opted_out <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Check if a site is opted out <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Access</div> public <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> bool </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> opt_out <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> Opt Out a site from tracking <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Access</div> private <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> null </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> check_setting <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> update_setting <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Tracking</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_ajax_migrate_database <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_ajax_import_form <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_ajax_import_fields <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_VersionSwitcher</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ajax_check <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> version_bypass_check <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> listener <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> admin_bar_menu <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> rollback_activation <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> upgrade_complete_notice <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_VersionSwitcher</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_register_step_processing_page <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Register our step processing admin page. * * @since 2.7.6 * @return void */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_step_processing_css <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Enqueue our step processing CSS. * * @since 2.7.6 * @return void */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_step_processing_js <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Enqueue our step processing JS. * * @since 2.7.6 * @return void */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_output_step_processing_page <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Output our step processing admin page. * * @since 2.7.6 * @return void */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Step_Processing</h3> <p class="text-gray-600 mb-4"> Class for performing actions incrementally. Internally used for converting submissions, exporting submissions, etc. Very useful when interacting with large amounts of data. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Package</div> Ninja Forms <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Subpackage</div> Classes/Step Processing <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Copyright</div> Copyright (c) 2014, WPNINJAS @license http://opensource.org/licenses/gpl-2.0.php GNU Public License <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> 2.7.4 </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Get things rolling * * @since 2.7.4 * @return void */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> processing <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Process our request. Call the appropriate loading or step functions. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> 2.7.6 <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> loading <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Run our loading process. This function should be overwritten in child classes. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> 2.7.4 <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array $args </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> step <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> This function is called for every step. This function should be overwritten in child classes. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> 2.7.4 <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array $args </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> complete <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> This function is called for every step. This function should be overwritten in child classes. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> 2.7.4 <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array $args </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Step_Processing</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_three_table_exists <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">Ninja_Forms</h3> <dl> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> instance <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> init <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> flush_rewrite_rules <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> register_rewrite_rules <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> admin_init <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> maybe_load_public_form <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_plugin_add_suggested_privacy_content <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Privacy policy suggested content for Ninja Forms */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> plugin_get_default_privacy_content <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Return the default suggested privacy policy content. * * @return string The default policy content. */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_php_version_whip_notice <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> NF PHP Version Whip Notice If the user is on a version below PHP 7.2 then we get an instance of the NF PHP Version Whip class which will add a non-dismissible admin notice. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> NF_Php_Version_Whip </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_do_telemetry <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Function to launch our various telemetry calls on admin_init. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> maybe_hide_dashboard_items <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> scrub_available_actions <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_run_promotion_manager <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Call back function for the promo manager cron. Grabs a fresh copy of the promotions and stores them in an option. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_bust_promotion_cache_on_plugin_activation <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Listens for plugin activation and runs check to see if any promotions need to be added or removed. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_promotion_addons_lookup_table <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Build a look up table for the add-ons that have promotions. TODO: maybe come up with a better name for this class. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array of promotions. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_maybe_bust_promotion_cache <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Loops over our add-ons that have promotions and runs the promotion manager class. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> admin_notices <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> plugins_loaded <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> autoloader <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Autoloader <br /> Autoload Ninja Forms classes <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $class_name </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> form <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Form Model Factory Wrapper <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $id <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> NF_Abstracts_ModelFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> logger <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Logger Class Wrapper <br /> Example Use: Ninja_Forms()->logger()->log( 'debug', "Hello, {name}!", array( 'name' => 'world' ) ); Ninja_Forms()->logger()->debug( "Hello, {name}!", array( 'name' => 'world' ) ); <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dispatcher <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> eos <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> session <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> request <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> background_process <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_setting <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Get a setting <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool|false $default <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> bool </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_settings <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Get all the settings <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> update_setting <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Update a setting <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool|false $defer_update Defer the database update of all settings </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> update_settings <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Save settings to database <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $settings </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> display <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Display Wrapper <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $form_id </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> sort_actions <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> load_classes <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> private </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> template <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> config <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> activation <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Activation </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> deprecated_notice <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> remove_completed_updates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Function to deregister already completed updates from the list of required updates. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> 3.3.14 <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $updates (Array) Our array of required updates. <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> $updates (Array) Our array of required updates. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> remove_bad_updates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Function to deregister updates that have required updates that either don't exist, or are malformed <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Since</div> UPDATE_TO_LATEST version <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $updates (Array) Our array of required updates. <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> $updates (Array) Our array of required updates. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> Ninja_Forms <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * The main function responsible for returning The Highlander Ninja_Forms * Instance to functions everywhere. * * Use this function like you would a global variable, except without needing * to declare the global. * * Example: <?php $nf = Ninja_Forms(); ?> * * @since 2.7 * @return Ninja_Forms Highlander Instance */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ninja_forms_uninstall <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_optin_update_environment_vars <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> // Scheduled Action Hook </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_custom_cron_job_recurrence <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Function to register our Custom Cron Recurrences. * * @param $schedules (Array) The available cron recurrences. * @return (Array) The filtered cron recurrences. * * @since * @updated 3.3.17 */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_optin_send_admin_email_cron_job <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> // Schedule Cron Job Event </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_update_marketing_feed <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Function called via weekly wp_cron to update our marketing feeds. * * @since 3.3.17 */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nf_marketing_feed_cron_job <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** * Function called by our marketing feed cron. * * @since 3.3.17 */ </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">OAuth</h3> <dl> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getInstance <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> set_base_url <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> setup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> is_connected <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_client_id <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_client_secret <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> connect_url <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> connect <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> disconnect <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> generate_secret <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">Remote_Installer_Skin</h3> <p class="text-gray-600 mb-4"> A blank plugin installer skin. </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> error <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_errors <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> feedback <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> before <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> after <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">AcceptanceTester</h3> <p class="text-gray-600 mb-4"> Inherited Methods @method void wantToTest($text) @method void wantTo($text) @method void execute($callable) @method void expectTo($prediction) @method void expect($prediction) @method void amGoingTo($argumentation) @method void am($role) @method void lookForwardTo($achieveValue) @method void comment($description) @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) <br /> @SuppressWarnings(PHPMD) </p> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">FunctionalTester</h3> <p class="text-gray-600 mb-4"> Inherited Methods @method void wantToTest($text) @method void wantTo($text) @method void execute($callable) @method void expectTo($prediction) @method void expect($prediction) @method void amGoingTo($argumentation) @method void am($role) @method void lookForwardTo($achieveValue) @method void comment($description) @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) <br /> @SuppressWarnings(PHPMD) </p> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">Acceptance</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nfHideUpdates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">Functional</h3> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">Unit</h3> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">UnitTester</h3> <p class="text-gray-600 mb-4"> Inherited Methods @method void wantToTest($text) @method void wantTo($text) @method void execute($callable) @method void expectTo($prediction) @method void expect($prediction) @method void amGoingTo($argumentation) @method void am($role) @method void lookForwardTo($achieveValue) @method void comment($description) @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) <br /> @SuppressWarnings(PHPMD) </p> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">UnitTester</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getScenario <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> nfHideUpdates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Helper\Acceptance::nfHideUpdates() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getPluginsFolder <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the absolute path to the plugins directory. <br /> The value will first look at the `WP_PLUGIN_DIR` constant, then the `pluginsFolder` configuration parameter and will, finally, look in the default path from the WordPress root directory. <br /> @example ```php $plugins = $this->getPluginsFolder(); $hello = $this->getPluginsFolder('hello.php'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $path A relative path to append to te plugins directory absolute path. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The absolute path to the `pluginsFolder` path or the same with a relative path appended if `$path` is provided. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleConfigException If the path to the plugins folder does not exist. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::getPluginsFolder() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> factory <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Accessor method to get the object storing the factories for things. This methods gives access to the same factories provided by the [Core test suite](https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/). <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> FactoryStore A factory store, proxy to get hold of the Core suite object factories. <br /> @example ```php $postId = $I->factory()->post->create(); $userId = $I->factory()->user->create(['role' => 'administrator']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Link</div> https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/ <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::factory() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getContentFolder <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the absolute path to the WordPress content directory. <br /> @example ```php $content = $this->getContentFolder(); $themes = $this->getContentFolder('themes'); $twentytwenty = $this->getContentFolder('themes/twentytwenty'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $path An optional path to append to the content directory absolute path. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The content directory absolute path, or a path in it. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleConfigException If the path to the content directory cannot be resolved. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::getContentFolder() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> startWpFiltersDebug <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Starts the debug of all WordPress filters and actions. <br /> The method hook on `all` filters and actions to debug their value. <br /> @example ```php // Start debugging all WordPress filters and action final and initial values. $this->startWpFiltersDebug(); <br /> // Run some code firing filters and debug them. <br /> // Stop debugging all WordPress filters and action final and initial values. $this->stopWpFiltersDebug(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> callable|null $format A callback function to format the arguments debug output; the callback will receive the array of arguments as input. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::startWpFiltersDebug() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> stopWpFiltersDebug <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Stops the debug of all WordPress filters and actions. <br /> @example ```php // Start debugging all WordPress filters and action final and initial values. $this->startWpFiltersDebug(); <br /> // Run some code firing filters and debug them. <br /> // Stop debugging all WordPress filters and action final and initial values. $this->stopWpFiltersDebug(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::stopWpFiltersDebug() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> debugWpFilterInitial <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Debugs a single WordPress filter initial call using Codeception debug functions. <br /> The output will show following the selected output verbosity (`--debug` and `-vvv` CLI options). <br /> @example ```php // Start debugging all WordPress filters initial value. add_filter('all', [$this,'debugWpFilterInitial']); <br /> // Run some code firing filters and debug them. <br /> // Stop debugging all WordPress filters initial value. remove_filter('all', [$this,'debugWpFilterInitial']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed ...$args The filter call arguments. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed The filter input value, unchanged. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::debugWpFilterInitial() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> debugWpFilterFinal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Debugs a single WordPress filter final call using Codeception debug functions. <br /> The output will show following the selected output verbosity (`--debug` and `-vvv` CLI options). <br /> @example ```php // Start debugging all WordPress filters final value. add_filter('all', [$this,'debugWpFilterFinal']); <br /> // Run some code firing filters and debug them. <br /> // Stop debugging all WordPress filters final value. remove_filter('all', [$this,'debugWpFilterFinal']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed ...$args The filter call arguments. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed The filter input value, unchanged. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::debugWpFilterFinal() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> debugWpActionInitial <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Debugs a single WordPress action initial call using Codeception debug functions. <br /> The output will show following the selected output verbosity (`--debug` and `-vvv` CLI options). <br /> @example ```php // Start debugging all WordPress actions initial value. add_action('all', [$this,'debugWpActionInitial']); <br /> // Run some code firing actions and debug them. <br /> // Stop debugging all WordPress actions initial value. remove_action('all', [$this,'debugWpActionInitial']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed ...$args The action call arguments. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::debugWpActionInitial() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> debugWpActionFinal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Debugs a single WordPress action final call using Codeception debug functions. <br /> The output will show following the selected output verbosity (`--debug` and `-vvv` CLI options). <br /> @example ```php // Start debugging all WordPress actions final value. add_action('all', [$this,'debugWpActionFinal']); <br /> // Run some code firing actions and debug them. <br /> // Stop debugging all WordPress actions final value. remove_action('all', [$this,'debugWpActionFinal']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed ...$args The action call arguments. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPLoader::debugWpActionFinal() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> loginAsAdmin <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Login as the administrator user using the credentials specified in the module configuration. <br /> The method will <br /><br />not<br /><br /> follow redirection, after the login, to any page. <br /> @example ```php $I->loginAsAdmin(); $I->amOnAdminPage('/'); $I->see('Dashboard'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout The max time, in seconds, to try to login. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $maxAttempts The max number of attempts to try to login. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If all the attempts of obtaining the cookie fail. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::loginAsAdmin() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> loginAs <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Login as the specified user. <br /> The method will <br /><br />not<br /><br /> follow redirection, after the login, to any page. Depending on the driven browser the login might be "too fast" and the server might have not replied with valid cookies yet; in that case the method will re-attempt the login to obtain the cookies. <br /> @example ```php $I->loginAs('user', 'password'); $I->amOnAdminPage('/'); $I->see('Dashboard'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $username The user login name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $password The user password in plain text. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout The max time, in seconds, to try to login. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $maxAttempts The max number of attempts to try to login. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If all the attempts of obtaining the cookie fail. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::loginAs() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabCookiesWithPattern <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns all the cookies whose name matches a regex pattern. <br /> @example ```php $I->loginAs('customer','password'); $I->amOnPage('/shop'); $cartCookies = $I->grabCookiesWithPattern("#^shop_cart\\.<br />#"); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $cookiePattern The regular expression pattern to use for the matching. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<FacebookWebdriverCookie|Cookie>|null An array of cookies matching the pattern. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::grabCookiesWithPattern() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForJqueryAjax <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits for any jQuery triggered AJAX request to be resolved. <br /> @example ```php $I->amOnPage('/triggering-ajax-requests'); $I->waitForJqueryAjax(); $I->see('From AJAX'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $time The max time to wait for AJAX requests to complete. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::waitForJqueryAjax() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabFullUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Grabs the current page full URL including the query vars. <br /> @example ```php $today = date('Y-m-d'); $I->amOnPage('/concerts?date=' . $today); $I->assertRegExp('#\\/concerts$#', $I->grabFullUrl()); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The full page URL. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::grabFullUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> deactivatePlugin <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> In the plugin administration screen deactivate a plugin clicking the "Deactivate" link. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugins administration page. <br /> @example ```php // Deactivate one plugin. $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->deactivatePlugin('hello-dolly'); // Deactivate a list of plugins. $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->deactivatePlugin(['hello-dolly', 'my-plugin']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string> $pluginSlug The plugin slug, like "hello-dolly", or a list of plugin slugs. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::deactivatePlugin() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> activatePlugin <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> In the plugin administration screen activates one or more plugins clicking the "Activate" link. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugins administration page. <br /> @example ```php // Activate a plugin. $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->activatePlugin('hello-dolly'); // Activate a list of plugins. $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->activatePlugin(['hello-dolly','another-plugin']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string> $pluginSlug The plugin slug, like "hello-dolly" or a list of plugin slugs. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::activatePlugin() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> debugWebDriverLogs <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Print out latest Selenium Logs in debug mode <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> \Codeception\TestInterface $test <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::debugWebDriverLogs() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnSubdomain <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Changes the subdomain for the 'url' configuration parameter. Does not open a page; use `amOnPage` for that. <br /> ``` php <?php // If config is: 'http://mysite.com' // or config is: 'http://www.mysite.com' // or config is: 'http://company.mysite.com' <br /> $I->amOnSubdomain('user'); $I->amOnPage('/'); // moves to http://user.mysite.com/ ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $subdomain <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::amOnSubdomain() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> makeScreenshot <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Takes a screenshot of the current window and saves it to `tests/_output/debug`. <br /> ``` php <?php $I->amOnPage('/user/edit'); $I->makeScreenshot('edit_page'); // saved to: tests/_output/debug/edit_page.png $I->makeScreenshot(); // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.png ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::makeScreenshot() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> makeElementScreenshot <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Takes a screenshot of an element of the current window and saves it to `tests/_output/debug`. <br /> ``` php <?php $I->amOnPage('/user/edit'); $I->makeElementScreenshot('#dialog', 'edit_page'); // saved to: tests/_output/debug/edit_page.png $I->makeElementScreenshot('#dialog'); // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.png ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::makeElementScreenshot() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> makeHtmlSnapshot <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Use this method within an [interactive pause](https://codeception.com/docs/02-GettingStarted#Interactive-Pause) to save the HTML source code of the current page. <br /> ```php <?php $I->makeHtmlSnapshot('edit_page'); // saved to: tests/_output/debug/edit_page.html $I->makeHtmlSnapshot(); // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> null $name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::makeHtmlSnapshot() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> resizeWindow <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Resize the current window. <br /> ``` php <?php $I->resizeWindow(800, 600); <br /> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $width <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $height <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::resizeWindow() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a cookie with the given name is set. You can set additional cookie params like `domain`, `path` as array passed in last argument. <br /> ``` php <?php $I->seeCookie('PHPSESSID'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cookie <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a cookie with the given name is set. You can set additional cookie params like `domain`, `path` as array passed in last argument. <br /> ``` php <?php $I->seeCookie('PHPSESSID'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cookie <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that there isn't a cookie with the given name. You can set additional cookie params like `domain`, `path` as array passed in last argument. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cookie <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that there isn't a cookie with the given name. You can set additional cookie params like `domain`, `path` as array passed in last argument. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cookie <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> setCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets a cookie with the given name and value. You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument. <br /> ``` php <?php $I->setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $val <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::setCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> resetCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Unsets cookie with the given name. You can set additional cookie params like `domain`, `path` in array passed as last argument. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cookie <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::resetCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Grabs a cookie value. You can set additional cookie params like `domain`, `path` in array passed as last argument. If the cookie is set by an ajax request (XMLHttpRequest), there might be some delay caused by the browser, so try `$I->wait(0.1)`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cookie <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $params <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabPageSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Grabs current page source code. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException if no page was opened. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string Current page source code. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabPageSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Open web page at the given absolute URL and sets its hostname as the base host. <br /> ``` php <?php $I->amOnUrl('http://codeception.com'); $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart ?> ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::amOnUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Opens the page for the given relative URI. <br /> ``` php <?php // opens front page $I->amOnPage('/'); // opens /register page $I->amOnPage('/register'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $page <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::amOnPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> see <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current page contains the given string (case insensitive). <br /> You can specify a specific HTML element (via CSS or XPath) as the second parameter to only search within that element. <br /> ``` php <?php $I->see('Logout'); // I can suppose user is logged in $I->see('Sign Up', 'h1'); // I can suppose it's a signup page $I->see('Sign Up', '//body/h1'); // with XPath $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator ``` <br /> Note that the search is done after stripping all HTML tags from the body, so `$I->see('strong')` will return true for strings like: <br /> - `<p>I am Stronger than thou</p>` - `<script>document.createElement('strong');</script>` <br /> But will <br />not<br /> be true for strings like: <br /> - `<strong>Home</strong>` - `<div class="strong">Home</strong>` - `<!-- strong -->` <br /> For checking the raw source code, use `seeInSource()`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array|string $selector optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::see() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSee <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current page contains the given string (case insensitive). <br /> You can specify a specific HTML element (via CSS or XPath) as the second parameter to only search within that element. <br /> ``` php <?php $I->see('Logout'); // I can suppose user is logged in $I->see('Sign Up', 'h1'); // I can suppose it's a signup page $I->see('Sign Up', '//body/h1'); // with XPath $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator ``` <br /> Note that the search is done after stripping all HTML tags from the body, so `$I->see('strong')` will return true for strings like: <br /> - `<p>I am Stronger than thou</p>` - `<script>document.createElement('strong');</script>` <br /> But will <br />not<br /> be true for strings like: <br /> - `<strong>Home</strong>` - `<div class="strong">Home</strong>` - `<!-- strong -->` <br /> For checking the raw source code, use `seeInSource()`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array|string $selector optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::see() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSee <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current page doesn't contain the text specified (case insensitive). Give a locator as the second parameter to match a specific region. <br /> ```php <?php $I->dontSee('Login'); // I can suppose user is already logged in $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page $I->dontSee('Sign Up','//body/h1'); // with XPath $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator ``` <br /> Note that the search is done after stripping all HTML tags from the body, so `$I->dontSee('strong')` will fail on strings like: <br /> - `<p>I am Stronger than thou</p>` - `<script>document.createElement('strong');</script>` <br /> But will ignore strings like: <br /> - `<strong>Home</strong>` - `<div class="strong">Home</strong>` - `<!-- strong -->` <br /> For checking the raw source code, use `seeInSource()`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array|string $selector optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSee() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSee <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current page doesn't contain the text specified (case insensitive). Give a locator as the second parameter to match a specific region. <br /> ```php <?php $I->dontSee('Login'); // I can suppose user is already logged in $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page $I->dontSee('Sign Up','//body/h1'); // with XPath $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator ``` <br /> Note that the search is done after stripping all HTML tags from the body, so `$I->dontSee('strong')` will fail on strings like: <br /> - `<p>I am Stronger than thou</p>` - `<script>document.createElement('strong');</script>` <br /> But will ignore strings like: <br /> - `<strong>Home</strong>` - `<div class="strong">Home</strong>` - `<!-- strong -->` <br /> For checking the raw source code, use `seeInSource()`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array|string $selector optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSee() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current page contains the given string in its raw source code. <br /> ``` php <?php $I->seeInSource('<h1>Green eggs & ham</h1>'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $raw <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current page contains the given string in its raw source code. <br /> ``` php <?php $I->seeInSource('<h1>Green eggs & ham</h1>'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $raw <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current page contains the given string in its raw source code. <br /> ```php <?php $I->dontSeeInSource('<h1>Green eggs & ham</h1>'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $raw <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current page contains the given string in its raw source code. <br /> ```php <?php $I->dontSeeInSource('<h1>Green eggs & ham</h1>'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $raw <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInPageSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the page source contains the given string. <br /> ```php <?php $I->seeInPageSource('<link rel="apple-touch-icon"'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInPageSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInPageSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the page source contains the given string. <br /> ```php <?php $I->seeInPageSource('<link rel="apple-touch-icon"'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInPageSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInPageSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the page source doesn't contain the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInPageSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInPageSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the page source doesn't contain the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInPageSource() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> click <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Perform a click on a link or a button, given by a locator. If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. For buttons, the "value" attribute, "name" attribute, and inner text are searched. For links, the link text is searched. For images, the "alt" attribute and inner text of any parent links are searched. <br /> The second parameter is a context (CSS or XPath locator) to narrow the search. <br /> Note that if the locator matches a button of type `submit`, the form will be submitted. <br /> ``` php <?php // simple link $I->click('Logout'); // button of form $I->click('Submit'); // CSS button $I->click('#form input[type=submit]'); // XPath $I->click('//form[@type="submit"]'); // link in context $I->click('Logout', '#nav'); // using strict locator $I->click(['link' => 'Login']); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $link <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $context <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::click() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeLink <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that there's a link with the specified text. Give a full URL as the second parameter to match links with that exact URL. <br /> ``` php <?php $I->seeLink('Logout'); // matches <a href="#">Logout</a> $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a> ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $url optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeLink() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeLink <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that there's a link with the specified text. Give a full URL as the second parameter to match links with that exact URL. <br /> ``` php <?php $I->seeLink('Logout'); // matches <a href="#">Logout</a> $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a> ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $url optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeLink() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeLink <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the page doesn't contain a link with the given string. If the second parameter is given, only links with a matching "href" attribute will be checked. <br /> ``` php <?php $I->dontSeeLink('Logout'); // I suppose user is not logged in $I->dontSeeLink('Checkout now', '/store/cart.php'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $url optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeLink() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeLink <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the page doesn't contain a link with the given string. If the second parameter is given, only links with a matching "href" attribute will be checked. <br /> ``` php <?php $I->dontSeeLink('Logout'); // I suppose user is not logged in $I->dontSeeLink('Checkout now', '/store/cart.php'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $url optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeLink() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInCurrentUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that current URI contains the given string. <br /> ``` php <?php // to match: /home/dashboard $I->seeInCurrentUrl('home'); // to match: /users/1 $I->seeInCurrentUrl('/users/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInCurrentUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInCurrentUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that current URI contains the given string. <br /> ``` php <?php // to match: /home/dashboard $I->seeInCurrentUrl('home'); // to match: /users/1 $I->seeInCurrentUrl('/users/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInCurrentUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeCurrentUrlEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current URL is equal to the given string. Unlike `seeInCurrentUrl`, this only matches the full URL. <br /> ``` php <?php // to match root url $I->seeCurrentUrlEquals('/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCurrentUrlEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeCurrentUrlEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current URL is equal to the given string. Unlike `seeInCurrentUrl`, this only matches the full URL. <br /> ``` php <?php // to match root url $I->seeCurrentUrlEquals('/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCurrentUrlEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeCurrentUrlMatches <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current URL matches the given regular expression. <br /> ``` php <?php // to match root url $I->seeCurrentUrlMatches('~^/users/(\d+)~'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCurrentUrlMatches() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeCurrentUrlMatches <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current URL matches the given regular expression. <br /> ``` php <?php // to match root url $I->seeCurrentUrlMatches('~^/users/(\d+)~'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCurrentUrlMatches() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInCurrentUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current URI doesn't contain the given string. <br /> ``` php <?php $I->dontSeeInCurrentUrl('/users/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInCurrentUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInCurrentUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current URI doesn't contain the given string. <br /> ``` php <?php $I->dontSeeInCurrentUrl('/users/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInCurrentUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeCurrentUrlEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current URL doesn't equal the given string. Unlike `dontSeeInCurrentUrl`, this only matches the full URL. <br /> ``` php <?php // current url is not root $I->dontSeeCurrentUrlEquals('/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeCurrentUrlEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current URL doesn't equal the given string. Unlike `dontSeeInCurrentUrl`, this only matches the full URL. <br /> ``` php <?php // current url is not root $I->dontSeeCurrentUrlEquals('/'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeCurrentUrlMatches <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that current url doesn't match the given regular expression. <br /> ``` php <?php // to match root url $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeCurrentUrlMatches <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that current url doesn't match the given regular expression. <br /> ``` php <?php // to match root url $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabFromCurrentUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Executes the given regular expression against the current URI and returns the first capturing group. If no parameters are provided, the full URI is returned. <br /> ``` php <?php $user_id = $I->grabFromCurrentUrl('~^/user/(\d+)/~'); $uri = $I->grabFromCurrentUrl(); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $uri optional <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabFromCurrentUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeCheckboxIsChecked <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the specified checkbox is checked. <br /> ``` php <?php $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $checkbox <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCheckboxIsChecked() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeCheckboxIsChecked <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the specified checkbox is checked. <br /> ``` php <?php $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $checkbox <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeCheckboxIsChecked() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeCheckboxIsChecked <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Check that the specified checkbox is unchecked. <br /> ``` php <?php $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $checkbox <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeCheckboxIsChecked <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Check that the specified checkbox is unchecked. <br /> ``` php <?php $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $checkbox <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the given input field or textarea <br />equals<br /> (i.e. not just contains) the given value. Fields are matched by label text, the "name" attribute, CSS, or XPath. <br /> ``` php <?php $I->seeInField('Body','Type your comment here'); $I->seeInField('form textarea[name=body]','Type your comment here'); $I->seeInField('form input[type=hidden]','hidden_value'); $I->seeInField('#searchform input','Search'); $I->seeInField('//form[@name=search]','Search'); $I->seeInField(['name' => 'search'], 'Search'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the given input field or textarea <br />equals<br /> (i.e. not just contains) the given value. Fields are matched by label text, the "name" attribute, CSS, or XPath. <br /> ``` php <?php $I->seeInField('Body','Type your comment here'); $I->seeInField('form textarea[name=body]','Type your comment here'); $I->seeInField('form input[type=hidden]','hidden_value'); $I->seeInField('#searchform input','Search'); $I->seeInField('//form[@name=search]','Search'); $I->seeInField(['name' => 'search'], 'Search'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that an input field or textarea doesn't contain the given value. For fuzzy locators, the field is matched by label text, CSS and XPath. <br /> ``` php <?php $I->dontSeeInField('Body','Type your comment here'); $I->dontSeeInField('form textarea[name=body]','Type your comment here'); $I->dontSeeInField('form input[type=hidden]','hidden_value'); $I->dontSeeInField('#searchform input','Search'); $I->dontSeeInField('//form[@name=search]','Search'); $I->dontSeeInField(['name' => 'search'], 'Search'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that an input field or textarea doesn't contain the given value. For fuzzy locators, the field is matched by label text, CSS and XPath. <br /> ``` php <?php $I->dontSeeInField('Body','Type your comment here'); $I->dontSeeInField('form textarea[name=body]','Type your comment here'); $I->dontSeeInField('form input[type=hidden]','hidden_value'); $I->dontSeeInField('#searchform input','Search'); $I->dontSeeInField('//form[@name=search]','Search'); $I->dontSeeInField(['name' => 'search'], 'Search'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInFormFields <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks if the array of form parameters (name => value) are set on the form matched with the passed selector. <br /> ``` php <?php $I->seeInFormFields('form[name=myform]', [ 'input1' => 'value', 'input2' => 'other value', ]); ?> ``` <br /> For multi-select elements, or to check values of multiple elements with the same name, an array may be passed: <br /> ``` php <?php $I->seeInFormFields('.form-class', [ 'multiselect' => [ 'value1', 'value2', ], 'checkbox[]' => [ 'a checked value', 'another checked value', ], ]); ?> ``` <br /> Additionally, checkbox values can be checked with a boolean. <br /> ``` php <?php $I->seeInFormFields('#form-id', [ 'checkbox1' => true, // passes if checked 'checkbox2' => false, // passes if unchecked ]); ?> ``` <br /> Pair this with submitForm for quick testing magic. <br /> ``` php <?php $form = [ 'field1' => 'value', 'field2' => 'another value', 'checkbox1' => true, // ... ]; $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); // $I->amOnPage('/path/to/form-page') may be needed $I->seeInFormFields('//form[@id=my-form]', $form); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $formSelector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $params <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInFormFields() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInFormFields <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks if the array of form parameters (name => value) are set on the form matched with the passed selector. <br /> ``` php <?php $I->seeInFormFields('form[name=myform]', [ 'input1' => 'value', 'input2' => 'other value', ]); ?> ``` <br /> For multi-select elements, or to check values of multiple elements with the same name, an array may be passed: <br /> ``` php <?php $I->seeInFormFields('.form-class', [ 'multiselect' => [ 'value1', 'value2', ], 'checkbox[]' => [ 'a checked value', 'another checked value', ], ]); ?> ``` <br /> Additionally, checkbox values can be checked with a boolean. <br /> ``` php <?php $I->seeInFormFields('#form-id', [ 'checkbox1' => true, // passes if checked 'checkbox2' => false, // passes if unchecked ]); ?> ``` <br /> Pair this with submitForm for quick testing magic. <br /> ``` php <?php $form = [ 'field1' => 'value', 'field2' => 'another value', 'checkbox1' => true, // ... ]; $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); // $I->amOnPage('/path/to/form-page') may be needed $I->seeInFormFields('//form[@id=my-form]', $form); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $formSelector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $params <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInFormFields() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInFormFields <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks if the array of form parameters (name => value) are not set on the form matched with the passed selector. <br /> ``` php <?php $I->dontSeeInFormFields('form[name=myform]', [ 'input1' => 'non-existent value', 'input2' => 'other non-existent value', ]); ?> ``` <br /> To check that an element hasn't been assigned any one of many values, an array can be passed as the value: <br /> ``` php <?php $I->dontSeeInFormFields('.form-class', [ 'fieldName' => [ 'This value shouldn\'t be set', 'And this value shouldn\'t be set', ], ]); ?> ``` <br /> Additionally, checkbox values can be checked with a boolean. <br /> ``` php <?php $I->dontSeeInFormFields('#form-id', [ 'checkbox1' => true, // fails if checked 'checkbox2' => false, // fails if unchecked ]); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $formSelector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $params <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInFormFields() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInFormFields <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks if the array of form parameters (name => value) are not set on the form matched with the passed selector. <br /> ``` php <?php $I->dontSeeInFormFields('form[name=myform]', [ 'input1' => 'non-existent value', 'input2' => 'other non-existent value', ]); ?> ``` <br /> To check that an element hasn't been assigned any one of many values, an array can be passed as the value: <br /> ``` php <?php $I->dontSeeInFormFields('.form-class', [ 'fieldName' => [ 'This value shouldn\'t be set', 'And this value shouldn\'t be set', ], ]); ?> ``` <br /> Additionally, checkbox values can be checked with a boolean. <br /> ``` php <?php $I->dontSeeInFormFields('#form-id', [ 'checkbox1' => true, // fails if checked 'checkbox2' => false, // fails if unchecked ]); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $formSelector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $params <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInFormFields() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> selectOption <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Selects an option in a select tag or in radio button group. <br /> ``` php <?php $I->selectOption('form select[name=account]', 'Premium'); $I->selectOption('form input[name=payment]', 'Monthly'); $I->selectOption('//form/select[@name=account]', 'Monthly'); ?> ``` <br /> Provide an array for the second argument to select multiple options: <br /> ``` php <?php $I->selectOption('Which OS do you use?', array('Windows','Linux')); ?> ``` <br /> Or provide an associative array for the second argument to specifically define which selection method should be used: <br /> ``` php <?php $I->selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows' $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows' ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $select <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $option <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::selectOption() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> unselectOption <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Unselect an option in the given select box. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $select <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $option <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::unselectOption() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> checkOption <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Ticks a checkbox. For radio buttons, use the `selectOption` method instead. <br /> ``` php <?php $I->checkOption('#agree'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $option <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::checkOption() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> uncheckOption <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Unticks a checkbox. <br /> ``` php <?php $I->uncheckOption('#notify'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $option <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::uncheckOption() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> fillField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Fills a text field or textarea with the given string. <br /> ``` php <?php $I->fillField("//input[@type='text']", "Hello World!"); $I->fillField(['name' => 'email'], 'jon@example.com'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::fillField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> clearField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Clears given field which isn't empty. <br /> ``` php <?php $I->clearField('#username'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::clearField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> attachFile <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Attaches a file relative to the Codeception `_data` directory to the given file upload field. <br /> ``` php <?php // file is stored in 'tests/_data/prices.xls' $I->attachFile('input[@type="file"]', 'prices.xls'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $filename <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::attachFile() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTextFrom <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Finds and returns the text contents of the given element. If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression. <br /> ``` php <?php $heading = $I->grabTextFrom('h1'); $heading = $I->grabTextFrom('descendant-or-self::h1'); $value = $I->grabTextFrom('~<input value=(.<br />?)]~sgi'); // match with a regex ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cssOrXPathOrRegex <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabTextFrom() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabAttributeFrom <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Grabs the value of the given attribute value from the given element. Fails if element is not found. <br /> ``` php <?php $I->grabAttributeFrom('#tooltip', 'title'); ?> ``` <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cssOrXpath <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $attribute <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabAttributeFrom() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabValueFrom <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Finds the value for the given form field. If a fuzzy locator is used, the field is found by field name, CSS, and XPath. <br /> ``` php <?php $name = $I->grabValueFrom('Name'); $name = $I->grabValueFrom('input[name=username]'); $name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']'); $name = $I->grabValueFrom(['name' => 'username']); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $field <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabValueFrom() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabMultiple <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Grabs either the text content, or attribute values, of nodes matched by $cssOrXpath and returns them as an array. <br /> ```html <a href="#first">First</a> <a href="#second">Second</a> <a href="#third">Third</a> ``` <br /> ```php <?php // would return ['First', 'Second', 'Third'] $aLinkText = $I->grabMultiple('a'); <br /> // would return ['#first', '#second', '#third'] $aLinks = $I->grabMultiple('a', 'href'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cssOrXpath <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $attribute <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string[] <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::grabMultiple() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeElement <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the given element exists on the page and is visible. You can also specify expected attributes of this element. <br /> ``` php <?php $I->seeElement('.error'); $I->seeElement('//form/input[1]'); $I->seeElement('input', ['name' => 'login']); $I->seeElement('input', ['value' => '123456']); <br /> // strict locator in first arg, attributes in second $I->seeElement(['css' => 'form input'], ['name' => 'login']); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeElement() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeElement <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the given element exists on the page and is visible. You can also specify expected attributes of this element. <br /> ``` php <?php $I->seeElement('.error'); $I->seeElement('//form/input[1]'); $I->seeElement('input', ['name' => 'login']); $I->seeElement('input', ['value' => '123456']); <br /> // strict locator in first arg, attributes in second $I->seeElement(['css' => 'form input'], ['name' => 'login']); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeElement() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeElement <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the given element is invisible or not present on the page. You can also specify expected attributes of this element. <br /> ``` php <?php $I->dontSeeElement('.error'); $I->dontSeeElement('//form/input[1]'); $I->dontSeeElement('input', ['name' => 'login']); $I->dontSeeElement('input', ['value' => '123456']); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeElement() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeElement <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the given element is invisible or not present on the page. You can also specify expected attributes of this element. <br /> ``` php <?php $I->dontSeeElement('.error'); $I->dontSeeElement('//form/input[1]'); $I->dontSeeElement('input', ['name' => 'login']); $I->dontSeeElement('input', ['value' => '123456']); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeElement() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeElementInDOM <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the given element exists on the page, even it is invisible. <br /> ``` php <?php $I->seeElementInDOM('//form/input[type=hidden]'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeElementInDOM() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeElementInDOM <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the given element exists on the page, even it is invisible. <br /> ``` php <?php $I->seeElementInDOM('//form/input[type=hidden]'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeElementInDOM() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeElementInDOM <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Opposite of `seeElementInDOM`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeElementInDOM() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeElementInDOM <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Opposite of `seeElementInDOM`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $attributes <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeElementInDOM() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeNumberOfElements <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that there are a certain number of elements matched by the given locator on the page. <br /> ``` php <?php $I->seeNumberOfElements('tr', 10); $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements ?> ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $expected int or int[] <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeNumberOfElements() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeNumberOfElements <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that there are a certain number of elements matched by the given locator on the page. <br /> ``` php <?php $I->seeNumberOfElements('tr', 10); $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements ?> ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $expected int or int[] <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeNumberOfElements() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeNumberOfElementsInDOM <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeNumberOfElementsInDOM() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeNumberOfElementsInDOM <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeNumberOfElementsInDOM() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeOptionIsSelected <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the given option is selected. <br /> ``` php <?php $I->seeOptionIsSelected('#form input[name=payment]', 'Visa'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $optionText <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeOptionIsSelected() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeOptionIsSelected <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the given option is selected. <br /> ``` php <?php $I->seeOptionIsSelected('#form input[name=payment]', 'Visa'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $optionText <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeOptionIsSelected() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeOptionIsSelected <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the given option is not selected. <br /> ``` php <?php $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $optionText <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeOptionIsSelected() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeOptionIsSelected <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the given option is not selected. <br /> ``` php <?php $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $optionText <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeOptionIsSelected() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInTitle <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the page title contains the given string. <br /> ``` php <?php $I->seeInTitle('Blog - Post #1'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $title <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInTitle() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInTitle <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the page title contains the given string. <br /> ``` php <?php $I->seeInTitle('Blog - Post #1'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $title <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInTitle() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInTitle <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the page title does not contain the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $title <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInTitle() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInTitle <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the page title does not contain the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $title <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInTitle() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> acceptPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Accepts the active JavaScript native popup window, as created by `window.alert`|`window.confirm`|`window.prompt`. Don't confuse popups with modal windows, as created by [various libraries](http://jster.net/category/windows-modals-popups). <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::acceptPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cancelPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Dismisses the active JavaScript popup, as created by `window.alert`, `window.confirm`, or `window.prompt`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::cancelPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ModuleException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ModuleException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::seeInPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`, does NOT contain the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ModuleException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the active JavaScript popup, as created by `window.alert`|`window.confirm`|`window.prompt`, does NOT contain the given string. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $text <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ModuleException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dontSeeInPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> typeInPopup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Enters text into a native JavaScript prompt popup, as created by `window.prompt`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $keys <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ModuleException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::typeInPopup() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> reloadPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Reloads the current page. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::reloadPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> moveBack <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Moves back in history. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::moveBack() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> moveForward <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Moves forward in history. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::moveForward() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> submitForm <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Submits the given form on the page, optionally with the given form values. Give the form fields values as an array. Note that hidden fields can't be accessed. <br /> Skipped fields will be filled by their values from the page. You don't need to click the 'Submit' button afterwards. This command itself triggers the request to form's action. <br /> You can optionally specify what button's value to include in the request with the last parameter as an alternative to explicitly setting its value in the second parameter, as button values are not otherwise included in the request. <br /> Examples: <br /> ``` php <?php $I->submitForm('#login', [ 'login' => 'davert', 'password' => '123456' ]); // or $I->submitForm('#login', [ 'login' => 'davert', 'password' => '123456' ], 'submitButtonName'); <br /> ``` <br /> For example, given this sample "Sign Up" form: <br /> ``` html <form action="/sign_up"> Login: <input type="text" name="user[login]" /><br/> Password: <input type="password" name="user[password]" /><br/> Do you agree to our terms? <input type="checkbox" name="user[agree]" /><br/> Select pricing plan: <select name="plan"> <option value="1">Free</option> <option value="2" selected="selected">Paid</option> </select> <input type="submit" name="submitButton" value="Submit" /> </form> ``` <br /> You could write the following to submit it: <br /> ``` php <?php $I->submitForm( '#userForm', [ 'user[login]' => 'Davert', 'user[password]' => '123456', 'user[agree]' => true ], 'submitButton' ); ``` Note that "2" will be the submitted value for the "plan" field, as it is the selected option. <br /> Also note that this differs from PhpBrowser, in that ```'user' => [ 'login' => 'Davert' ]``` is not supported at the moment. Named array keys <br />must<br /> be included in the name as above. <br /> Pair this with seeInFormFields for quick testing magic. <br /> ``` php <?php $form = [ 'field1' => 'value', 'field2' => 'another value', 'checkbox1' => true, // ... ]; $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); // $I->amOnPage('/path/to/form-page') may be needed $I->seeInFormFields('//form[@id=my-form]', $form); ?> ``` <br /> Parameter values must be set to arrays for multiple input fields of the same name, or multi-select combo boxes. For checkboxes, either the string value can be used, or boolean values which will be replaced by the checkbox's value in the DOM. <br /> ``` php <?php $I->submitForm('#my-form', [ 'field1' => 'value', 'checkbox' => [ 'value of first checkbox', 'value of second checkbox', ], 'otherCheckboxes' => [ true, false, false, ], 'multiselect' => [ 'first option value', 'second option value', ] ]); ?> ``` <br /> Mixing string and boolean values for a checkbox's value is not supported and may produce unexpected results. <br /> Field names ending in "[]" must be passed without the trailing square bracket characters, and must contain an array for its value. This allows submitting multiple values with the same name, consider: <br /> ```php $I->submitForm('#my-form', [ 'field[]' => 'value', 'field[]' => 'another value', // 'field[]' is already a defined key ]); ``` <br /> The solution is to pass an array value: <br /> ```php // this way both values are submitted $I->submitForm('#my-form', [ 'field' => [ 'value', 'another value', ] ]); ``` <br /> The `$button` parameter can be either a string, an array or an instance of Facebook\WebDriver\WebDriverBy. When it is a string, the button will be found by its "name" attribute. If $button is an array then it will be treated as a strict selector and a WebDriverBy will be used verbatim. <br /> For example, given the following HTML: <br /> ``` html <input type="submit" name="submitButton" value="Submit" /> ``` <br /> `$button` could be any one of the following: - 'submitButton' - ['name' => 'submitButton'] - WebDriverBy::name('submitButton') <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $params <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $button <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::submitForm() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForElementChange <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits up to $timeout seconds for the given element to change. Element "change" is determined by a callback function which is called repeatedly until the return value evaluates to true. <br /> ``` php <?php use \Facebook\WebDriver\WebDriverElement $I->waitForElementChange('#menu', function(WebDriverElement $el) { return $el->isDisplayed(); }, 100); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> \Closure $callback <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForElementChange() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForElement <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits up to $timeout seconds for an element to appear on the page. If the element doesn't appear, a timeout exception is thrown. <br /> ``` php <?php $I->waitForElement('#agree_button', 30); // secs $I->click('#agree_button'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForElement() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForElementVisible <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits up to $timeout seconds for the given element to be visible on the page. If element doesn't appear, a timeout exception is thrown. <br /> ``` php <?php $I->waitForElementVisible('#agree_button', 30); // secs $I->click('#agree_button'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForElementVisible() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForElementNotVisible <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits up to $timeout seconds for the given element to become invisible. If element stays visible, a timeout exception is thrown. <br /> ``` php <?php $I->waitForElementNotVisible('#agree_button', 30); // secs ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForElementNotVisible() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForElementClickable <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits up to $timeout seconds for the given element to be clickable. If element doesn't become clickable, a timeout exception is thrown. <br /> ``` php <?php $I->waitForElementClickable('#agree_button', 30); // secs $I->click('#agree_button'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForElementClickable() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForText <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits up to $timeout seconds for the given string to appear on the page. <br /> Can also be passed a selector to search in, be as specific as possible when using selectors. waitForText() will only watch the first instance of the matching selector / text provided. If the given text doesn't appear, a timeout exception is thrown. <br /> ``` php <?php $I->waitForText('foo', 30); // secs $I->waitForText('foo', 30, '.title'); // secs ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $text <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $selector optional <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForText() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> wait <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Wait for $timeout seconds. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|float $timeout secs <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\TestRuntimeException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::wait() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> executeInSelenium <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Low-level API method. If Codeception commands are not enough, this allows you to use Selenium WebDriver methods directly: <br /> ``` php $I->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) { $webdriver->get('http://google.com'); }); ``` <br /> This runs in the context of the [RemoteWebDriver class](https://github.com/php-webdriver/php-webdriver/blob/master/lib/remote/RemoteWebDriver.php). Try not to use this command on a regular basis. If Codeception lacks a feature you need, please implement it and submit a patch. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> callable $function <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::executeInSelenium() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> switchToWindow <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Switch to another window identified by name. <br /> The window can only be identified by name. If the $name parameter is blank, the parent window will be used. <br /> Example: ``` html <input type="button" value="Open window" onclick="window.open('http://example.com', 'another_window')"> ``` <br /> ``` php <?php $I->click("Open window"); # switch to another window $I->switchToWindow("another_window"); # switch to parent window $I->switchToWindow(); ?> ``` <br /> If the window has no name, match it by switching to next active tab using `switchToNextTab` method. <br /> Or use native Selenium functions to get access to all opened windows: <br /> ``` php <?php $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) { $handles=$webdriver->getWindowHandles(); $last_window = end($handles); $webdriver->switchTo()->window($last_window); }); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::switchToWindow() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> switchToIFrame <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Switch to another iframe on the page. <br /> Example: ``` html <iframe name="another_frame" id="fr1" src="http://example.com"> <br /> ``` <br /> ``` php <?php # switch to iframe by name $I->switchToIFrame("another_frame"); # switch to iframe by CSS or XPath $I->switchToIFrame("#fr1"); # switch to parent page $I->switchToIFrame(); <br /> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $locator (name, CSS or XPath) <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::switchToIFrame() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> switchToFrame <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Switch to another frame on the page. <br /> Example: ``` html <frame name="another_frame" id="fr1" src="http://example.com"> <br /> ``` <br /> ``` php <?php # switch to frame by name $I->switchToFrame("another_frame"); # switch to frame by CSS or XPath $I->switchToFrame("#fr1"); # switch to parent page $I->switchToFrame(); <br /> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $locator (name, CSS or XPath) <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::switchToFrame() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> waitForJS <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Executes JavaScript and waits up to $timeout seconds for it to return true. <br /> In this example we will wait up to 60 seconds for all jQuery AJAX requests to finish. <br /> ``` php <?php $I->waitForJS("return $.active == 0;", 60); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $script <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout seconds <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::waitForJS() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> executeJS <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Executes custom JavaScript. <br /> This example uses jQuery to get a value and assigns that value to a PHP variable: <br /> ```php <?php $myVar = $I->executeJS('return $("#myField").val()'); <br /> // additional arguments can be passed as array // Example shows `Hello World` alert: $I->executeJS("window.alert(arguments[0])", ['Hello world']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $script <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $arguments <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::executeJS() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> executeAsyncJS <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Executes asynchronous JavaScript. A callback should be executed by JavaScript to exit from a script. Callback is passed as a last element in `arguments` array. Additional arguments can be passed as array in second parameter. <br /> ```js // wait for 1200 milliseconds my running `setTimeout` <br /> $I->executeAsyncJS('setTimeout(arguments[0], 1200)'); <br /> $seconds = 1200; // or seconds are passed as argument $I->executeAsyncJS('setTimeout(arguments[1], arguments[0])', [$seconds]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $script <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $arguments <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::executeAsyncJS() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> maximizeWindow <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Maximizes the current window. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::maximizeWindow() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dragAndDrop <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Performs a simple mouse drag-and-drop operation. <br /> ``` php <?php $I->dragAndDrop('#drag', '#drop'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $source (CSS ID or XPath) <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $target (CSS ID or XPath) <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::dragAndDrop() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> moveMouseOver <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Move mouse over the first element matched by the given locator. If the first parameter null then the page is used. If the second and third parameters are given, then the mouse is moved to an offset of the element's top-left corner. Otherwise, the mouse is moved to the center of the element. <br /> ``` php <?php $I->moveMouseOver(['css' => '.checkout']); $I->moveMouseOver(null, 20, 50); $I->moveMouseOver(['css' => '.checkout'], 20, 50); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $cssOrXPath css or xpath of the web element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetX <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetY <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::moveMouseOver() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> clickWithLeftButton <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Performs click with the left mouse button on an element. If the first parameter `null` then the offset is relative to the actual mouse position. If the second and third parameters are given, then the mouse is moved to an offset of the element's top-left corner. Otherwise, the mouse is moved to the center of the element. <br /> ``` php <?php $I->clickWithLeftButton(['css' => '.checkout']); $I->clickWithLeftButton(null, 20, 50); $I->clickWithLeftButton(['css' => '.checkout'], 20, 50); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $cssOrXPath css or xpath of the web element (body by default). <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetX <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetY <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::clickWithLeftButton() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> clickWithRightButton <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Performs contextual click with the right mouse button on an element. If the first parameter `null` then the offset is relative to the actual mouse position. If the second and third parameters are given, then the mouse is moved to an offset of the element's top-left corner. Otherwise, the mouse is moved to the center of the element. <br /> ``` php <?php $I->clickWithRightButton(['css' => '.checkout']); $I->clickWithRightButton(null, 20, 50); $I->clickWithRightButton(['css' => '.checkout'], 20, 50); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $cssOrXPath css or xpath of the web element (body by default). <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetX <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetY <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::clickWithRightButton() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> doubleClick <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Performs a double-click on an element matched by CSS or XPath. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $cssOrXPath <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::doubleClick() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> pressKey <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Presses the given key on the given element. To specify a character and modifier (e.g. <kbd>Ctrl</kbd>, Alt, Shift, Meta), pass an array for `$char` with the modifier as the first element and the character as the second. For special keys, use the constants from [`Facebook\WebDriver\WebDriverKeys`](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php). <br /> ``` php <?php // <input id="page" value="old" /> $I->pressKey('#page','a'); // => olda $I->pressKey('#page',array('ctrl','a'),'new'); //=> new $I->pressKey('#page',array('shift','111'),'1','x'); //=> old!!!1x $I->pressKey('descendant-or-self::<br />[@id='page']','u'); //=> oldu $I->pressKey('#name', array('ctrl', 'a'), \Facebook\WebDriver\WebDriverKeys::DELETE); //=>'' ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $char string|array Can be char or array with modifier. You can provide several chars. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::pressKey() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> appendField <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Append the given text to the given element. Can also add a selection to a select box. <br /> ``` php <?php $I->appendField('#mySelectbox', 'SelectValue'); $I->appendField('#myTextField', 'appended'); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $field <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $value <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Codeception\Exception\ElementNotFound <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::appendField() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> saveSessionSnapshot <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Saves current cookies into named snapshot in order to restore them in other tests This is useful to save session state between tests. For example, if user needs log in to site for each test this scenario can be executed once while other tests can just restore saved cookies. <br /> ``` php <?php // inside AcceptanceTester class: <br /> public function login() { // if snapshot exists - skipping login if ($I->loadSessionSnapshot('login')) return; <br /> // logging in $I->amOnPage('/login'); $I->fillField('name', 'jon'); $I->fillField('password', '123345'); $I->click('Login'); <br /> // saving snapshot $I->saveSessionSnapshot('login'); } ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $name <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::saveSessionSnapshot() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> loadSessionSnapshot <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Loads cookies from a saved snapshot. Allows to reuse same session across tests without additional login. <br /> See [saveSessionSnapshot](#saveSessionSnapshot) <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $name <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::loadSessionSnapshot() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> deleteSessionSnapshot <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Deletes session snapshot. <br /> See [saveSessionSnapshot](#saveSessionSnapshot) <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $name <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::deleteSessionSnapshot() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> scrollTo <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Move to the middle of the given element matched by the given locator. Extra shift, calculated from the top-left corner of the element, can be set by passing $offsetX and $offsetY parameters. <br /> ``` php <?php $I->scrollTo(['css' => '.checkout'], 20, 50); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $selector <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetX <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offsetY <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::scrollTo() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> openNewTab <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Opens a new browser tab and switches to it. <br /> ```php <?php $I->openNewTab(); ``` The tab is opened with JavaScript's `window.open()`, which means: <br /> Some adblockers might restrict it. <br /> The sessionStorage is copied to the new tab (contrary to a tab that was manually opened by the user) <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::openNewTab() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> closeTab <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Closes current browser tab and switches to previous active tab. <br /> ```php <?php $I->closeTab(); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::closeTab() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> switchToNextTab <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Switches to next browser tab. An offset can be specified. <br /> ```php <?php // switch to next tab $I->switchToNextTab(); // switch to 2nd next tab $I->switchToNextTab(2); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offset 1 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::switchToNextTab() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> switchToPreviousTab <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Switches to previous browser tab. An offset can be specified. <br /> ```php <?php // switch to previous tab $I->switchToPreviousTab(); // switch to 2nd previous tab $I->switchToPreviousTab(2); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $offset 1 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::switchToPreviousTab() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> performOn <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Waits for element and runs a sequence of actions inside its context. Actions can be defined with array, callback, or `Codeception\Util\ActionSequence` instance. <br /> Actions as array are recommended for simple to combine "waitForElement" with assertions; `waitForElement($el)` and `see('text', $el)` can be simplified to: <br /> ```php <?php $I->performOn($el, ['see' => 'text']); ``` <br /> List of actions can be pragmatically build using `Codeception\Util\ActionSequence`: <br /> ```php <?php $I->performOn('.model', ActionSequence::build() ->see('Warning') ->see('Are you sure you want to delete this?') ->click('Yes') ); ``` <br /> Actions executed from array or ActionSequence will print debug output for actions, and adds an action name to exception on failure. <br /> Whenever you need to define more actions a callback can be used. A WebDriver module is passed for argument: <br /> ```php <?php $I->performOn('.rememberMe', function (WebDriver $I) { $I->see('Remember me next time'); $I->seeElement('#LoginForm_rememberMe'); $I->dontSee('Login'); }); ``` <br /> In 3rd argument you can set number a seconds to wait for element to appear <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $element <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actions <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $timeout <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WebDriver::performOn() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> logOut <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Navigate to the default WordPress logout page and click the logout link. <br /> @example ```php // Log out using the `wp-login.php` form and return to the current page. $I->logOut(true); // Log out using the `wp-login.php` form and remain there. $I->logOut(false); // Log out using the `wp-login.php` form and move to another page. $I->logOut('/some-other-page'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool|string $redirectTo Whether to redirect to another (optionally specified) page after the logout. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::logOut() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnPluginsPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Go to the plugins administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->activatePlugin('hello-dolly'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::amOnPluginsPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnPagesPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Go the "Pages" administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPagesPage(); $I->see('Add New'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::amOnPagesPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePluginDeactivated <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Assert a plugin is not activated in the plugins administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->seePluginDeactivated('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seePluginDeactivated() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePluginDeactivated <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Assert a plugin is not activated in the plugins administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->seePluginDeactivated('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seePluginDeactivated() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePluginInstalled <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Assert a plugin is installed, no matter its activation status, in the plugin adminstration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->seePluginInstalled('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seePluginInstalled() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePluginInstalled <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Assert a plugin is installed, no matter its activation status, in the plugin adminstration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->seePluginInstalled('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seePluginInstalled() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePluginActivated <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Assert a plugin is activated in the plugin administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->seePluginActivated('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seePluginActivated() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePluginActivated <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Assert a plugin is activated in the plugin administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->seePluginActivated('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seePluginActivated() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeePluginInstalled <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Assert a plugin is not installed in the plugins administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->dontSeePluginInstalled('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::dontSeePluginInstalled() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeePluginInstalled <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Assert a plugin is not installed in the plugins administration screen. <br /> The method will <br /><br />not<br /><br /> handle authentication and navigation to the plugin administration screen. <br /> @example ```php $I->loginAsAdmin(); $I->amOnPluginsPage(); $I->dontSeePluginInstalled('my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pluginSlug The plugin slug, like "hello-dolly". <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::dontSeePluginInstalled() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeErrorMessage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> In an administration screen look for an error admin notice. <br /> The check is class-based to decouple from internationalization. The method will <br /><br />not<br /><br /> handle authentication and navigation the administration area. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string> $classes A list of classes the notice should have other than the `.notice.notice-error` ones. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void @example ```php $I->loginAsAdmin() $I->amOnAdminPage('/'); $I->seeErrorMessage('.my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seeErrorMessage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeErrorMessage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail In an administration screen look for an error admin notice. <br /> The check is class-based to decouple from internationalization. The method will <br /><br />not<br /><br /> handle authentication and navigation the administration area. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string> $classes A list of classes the notice should have other than the `.notice.notice-error` ones. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void @example ```php $I->loginAsAdmin() $I->amOnAdminPage('/'); $I->seeErrorMessage('.my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seeErrorMessage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeWpDiePage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that the current page is one generated by the `wp_die` function. <br /> The method will try to identify the page based on the default WordPress die page HTML attributes. <br /> @example ```php $I->loginAs('user', 'password'); $I->amOnAdminPage('/forbidden'); $I->seeWpDiePage(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seeWpDiePage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeWpDiePage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that the current page is one generated by the `wp_die` function. <br /> The method will try to identify the page based on the default WordPress die page HTML attributes. <br /> @example ```php $I->loginAs('user', 'password'); $I->amOnAdminPage('/forbidden'); $I->seeWpDiePage(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seeWpDiePage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeMessage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> In an administration screen look for an admin notice. <br /> The check is class-based to decouple from internationalization. The method will <br /><br />not<br /><br /> handle authentication and navigation the administration area. <br /> @example ```php $I->loginAsAdmin() $I->amOnAdminPage('/'); $I->seeMessage('.missing-api-token.my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string>|string $classes A list of classes the message should have in addition to the `.notice` one. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seeMessage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeMessage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail In an administration screen look for an admin notice. <br /> The check is class-based to decouple from internationalization. The method will <br /><br />not<br /><br /> handle authentication and navigation the administration area. <br /> @example ```php $I->loginAsAdmin() $I->amOnAdminPage('/'); $I->seeMessage('.missing-api-token.my-plugin'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string>|string $classes A list of classes the message should have in addition to the `.notice` one. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::seeMessage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabWordPressTestCookie <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns WordPress default test cookie object if present. @example ```php // Grab the default WordPress test cookie. $wpTestCookie = $I->grabWordPressTestCookie(); // Grab a customized version of the test cookie. $myTestCookie = $I->grabWordPressTestCookie('my_test_cookie'); ``` <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $name Optional, overrides the default cookie name. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> \Symfony\Component\BrowserKit\Cookie|null Either a cookie object or `null`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::grabWordPressTestCookie() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnAdminPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Go to a page in the admininstration area of the site. <br /> This method will <br /><br />not<br /><br /> handle authentication to the administration area. <br /> @example <br /> ```php $I->loginAs('user', 'password'); // Go to the plugins management screen. $I->amOnAdminPage('/plugins.php'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $page The path, relative to the admin area URL, to the page. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The admin page path. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::amOnAdminPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnAdminAjaxPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Go to the `admin-ajax.php` page to start a synchronous, and blocking, `GET` AJAX request. <br /> The method will <br /><br />not<br /><br /> handle authentication, nonces or authorization. <br /> @example ```php $I->amOnAdminAjaxPage(['action' => 'my-action', 'data' => ['id' => 23], 'nonce' => $nonce]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string,mixed> $queryVars A string or array of query variables to append to the AJAX path. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The admin page path. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::amOnAdminAjaxPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amOnCronPage <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Go to the cron page to start a synchronous, and blocking, `GET` request to the cron script. <br /> @example ```php // Triggers the cron job with an optional query argument. $I->amOnCronPage('/?some-query-var=some-value'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string,mixed> $queryVars A string or array of query variables to append to the AJAX path. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The page path. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::amOnCronPage() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amEditingPostWithId <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Go to the admin page to edit the post with the specified ID. <br /> The method will <br /><br />not<br /><br /> handle authentication the admin area. <br /> @example ```php $I->loginAsAdmin(); $postId = $I->havePostInDatabase(); $I->amEditingPostWithId($postId); $I->fillField('post_title', 'Post title'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $id The post ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPWebDriver::amEditingPostWithId() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> importSqlDumpFile <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Import the SQL dump file if populate is enabled. <br /> @example ```php // Import a dump file passing the absolute path. $I->importSqlDumpFile(codecept_data_dir('dumps/start.sql')); ``` <br /> Specifying a dump file that file will be imported. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $dumpFile The dump file that should be imported in place of the default one. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \InvalidArgumentException If the specified file does not exist. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::importSqlDumpFile() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that an option is not in the database for the current blog. <br /> If the value is an object or an array then the serialized option will be checked. <br /> @example ```php $I->dontHaveOptionInDatabase('posts_per_page'); $I->dontSeeOptionInDatabase('posts_per_page'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that an option is not in the database for the current blog. <br /> If the value is an object or an array then the serialized option will be checked. <br /> @example ```php $I->dontHaveOptionInDatabase('posts_per_page'); $I->dontSeeOptionInDatabase('posts_per_page'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabPrefixedTableNameFor <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns a prefixed table name for the current blog. <br /> If the table is not one to be prefixed (e.g. `users`) then the proper table name will be returned. <br /> @example ```php // Will return wp_users. $usersTable = $I->grabPrefixedTableNameFor('users'); // Will return wp_options. $optionsTable = $I->grabPrefixedTableNameFor('options'); // Use a different blog and get its options table. $I->useBlog(2); $blogOptionsTable = $I->grabPrefixedTableNameFor('options'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $tableName The table name, e.g. `options`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed table name, e.g. `wp_options` or `wp_2_options`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabPrefixedTableNameFor() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePostMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a post meta value in the database for the current blog. <br /> If the `meta_value` is an object or an array then the check will be made for serialized values. <br /> @example ```php $postId = $I->havePostInDatabase(['meta_input' => ['foo' => 'bar']]; $I->seePostMetaInDatabase(['post_id' => '$postId', 'meta_key' => 'foo']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePostMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePostMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a post meta value in the database for the current blog. <br /> If the `meta_value` is an object or an array then the check will be made for serialized values. <br /> @example ```php $postId = $I->havePostInDatabase(['meta_input' => ['foo' => 'bar']]; $I->seePostMetaInDatabase(['post_id' => '$postId', 'meta_key' => 'foo']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePostMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeLinkInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a link in the `links` table of the database. <br /> @example ```php // Asserts a link exists by name. $I->seeLinkInDatabase(['link_name' => 'my-link']); // Asserts at least one link exists for the user. $I->seeLinkInDatabase(['link_owner' => $userId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeLinkInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeLinkInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a link in the `links` table of the database. <br /> @example ```php // Asserts a link exists by name. $I->seeLinkInDatabase(['link_name' => 'my-link']); // Asserts at least one link exists for the user. $I->seeLinkInDatabase(['link_owner' => $userId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeLinkInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeLinkInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a link is not in the `links` database table. <br /> @example ```php $I->dontSeeLinkInDatabase(['link_url' => 'http://example.com']); $I->dontSeeLinkInDatabase(['link_url' => 'http://example.com', 'link_name' => 'example']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeLinkInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeLinkInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a link is not in the `links` database table. <br /> @example ```php $I->dontSeeLinkInDatabase(['link_url' => 'http://example.com']); $I->dontSeeLinkInDatabase(['link_url' => 'http://example.com', 'link_name' => 'example']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeLinkInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeePostMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a post meta value does not exist. <br /> If the meta value is an object or an array then the check will be made on its serialized version. <br /> @example ```php $postId = $I->havePostInDatabase(['meta_input' => ['foo' => 'bar']]); $I->dontSeePostMetaInDatabase(['post_id' => $postId, 'meta_key' => 'woot']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePostMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeePostMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a post meta value does not exist. <br /> If the meta value is an object or an array then the check will be made on its serialized version. <br /> @example ```php $postId = $I->havePostInDatabase(['meta_input' => ['foo' => 'bar']]); $I->dontSeePostMetaInDatabase(['post_id' => $postId, 'meta_key' => 'woot']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePostMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePostWithTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a post to term relation exists in the database. <br /> The method will check the "term_relationships" table. <br /> @example ```php $fiction = $I->haveTermInDatabase('fiction', 'genre'); $postId = $I->havePostInDatabase(['tax_input' => ['genre' => ['fiction']]]); $I->seePostWithTermInDatabase($postId, $fiction['term_taxonomy_id']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $post_id The post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_taxonomy_id The term `term_id` or `term_taxonomy_id`; if the `$taxonomy` argument is passed this parameter will be interpreted as a `term_id`, else as a `term_taxonomy_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|null $term_order The order the term applies to the post, defaults to `null` to not use the term order. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $taxonomy The taxonomy the `term_id` is for; if passed this parameter will be used to build a `taxonomy_term_id` from the `term_id`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If a `term_id` is specified but it cannot be matched to the `taxonomy`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePostWithTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePostWithTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a post to term relation exists in the database. <br /> The method will check the "term_relationships" table. <br /> @example ```php $fiction = $I->haveTermInDatabase('fiction', 'genre'); $postId = $I->havePostInDatabase(['tax_input' => ['genre' => ['fiction']]]); $I->seePostWithTermInDatabase($postId, $fiction['term_taxonomy_id']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $post_id The post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_taxonomy_id The term `term_id` or `term_taxonomy_id`; if the `$taxonomy` argument is passed this parameter will be interpreted as a `term_id`, else as a `term_taxonomy_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|null $term_order The order the term applies to the post, defaults to `null` to not use the term order. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $taxonomy The taxonomy the `term_id` is for; if passed this parameter will be used to build a `taxonomy_term_id` from the `term_id`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If a `term_id` is specified but it cannot be matched to the `taxonomy`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePostWithTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeUserInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a user is in the database. <br /> The method will check the "users" table. <br /> @example ```php $I->seeUserInDatabase([ "user_email" => "test@example.org", "user_login" => "login name" ]) ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeUserInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeUserInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a user is in the database. <br /> The method will check the "users" table. <br /> @example ```php $I->seeUserInDatabase([ "user_email" => "test@example.org", "user_login" => "login name" ]) ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeUserInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeUserInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a user is not in the database. <br /> @example ```php // Asserts a user does not exist in the database. $I->dontSeeUserInDatabase(['user_login' => 'luca']); // Asserts a user with email and login is not in the database. $I->dontSeeUserInDatabase(['user_login' => 'luca', 'user_email' => 'luca@theaveragedev.com']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeUserInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeUserInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a user is not in the database. <br /> @example ```php // Asserts a user does not exist in the database. $I->dontSeeUserInDatabase(['user_login' => 'luca']); // Asserts a user with email and login is not in the database. $I->dontSeeUserInDatabase(['user_login' => 'luca', 'user_email' => 'luca@theaveragedev.com']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeUserInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> havePageInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a page in the database. <br /> @example ```php // Creates a test page in the database with random values. $randomPageId = $I->havePageInDatabase(); // Creates a test page in the database defining its title. $testPageId = $I->havePageInDatabase(['post_title' => 'Test page']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An array of values to override the default ones. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted page post ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::havePostInDatabase() <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::havePageInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> havePostInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a post in the database. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int|string,mixed> $data An associative array of post data to override default and random generated values. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int post_id The inserted post ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception If there's an exception during the insertion. <br /> @example ```php // Insert a post with random values in the database. $randomPostId = $I->havePostInDatabase(); // Insert a post with specific values in the database. $I->havePostInDatabase([ 'post_type' => 'book', 'post_title' => 'Alice in Wonderland', 'meta_input' => [ 'readers_count' => 23 ], 'tax_input' => [ ['genre' => 'fiction'] ] ]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::havePostInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabPostsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the posts prefixed table name. <br /> @example ```php // Given a `wp_` table prefix returns `wp_posts`. $postsTable = $I->grabPostsTableName(); // Given a `wp_` table prefix returns `wp_23_posts`. $I->useBlog(23); $postsTable = $I->grabPostsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed table name, e.g. `wp_posts` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabPostsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabLatestEntryByFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the id value of the last table entry. <br /> @example ```php $I->haveManyPostsInDatabase(); $postsTable = $I->grabPostsTableName(); $last = $I->grabLatestEntryByFromDatabase($postsTable, 'ID'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $tableName The table to fetch the last insertion for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $idColumn The column that is used, in the table, to uniquely identify items. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The last insertion id. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabLatestEntryByFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> havePostmetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Adds one or more meta key and value couples in the database for a post. <br /> @example ```php // Set the post-meta for a post. $I->havePostmetaInDatabase($postId, 'karma', 23); // Set an array post-meta for a post, it will be serialized in the db. $I->havePostmetaInDatabase($postId, 'data', ['one', 'two']); // Use a loop to insert one meta per row. foreach( ['one', 'two'] as $value){ $I->havePostmetaInDatabase($postId, 'data', $value); } ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $postId The post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $meta_key The meta key. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $meta_value The value to insert in the database, objects and arrays will be serialized. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted meta `meta_id`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::havePostmetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabPostmetaTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the prefixed post meta table name. <br /> @example ```php // Returns 'wp_postmeta'. $I->grabPostmetaTableName(); // Returns 'wp_23_postmeta'. $I->useBlog(23); $I->grabPostmetaTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed `postmeta` table name, e.g. `wp_postmeta`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabPostmetaTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTermIdFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets a term ID from the database. Looks up the prefixed `terms` table, e.g. `wp_terms`. <br /> @example ```php // Return the 'fiction' term 'term_id'. $termId = $I->grabTermIdFromDatabase(['name' => 'fiction']); // Get a term ID by more stringent criteria. $termId = $I->grabTermIdFromDatabase(['name' => 'fiction', 'slug' => 'genre--fiction']); // Return the 'term_id' of the first term for a group. $termId = $I->grabTermIdFromDatabase(['term_group' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The matching term `term_id` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTermIdFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTermsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed terms table name, e.g. `wp_terms`. <br /> @example ```php // Returns 'wp_terms'. $I->grabTermsTableName(); // Returns 'wp_23_terms'. $I->useBlog(23); $I->grabTermsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed terms table name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTermsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a term in the database. <br /> @example ```php // Insert a random 'genre' term in the database. $I->haveTermInDatabase('non-fiction', 'genre'); // Insert a term in the database with term meta. $I->haveTermInDatabase('fiction', 'genre', [ 'slug' => 'genre--fiction', 'meta' => [ 'readers_count' => 23 ] ]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $name The term name, e.g. "Fuzzy". <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $taxonomy The term taxonomy <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int|string,mixed> $overrides An array of values to override the default ones. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array containing `term_id` and `term_taxonomy_id` of the inserted term. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTermTaxonomyTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed term and taxonomy table name, e.g. `wp_term_taxonomy`. <br /> @example ```php // Returns 'wp_term_taxonomy'. $I->grabTermTaxonomyTableName(); // Returns 'wp_23_term_taxonomy'. $I->useBlog(23); $I->grabTermTaxonomyTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed term taxonomy table name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTermTaxonomyTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveTermMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a term meta row in the database. Objects and array meta values will be serialized. <br /> @example ```php $I->haveTermMetaInDatabase($fictionId, 'readers_count', 23); // Insert some meta that will be serialized. $I->haveTermMetaInDatabase($fictionId, 'flags', [3, 4, 89]); // Use a loop to insert one meta per row. foreach([3, 4, 89] as $value) { $I->haveTermMetaInDatabase($fictionId, 'flag', $value); } ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_id The ID of the term to insert the meta for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $meta_key The key of the meta to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $meta_value The value of the meta to insert, if serializable it will be serialized. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted term meta `meta_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveTermMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTermMetaTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the terms meta table prefixed name. <br /> @example ```php // Returns 'wp_termmeta'. $I->grabTermMetaTableName(); // Returns 'wp_23_termmeta'. $I->useBlog(23); $I->grabTermMetaTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed term meta table name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTermMetaTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTermTaxonomyIdFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets a `term_taxonomy_id` from the database. <br /> Looks up the prefixed `terms_relationships` table, e.g. `wp_term_relationships`. <br /> @example ```php // Get the `term_taxonomy_id` for a term and a taxonomy. $I->grabTermTaxonomyIdFromDatabase(['term_id' => $fictionId, 'taxonomy' => 'genre']); // Get the `term_taxonomy_id` for the first term with a count of 23. $I->grabTermTaxonomyIdFromDatabase(['count' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The matching term `term_taxonomy_id` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTermTaxonomyIdFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveTermRelationshipInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Creates a term relationship in the database. <br /> No check about the consistency of the insertion is made. E.g. a post could be assigned a term from a taxonomy that's not registered for that post type. <br /> @example ```php // Assign the `fiction` term to a book. $I->haveTermRelationshipInDatabase($bookId, $fictionId); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $object_id A post ID, a user ID or anything that can be assigned a taxonomy term. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_taxonomy_id The `term_taxonomy_id` of the term and taxonomy to create a relation with. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_order Defaults to `0`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveTermRelationshipInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTermRelationshipsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed term relationships table name, e.g. `wp_term_relationships`. <br /> @example ```php $I->grabTermRelationshipsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The `term_relationships` table complete name, including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTermRelationshipsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePageInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a page in the database. <br /> @example ```php // Asserts a page with an exists in the database. $I->seePageInDatabase(['ID' => 23]); // Asserts a page with a slug and ID exists in the database. $I->seePageInDatabase(['post_title' => 'Test Page', 'ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePageInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePageInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a page in the database. <br /> @example ```php // Asserts a page with an exists in the database. $I->seePageInDatabase(['ID' => 23]); // Asserts a page with a slug and ID exists in the database. $I->seePageInDatabase(['post_title' => 'Test Page', 'ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePageInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seePostInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a post in the database. <br /> @example ```php // Assert a post exists in the database. $I->seePostInDatabase(['ID' => 23]); // Assert a post with a slug and ID exists in the database. $I->seePostInDatabase(['post_content' => 'test content', 'ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePostInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeePostInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a post in the database. <br /> @example ```php // Assert a post exists in the database. $I->seePostInDatabase(['ID' => 23]); // Assert a post with a slug and ID exists in the database. $I->seePostInDatabase(['post_content' => 'test content', 'ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seePostInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeePageInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a page is not in the database. <br /> @example ```php // Assert a page with an ID does not exist. $I->dontSeePageInDatabase(['ID' => 23]); // Assert a page with a slug and ID. $I->dontSeePageInDatabase(['post_name' => 'test', 'ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePageInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeePageInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a page is not in the database. <br /> @example ```php // Assert a page with an ID does not exist. $I->dontSeePageInDatabase(['ID' => 23]); // Assert a page with a slug and ID. $I->dontSeePageInDatabase(['post_name' => 'test', 'ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePageInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeePostInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a post is not in the database. <br /> @example ```php // Asserts a post with title 'Test' is not in the database. $I->dontSeePostInDatabase(['post_title' => 'Test']); // Asserts a post with title 'Test' and content 'Test content' is not in the database. $I->dontSeePostInDatabase(['post_title' => 'Test', 'post_content' => 'Test content']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePostInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeePostInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a post is not in the database. <br /> @example ```php // Asserts a post with title 'Test' is not in the database. $I->dontSeePostInDatabase(['post_title' => 'Test']); // Asserts a post with title 'Test' and content 'Test content' is not in the database. $I->dontSeePostInDatabase(['post_title' => 'Test', 'post_content' => 'Test content']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePostInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeCommentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a comment in the database. <br /> Will look up the "comments" table. <br /> @example ```php $I->seeCommentInDatabase(['comment_ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeCommentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeCommentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a comment in the database. <br /> Will look up the "comments" table. <br /> @example ```php $I->seeCommentInDatabase(['comment_ID' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeCommentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeCommentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a comment is not in the database. <br /> Will look up the "comments" table. <br /> @example ```php // Checks for one comment. $I->dontSeeCommentInDatabase(['comment_ID' => 23]); // Checks for comments from a user. $I->dontSeeCommentInDatabase(['user_id' => 89]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria The search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeCommentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeCommentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a comment is not in the database. <br /> Will look up the "comments" table. <br /> @example ```php // Checks for one comment. $I->dontSeeCommentInDatabase(['comment_ID' => 23]); // Checks for comments from a user. $I->dontSeeCommentInDatabase(['user_id' => 89]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria The search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeCommentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeCommentMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a comment meta value is in the database. Will look up the "commentmeta" table. <br /> @example ```php // Assert a specifid meta for a comment exists. $I->seeCommentMetaInDatabase(['comment_ID' => $commentId, 'meta_key' => 'karma', 'meta_value' => 23]); // Assert the comment has at least one meta set. $I->seeCommentMetaInDatabase(['comment_ID' => $commentId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeCommentMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeCommentMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a comment meta value is in the database. Will look up the "commentmeta" table. <br /> @example ```php // Assert a specifid meta for a comment exists. $I->seeCommentMetaInDatabase(['comment_ID' => $commentId, 'meta_key' => 'karma', 'meta_value' => 23]); // Assert the comment has at least one meta set. $I->seeCommentMetaInDatabase(['comment_ID' => $commentId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeCommentMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeCommentMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a comment meta value is not in the database. <br /> Will look up the "commentmeta" table. <br /> @example ```php // Delete a comment `karma` meta. $I->dontSeeCommentMetaInDatabase(['comment_id' => 23, 'meta_key' => 'karma']); // Delete all meta for a comment. $I->dontSeeCommentMetaInDatabase(['comment_id' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeCommentMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeCommentMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a comment meta value is not in the database. <br /> Will look up the "commentmeta" table. <br /> @example ```php // Delete a comment `karma` meta. $I->dontSeeCommentMetaInDatabase(['comment_id' => 23, 'meta_key' => 'karma']); // Delete all meta for a comment. $I->dontSeeCommentMetaInDatabase(['comment_id' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeCommentMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeUserMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a user meta value in the database. <br /> @example ```php $I->seeUserMetaInDatabase(['user_id' => 23, 'meta_key' => 'karma']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeUserMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeUserMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a user meta value in the database. <br /> @example ```php $I->seeUserMetaInDatabase(['user_id' => 23, 'meta_key' => 'karma']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeUserMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeUserMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Check that a user meta value is not in the database. <br /> @example ```php // Asserts a user does not have a 'karma' meta assigned. $I->dontSeeUserMetaInDatabase(['user_id' => 23, 'meta_key' => 'karma']); // Asserts no user has any 'karma' meta assigned. $I->dontSeeUserMetaInDatabase(['meta_key' => 'karma']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeUserMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeUserMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Check that a user meta value is not in the database. <br /> @example ```php // Asserts a user does not have a 'karma' meta assigned. $I->dontSeeUserMetaInDatabase(['user_id' => 23, 'meta_key' => 'karma']); // Asserts no user has any 'karma' meta assigned. $I->dontSeeUserMetaInDatabase(['meta_key' => 'karma']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeUserMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveLinkInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a link from the database. <br /> @example ```php $I->dontHaveLinkInDatabase(['link_url' => 'http://example.com']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveLinkInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Deletes a database entry. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The table name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An associative array of the column names and values to use as deletion criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void @example ```php $I->dontHaveInDatabase('custom_table', ['book_ID' => 23, 'book_genre' => 'fiction']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveTermRelationshipInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the term_relationships table. <br /> @example ```php // Remove the relation between a post and a category. $I->dontHaveTermRelationshipInDatabase(['object_id' => $postId, 'term_taxonomy_id' => $ttaxId]); // Remove all terms for a post. $I->dontHaveTermMetaInDatabase(['object_id' => $postId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveTermRelationshipInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveTermTaxonomyInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the `term_taxonomy` table. <br /> @example ```php // Remove a specific term from the genre taxonomy. $I->dontHaveTermTaxonomyInDatabase(['term_id' => $postId, 'taxonomy' => 'genre']); // Remove all terms for a taxonomy. $I->dontHaveTermTaxonomyInDatabase(['taxonomy' => 'genre']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveTermTaxonomyInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveUserMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the usermeta table. <br /> @example ```php // Remove the `karma` user meta for a user. $I->dontHaveUserMetaInDatabase(['user_id' => 23, 'meta_key' => 'karma']); // Remove all the user meta for a user. $I->dontHaveUserMetaInDatabase(['user_id' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveUserMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabUserMetaFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets a user meta from the database. <br /> @example ```php // Returns a user 'karma' value. $I->grabUserMetaFromDatabase($userId, 'karma'); // Returns an array, the unserialized version of the value stored in the database. $I->grabUserMetaFromDatabase($userId, 'api_data'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $userId The ID of th user to get the meta for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $meta_key The meta key to fetch the value for. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<string,mixed> An associative array of meta key/values. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception If the search criteria is incoherent. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabUserMetaFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabAllFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns all entries matching a criteria from the database. <br /> @example ```php $books = $I->grabPrefixedTableNameFor('books'); $I->grabAllFromDatabase($books, 'title', ['genre' => 'fiction']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The table to grab the values from. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $column The column to fetch. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria The search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<string,mixed> An array of results. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception If the criteria is inconsistent. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabAllFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveTransientInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a transient in the database. <br /> If the value is an array or an object then the value will be serialized. Since the transients are set in the context of tests it's not possible to set an expiration directly. <br /> @example ```php // Store an array in the `tweets` transient. $I->haveTransientInDatabase('tweets', $tweets); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $transient The transient name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $value The transient value. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted option `option_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveTransientInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts an option in the database. <br /> @example ```php $I->haveOptionInDatabase('posts_per_page', 23); $I->haveOptionInDatabase('my_plugin_options', ['key_one' => 'value_one', 'key_two' => 89]); ``` <br /> If the option value is an object or an array then the value will be serialized. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $option_name The option name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $option_value The option value; if an array or object it will be serialized. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $autoload Wether the option should be autoloaded by WordPress or not. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted option `option_id` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveTransientInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a transient from the database. <br /> @example ```php // Removes the `tweets` transient from the database, if set. $I->dontHaveTransientInDatabase('tweets'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $transient The name of the transient to delete. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveTransientInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the options table. <br /> @example ```php // Remove the `foo` option. $I->dontHaveOptionInDatabase('foo'); // Remove the 'bar' option only if it has the `baz` value. $I->dontHaveOptionInDatabase('bar', 'baz'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The option name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed|null $value If set the option will only be removed if its value matches the passed one. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveSiteOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a site option in the database. <br /> If the value is an array or an object then the value will be serialized. <br /> @example ```php $fooCountOptionId = $I->haveSiteOptionInDatabase('foo_count','23'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the option to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $value The value ot insert for the option. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted option `option_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveSiteOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> useMainBlog <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets the current blog to the main one (`blog_id` 1). <br /> @example ```php // Switch to the blog with ID 23. $I->useBlog(23); // Switch back to the main blog. $I->useMainBlog(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::useMainBlog() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> useBlog <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets the blog to be used. <br /> This has nothing to do with WordPress `switch_to_blog` function, this code will affect the table prefixes used. <br /> @example ```php // Switch to the blog with ID 23. $I->useBlog(23); // Switch back to the main blog. $I->useMainBlog(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $blogId The ID of the blog to use. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::useBlog() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveSiteOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a site option from the database. <br /> @example ```php // Remove the `foo_count` option. $I->dontHaveSiteOptionInDatabase('foo_count'); // Remove the `foo_count` option only if its value is `23`. $I->dontHaveSiteOptionInDatabase('foo_count', 23); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The option name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed|null $value If set the option will only be removed it its value matches the specified one. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveSiteOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveSiteTransientInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a site transient in the database. If the value is an array or an object then the value will be serialized. <br /> @example ```php $I->haveSiteTransientInDatabase('total_comments_count', 23); // This value will be serialized. $I->haveSiteTransientInDatabase('api_data', ['user' => 'luca', 'token' => '11ae3ijns-j83']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The key of the site transient to insert, w/o the `_site_transient_` prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $value The value to insert; if serializable the value will be serialized. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted transient `option_id` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveSiteTransientInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveSiteTransientInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a site transient from the database. <br /> @example ```php $I->dontHaveSiteTransientInDatabase(['my_plugin_site_buffer']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the transient to delete. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveSiteTransientInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabSiteOptionFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets a site option from the database. <br /> @example ```php $fooCountOptionId = $I->haveSiteOptionInDatabase('foo_count','23'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the option to read from the database. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string|mixed The value of the option stored in the database, unserialized if serialized. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabSiteOptionFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabOptionFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets an option value from the database. <br /> @example ```php $count = $I->grabOptionFromDatabase('foo_count'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $option_name The name of the option to grab from the database. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed The option value. If the value is serialized it will be unserialized. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabOptionFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabSiteTransientFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets a site transient from the database. <br /> @example ```php $I->grabSiteTransientFromDatabase('total_comments'); $I->grabSiteTransientFromDatabase('api_data'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The site transient to fetch the value for, w/o the `_site_transient_` prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed|string The value of the site transient. If the value is serialized it will be unserialized. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabSiteTransientFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeSiteSiteTransientInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a site option is in the database. <br /> @example ```php // Check a transient exists. $I->seeSiteSiteTransientInDatabase('total_counts'); // Check a transient exists and has a specific value. $I->seeSiteSiteTransientInDatabase('total_counts', 23); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the transient to check for, w/o the `_site_transient_` prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed|null $value If provided then the assertion will include the value. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeSiteSiteTransientInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeSiteSiteTransientInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a site option is in the database. <br /> @example ```php // Check a transient exists. $I->seeSiteSiteTransientInDatabase('total_counts'); // Check a transient exists and has a specific value. $I->seeSiteSiteTransientInDatabase('total_counts', 23); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the transient to check for, w/o the `_site_transient_` prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed|null $value If provided then the assertion will include the value. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeSiteSiteTransientInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks if an option is in the database for the current blog. If checking for an array or an object then the serialized version will be checked for. <br /> @example ```php // Checks an option is in the database. $I->seeOptionInDatabase('tables_version'); // Checks an option is in the database and has a specific value. $I->seeOptionInDatabase('tables_version', '1.0'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks if an option is in the database for the current blog. If checking for an array or an object then the serialized version will be checked for. <br /> @example ```php // Checks an option is in the database. $I->seeOptionInDatabase('tables_version'); // Checks an option is in the database and has a specific value. $I->seeOptionInDatabase('tables_version', '1.0'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeSiteOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a site option is in the database. <br /> @example ```php // Check that the option is set in the database. $I->seeSiteOptionInDatabase('foo_count'); // Check that the option is set and has a specific value. $I->seeSiteOptionInDatabase('foo_count', 23); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the otpion to check. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed|null $value If set the assertion will also check the option value. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeSiteOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeSiteOptionInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a site option is in the database. <br /> @example ```php // Check that the option is set in the database. $I->seeSiteOptionInDatabase('foo_count'); // Check that the option is set and has a specific value. $I->seeSiteOptionInDatabase('foo_count', 23); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $key The name of the otpion to check. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed|null $value If set the assertion will also check the option value. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeSiteOptionInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveManyPostsInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts many posts in the database returning their IDs. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $count The number of posts to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides { An array of values to override the defaults. The `{{n}}` placeholder can be used to have the post count inserted in its place; e.g. `Post Title - {{n}}` will be set to `Post Title - 0` for the first post, `Post Title - 1` for the second one and so on. The same applies to meta values as well. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of the inserted post IDs. <br /> @example ```php // Insert 3 random posts. $I->haveManyPostsInDatabase(3); // Insert 3 posts with generated titles. $I->haveManyPostsInDatabase(3, ['post_title' => 'Test post {{n}}']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveManyPostsInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a term in the database. Looks up the `terms` and `term_taxonomy` prefixed tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of criteria to search for the term, can be columns from the `terms` and the `term_taxonomy` tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void @example ```php $I->seeTermInDatabase(['slug' => 'genre--fiction']); $I->seeTermInDatabase(['name' => 'Fiction', 'slug' => 'genre--fiction']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a term in the database. Looks up the `terms` and `term_taxonomy` prefixed tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of criteria to search for the term, can be columns from the `terms` and the `term_taxonomy` tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void @example ```php $I->seeTermInDatabase(['slug' => 'genre--fiction']); $I->seeTermInDatabase(['name' => 'Fiction', 'slug' => 'genre--fiction']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a term from the database. <br /> @example ```php $I->dontHaveTermInDatabase(['name' => 'romance']); $I->dontHaveTermInDatabase(['slug' => 'genre--romance']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $purgeMeta Whether the terms meta should be purged along side with the meta or not. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveTermMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a term meta from the database. <br /> @example ```php // Remove the "karma" key. $I->dontHaveTermMetaInDatabase(['term_id' => $termId, 'meta_key' => 'karma']); // Remove all meta for the term. $I->dontHaveTermMetaInDatabase(['term_id' => $termId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveTermMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Makes sure a term is not in the database. <br /> Looks up both the `terms` table and the `term_taxonomy` tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of criteria to search for the term, can be columns from the `terms` and the `term_taxonomy` tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> @example ```php // Asserts a 'fiction' term is not in the database. $I->dontSeeTermInDatabase(['name' => 'fiction']); // Asserts a 'fiction' term with slug 'genre--fiction' is not in the database. $I->dontSeeTermInDatabase(['name' => 'fiction', 'slug' => 'genre--fiction']); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Makes sure a term is not in the database. <br /> Looks up both the `terms` table and the `term_taxonomy` tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of criteria to search for the term, can be columns from the `terms` and the `term_taxonomy` tables. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> @example ```php // Asserts a 'fiction' term is not in the database. $I->dontSeeTermInDatabase(['name' => 'fiction']); // Asserts a 'fiction' term with slug 'genre--fiction' is not in the database. $I->dontSeeTermInDatabase(['name' => 'fiction', 'slug' => 'genre--fiction']); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveManyCommentsInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts many comments in the database. <br /> <br /> @example ```php // Insert 3 random comments for a post. $I->haveManyCommentsInDatabase(3, $postId); // Insert 3 random comments for a post. $I->haveManyCommentsInDatabase(3, $postId, ['comment_content' => 'Comment {{n}}']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $count The number of comments to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $comment_post_ID The comment parent post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An associative array to override the defaults. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array containing the inserted comments IDs. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveManyCommentsInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveCommentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a comment in the database. <br /> @example ```php $I->haveCommentInDatabase($postId, ['comment_content' => 'Test Comment', 'comment_karma' => 23]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $comment_post_ID The id of the post the comment refers to. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int|string,mixed> $data The comment data overriding default and random generated values. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted comment `comment_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveCommentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveCommentMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a comment meta field in the database. Array and object meta values will be serialized. <br /> @example ```php $I->haveCommentMetaInDatabase($commentId, 'api_ID', 23); // The value will be serialized. $apiData = ['ID' => 23, 'user' => 89, 'origin' => 'twitter']; $I->haveCommentMetaInDatabase($commentId, 'api_data', $apiData); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $comment_id The ID of the comment to insert the meta for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $meta_key The key of the comment meta to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $meta_value The value of the meta to insert, if serializable it will be serialized. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted comment meta ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveCommentMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabCommentmetaTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the prefixed comment meta table name. <br /> @example ```php // Get all the values of 'karma' for all comments. $commentMeta = $I->grabCommentmetaTableName(); $I->grabAllFromDatabase($commentMeta, 'meta_value', ['meta_key' => 'karma']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The complete name of the comment meta table name, including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabCommentmetaTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> countRowsInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the number of table rows matching a criteria. <br /> @example ```php $I->haveManyPostsInDatabase(3, ['post_status' => 'draft' ]); $I->haveManyPostsInDatabase(3, ['post_status' => 'private' ]); // Make sure there are now the expected number of draft posts. $postsTable = $I->grabPostsTableName(); $draftsCount = $I->countRowsInDatabase($postsTable, ['post_status' => 'draft']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The table to count the rows in. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria Search criteria, if empty all table rows will be counted. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The number of table rows matching the search criteria. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::countRowsInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveCommentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the comments table. <br /> @example ```php $I->dontHaveCommentInDatabase(['comment_post_ID' => 23, 'comment_url' => 'http://example.copm']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $purgeMeta If set to `true` then the meta for the comment will be purged too. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception In case of incoherent query criteria. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveCommentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabCommentsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the comments table name. <br /> @example ```php // Will be `wp_comments`. $comments = $I->grabCommentsTableName(); // Will be `wp_23_comments`. $I->useBlog(23); $comments = $I->grabCommentsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The prefixed table name, e.g. `wp_comments`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabCommentsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveCommentMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a post comment meta from the database <br /> @example ```php // Remove all meta for the comment with an ID of 23. $I->dontHaveCommentMetaInDatabase(['comment_id' => 23]); // Remove the `count` comment meta for the comment with an ID of 23. $I->dontHaveCommentMetaInDatabase(['comment_id' => 23, 'meta_key' => 'count']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveCommentMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveManyLinksInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts many links in the database `links` table. <br /> @example ```php // Insert 3 randomly generated links in the database. $linkIds = $I->haveManyLinksInDatabase(3); // Inserts links in the database replacing the `n` placeholder. $linkIds = $I->haveManyLinksInDatabase(3, ['link_url' => 'http://example.org/test-{{n}}']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $count The number of links to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides Overrides for the default arguments. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of inserted `link_id`s. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveManyLinksInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveLinkInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a link in the database. <br /> @example ```php $linkId = $I->haveLinkInDatabase(['link_url' => 'http://example.org']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int|string,mixed> $overrides The data to insert. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted link `link_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveLinkInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabLinksTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the prefixed links table name. <br /> @example ```php // Given a `wp_` table prefix returns `wp_links`. $linksTable = $I->grabLinksTableName(); // Given a `wp_` table prefix returns `wp_23_links`. $I->useBlog(23); $linksTable = $I->grabLinksTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The links table including the blog-aware table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabLinksTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveManyUsersInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts many users in the database. <br /> @example ```php $subscribers = $I->haveManyUsersInDatabase(5, 'user-{{n}}'); $editors = $I->haveManyUsersInDatabase( 5, 'user-{{n}}', 'editor', ['user_email' => 'user-{{n}}@example.org'] ); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $count The number of users to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $user_login The user login name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $role The user role. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An array of values to override the default ones. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of user IDs. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveManyUsersInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveUserInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a user and its meta in the database. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $user_login The user login name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string> $role The user role slug(s), e.g. `administrator` or `['author', 'editor']`; defaults to `subscriber`. If more than one role is specified, then the first role in the list will be the user primary role and the `wp_user_level` will be set to that role. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int|string,mixed> $overrides An associative array of column names and values overriding defaults in the `users` and `usermeta` table. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted user ID. <br /> @example ```php // Create an editor user in blog 1 w/ specific email. $userId = $I->haveUserInDatabase('luca', 'editor', ['user_email' => 'luca@example.org']); <br /> // Create a subscriber user in blog 1. $subscriberId = $I->haveUserInDatabase('subscriber'); <br /> // Create a user editor in blog 1, author in blog 2, administrator in blog 3. $userWithMeta = $I->haveUserInDatabase('luca', [ 1 => 'editor', 2 => 'author', 3 => 'administrator' ], [ 'user_email' => 'luca@example.org' 'meta' => ['a meta_key' => 'a_meta_value'] ] ); <br /> // Create editor in blog 1 w/ `edit_themes` cap, author in blog 2, admin in blog 3 w/o `manage_options` cap. $userWithMeta = $I->haveUserInDatabase('luca', [ 1 => ['editor', 'edit_themes'], 2 => 'author', 3 => ['administrator' => true, 'manage_options' => false] ] ); <br /> // Create a user w/o role. $userId = $I->haveUserInDatabase('luca', ''); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> WPDb::haveUserCapabilitiesInDatabase() for the roles and caps options. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveUserInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getUsersTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the prefixed users table name. <br /> @example ```php // Given a `wp_` table prefix returns `wp_users`. $usersTable = $I->getUsersTableName(); // Given a `wp_` table prefix returns `wp_users`. $I->useBlog(23); $usersTable = $I->getUsersTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The users table including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Deprecated</div> Use `grabUsersTableName`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::getUsersTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabUsersTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the prefixed users table name. <br /> @example ```php // Given a `wp_` table prefix returns `wp_users`. $usersTable = $I->grabUsersTableName(); // Given a `wp_` table prefix returns `wp_users`. $I->useBlog(23); $usersTable = $I->grabUsersTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The users table including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabUsersTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveUserCapabilitiesInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets a user capabilities in the database. <br /> @example ```php // Assign one user a role in a blog. $blogId = $I->haveBlogInDatabase('test'); $editor = $I->haveUserInDatabase('luca', 'editor'); $capsIds = $I->haveUserCapabilitiesInDatabase($editor, [$blogId => 'editor']); <br /> // Assign a user two roles in blog 1. $capsIds = $I->haveUserCapabilitiesInDatabase($userId, ['editor', 'subscriber']); <br /> // Assign one user different roles in different blogs. $capsIds = $I->haveUserCapabilitiesInDatabase($userId, [$blogId1 => 'editor', $blogId2 => 'author']); <br /> // Assign a user a role and an additional capability in blog 1. $I->haveUserCapabilitiesInDatabase($userId, ['editor' => true, 'edit_themes' => true]); <br /> // Assign a user a mix of roles and capabilities in different blogs. $capsIds = $I->haveUserCapabilitiesInDatabase( $userId, [ $blogId1 => ['editor' => true, 'edit_themes' => true], $blogId2 => ['administrator' => true, 'edit_themes' => false] ] ); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $userId The ID of the user to set the capabilities of. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|array<string|bool>|array<int,array> $role Either a role string (e.g. `administrator`),an associative array of blog IDs/roles for a multisite installation (e.g. `[1 => 'administrator`, 2 => 'subscriber']`). <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int|string,array<int>|int> An array of inserted `meta_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveUserCapabilitiesInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveUserMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets a user meta in the database. <br /> @example ```php $userId = $I->haveUserInDatabase('luca', 'editor'); $I->haveUserMetaInDatabase($userId, 'karma', 23); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $userId The user ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $meta_key The meta key to set the value for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> mixed $meta_value Either a single value or an array of values; objects will be serialized while array of values will trigger the insertion of multiple rows. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of inserted `umeta_id`s. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveUserMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabUsermetaTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the prefixed users meta table name. <br /> @example ```php // Given a `wp_` table prefix returns `wp_usermeta`. $usermetaTable = $I->grabUsermetaTableName(); // Given a `wp_` table prefix returns `wp_usermeta`. $I->useBlog(23); $usermetaTable = $I->grabUsermetaTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The user meta table name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabUsermetaTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveUserLevelsInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets the user access level meta in the database for a user. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $userId The ID of the user to set the level for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<array|bool|string>|string $role Either a role string (e.g. `administrator`) or an array of blog IDs/roles for a multisite installation (e.g. `[1 => 'administrator`, 2 => 'subscriber']`). <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of inserted `meta_id`. @example ```php $userId = $I->haveUserInDatabase('luca', 'editor'); $moreThanAnEditorLessThanAnAdmin = 8; $I->haveUserLevelsInDatabase($userId, $moreThanAnEditorLessThanAnAdmin); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveUserLevelsInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveManyTermsInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts many terms in the database. <br /> @example ```php $terms = $I->haveManyTermsInDatabase(3, 'genre-{{n}}', 'genre'); $termIds = array_column($terms, 0); $termTaxonomyIds = array_column($terms, 1); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $count The number of terms to insert. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $name The term name template, can include the `{{n}}` placeholder. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $taxonomy The taxonomy to insert the terms for. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An associative array of default overrides. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<array<int>> An array of arrays containing `term_id` and `term_taxonomy_id` of the inserted terms. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveManyTermsInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeTermTaxonomyInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a taxonomy taxonomy in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->seeTermTaxonomyInDatabase(['term_id' => $termId, 'taxonomy' => 'genre']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermTaxonomyInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeTermTaxonomyInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a taxonomy taxonomy in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->seeTermTaxonomyInDatabase(['term_id' => $termId, 'taxonomy' => 'genre']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermTaxonomyInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeTermTaxonomyInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a term taxonomy is not in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->dontSeeTermTaxonomyInDatabase(['term_id' => $termId, 'taxonomy' => 'country']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTermTaxonomyInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeTermTaxonomyInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a term taxonomy is not in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->dontSeeTermTaxonomyInDatabase(['term_id' => $termId, 'taxonomy' => 'country']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTermTaxonomyInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeTermMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a term meta in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->haveTermMetaInDatabase($termId, 'rating', 4); $I->seeTermMetaInDatabase(['term_id' => $termId,'meta_key' => 'rating', 'meta_value' => 4]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeTermMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a term meta in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->haveTermMetaInDatabase($termId, 'rating', 4); $I->seeTermMetaInDatabase(['term_id' => $termId,'meta_key' => 'rating', 'meta_value' => 4]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeTermMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a term meta is not in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->haveTermMetaInDatabase($termId, 'rating', 4); $I->dontSeeTermMetaInDatabase(['term_id' => $termId,'meta_key' => 'average_review']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTermMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeTermMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a term meta is not in the database. <br /> @example ```php list($termId, $termTaxonomyId) = $I->haveTermInDatabase('fiction', 'genre'); $I->haveTermMetaInDatabase($termId, 'rating', 4); $I->dontSeeTermMetaInDatabase(['term_id' => $termId,'meta_key' => 'average_review']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTermMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeTableInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a table is in the database. <br /> @example ```php $options = $I->grabPrefixedTableNameFor('options'); $I->seeTableInDatabase($options); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The full table name, including the table prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTableInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeTableInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a table is in the database. <br /> @example ```php $options = $I->grabPrefixedTableNameFor('options'); $I->seeTableInDatabase($options); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The full table name, including the table prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTableInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogVersionsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed `blog_versions` table name. <br /> @example ```php // Assuming a `wp_` table prefix it will return `wp_blog_versions`. $blogVersionsTable = $I->grabBlogVersionsTableName(); $I->useBlog(23); // Assuming a `wp_` table prefix it will return `wp_blog_versions`. $blogVersionsTable = $I->grabBlogVersionsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The blogs versions table name including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogVersionsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabSiteMetaTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed `sitemeta` table name. <br /> @example ```php // Assuming a `wp_` table prefix it will return `wp_sitemeta`. $blogVersionsTable = $I->grabSiteMetaTableName(); $I->useBlog(23); // Assuming a `wp_` table prefix it will return `wp_sitemeta`. $blogVersionsTable = $I->grabSiteMetaTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The site meta table name including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabSiteMetaTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabSignupsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed `signups` table name. <br /> @example ```php // Assuming a `wp_` table prefix it will return `wp_signups`. $blogVersionsTable = $I->grabSignupsTableName(); $I->useBlog(23); // Assuming a `wp_` table prefix it will return `wp_signups`. $blogVersionsTable = $I->grabSignupsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The signups table name including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabSignupsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabRegistrationLogTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed `registration_log` table name. <br /> @example ```php // Assuming a `wp_` table prefix it will return `wp_registration_log`. $blogVersionsTable = $I->grabRegistrationLogTableName(); $I->useBlog(23); // Assuming a `wp_` table prefix it will return `wp_registration_log`. $blogVersionsTable = $I->grabRegistrationLogTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The registration log table name including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabRegistrationLogTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabSiteTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed `site` table name. <br /> @example ```php // Assuming a `wp_` table prefix it will return `wp_site`. $blogVersionsTable = $I->grabSiteTableName(); $I->useBlog(23); // Assuming a `wp_` table prefix it will return `wp_site`. $blogVersionsTable = $I->grabSiteTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The site table name including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabSiteTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeBlogInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a blog in the `blogs` table. <br /> @example ```php // Search for a blog by `blog_id`. $I->seeBlogInDatabase(['blog_id' => 23]); // Search for all blogs on a path. $I->seeBlogInDatabase(['path' => '/sub-path/']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeBlogInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeBlogInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a blog in the `blogs` table. <br /> @example ```php // Search for a blog by `blog_id`. $I->seeBlogInDatabase(['blog_id' => 23]); // Search for all blogs on a path. $I->seeBlogInDatabase(['path' => '/sub-path/']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeBlogInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogsTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the prefixed `blogs` table name. <br /> @example ```php // Assuming a `wp_` table prefix it will return `wp_blogs`. $blogVersionsTable = $I->grabBlogsTableName(); $I->useBlog(23); // Assuming a `wp_` table prefix it will return `wp_blogs`. $blogVersionsTable = $I->grabBlogsTableName(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The blogs table name including the table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogsTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveManyBlogsInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts many blogs in the database. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $count The number of blogs to create. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An array of values to override the default ones; `{{n}}` will be replaced by the count. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $subdomain Whether the new blogs should be created as a subdomain or subfolder. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of inserted blogs `blog_id`s. @example ```php $blogIds = $I->haveManyBlogsInDatabase(3, ['domain' =>'test-{{n}}']); foreach($blogIds as $blogId){ $I->useBlog($blogId); $I->haveManuPostsInDatabase(3); } ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveManyBlogsInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveBlogInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts a blog in the `blogs` table. <br /> @example ```php // Create the `test` subdomain blog. $blogId = $I->haveBlogInDatabase('test', ['administrator' => $userId]); // Create the `/test` subfolder blog. $blogId = $I->haveBlogInDatabase('test', ['administrator' => $userId], false); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $domainOrPath The subdomain or the path to the be used for the blog. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int|string,mixed> $overrides An array of values to override the defaults. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $subdomain Whether the new blog should be created as a subdomain (`true`) or subfolder (`true`) <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted blog `blog_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveBlogInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getSiteDomain <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the site domain inferred from the `url` set in the config. <br /> @example ```php $domain = $I->getSiteDomain(); // We should be redirected to the HTTPS version when visiting the HTTP version. $I->amOnPage('http://' . $domain); $I->seeCurrentUrlEquals('https://' . $domain); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The site domain, e.g. `worpdress.localhost` or `localhost:8080`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::getSiteDomain() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveBlogInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes one ore more blogs frome the database. <br /> @example ```php // Remove the blog, all its tables and files. $I->dontHaveBlogInDatabase(['path' => 'test/one']); // Remove the blog entry, not the tables though. $I->dontHaveBlogInDatabase(['blog_id' => $blogId]); // Remove multiple blogs. $I->dontHaveBlogInDatabase(['domain' => 'test']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria to find the blog rows in the blogs table. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $removeTables Remove the blog tables. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $removeUploads Remove the blog uploads; requires the `WPFilesystem` module. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveBlogInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogTableNames <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns a list of tables for a blog ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $blogId The ID of the blog to fetch the tables for. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<string> An array of tables for the blog, it does not include the tables common to all blogs; an empty array if the tables for the blog do not exist. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception If there is any error while preparing the query. @example ```php $blogId = $I->haveBlogInDatabase('test'); $tables = $I->grabBlogTableNames($blogId); $options = array_filter($tables, function($tableName){ return str_pos($tableName, 'options') !== false; }); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogTableNames() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveTableInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a table from the database. The case where a table does not exist is handled without raising an error. <br /> @example ```php $ordersTable = $I->grabPrefixedTableNameFor('orders'); $I->dontHaveTableInDatabase($ordersTable); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $fullTableName The full table name, including the table prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Exception If there is an error while dropping the table. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveTableInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeBlogInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a row is not present in the `blogs` table. <br /> @example ```php $I->haveManyBlogsInDatabase(2, ['path' => 'test-{{n}}'], false) $I->dontSeeBlogInDatabase(['path' => '/test-3/']) ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeBlogInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeBlogInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a row is not present in the `blogs` table. <br /> @example ```php $I->haveManyBlogsInDatabase(2, ['path' => 'test-{{n}}'], false) $I->dontSeeBlogInDatabase(['path' => '/test-3/']) ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeBlogInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> useTheme <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Sets the current theme options. <br /> @example ```php $I->useTheme('twentyseventeen'); $I->useTheme('child-of-twentyseventeen', 'twentyseventeen'); $I->useTheme('acme', 'acme', 'Acme Theme'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $stylesheet The theme stylesheet slug, e.g. `twentysixteen`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $template The theme template slug, e.g. `twentysixteen`, defaults to `$stylesheet`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $themeName The theme name, e.g. `Acme`, defaults to the "title" version of `$stylesheet`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::useTheme() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveMenuInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Creates and adds a menu to a theme location in the database. <br /> @example ```php list($termId, $termTaxId) = $I->haveMenuInDatabase('test', 'sidebar'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $slug The menu slug. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $location The theme menu location the menu will be assigned to. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An array of values to override the defaults. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array containing the created menu `term_id` and `term_taxonomy_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveMenuInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveMenuItemInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Adds a menu element to a menu for the current theme. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $menuSlug The menu slug the item should be added to. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $title The menu item title. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|null $menuOrder An optional menu order, `1` based. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $meta An associative array that will be prefixed with `_menu_item_` for the item post meta. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The menu item post `ID` @example ```php $I->haveMenuInDatabase('test', 'sidebar'); $I->haveMenuItemInDatabase('test', 'Test one', 0); $I->haveMenuItemInDatabase('test', 'Test two', 1); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveMenuItemInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeTermRelationshipInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for a term relationship in the database. <br /> @example ```php $postId = $I->havePostInDatabase(['tax_input' => ['category' => 'one']]); $I->seeTermRelationshipInDatabase(['object_id' => $postId, 'term_taxonomy_id' => $oneTermTaxId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermRelationshipInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeTermRelationshipInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for a term relationship in the database. <br /> @example ```php $postId = $I->havePostInDatabase(['tax_input' => ['category' => 'one']]); $I->seeTermRelationshipInDatabase(['object_id' => $postId, 'term_taxonomy_id' => $oneTermTaxId]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeTermRelationshipInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveAttachmentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Creates the database entries representing an attachment and moves the attachment file to the right location. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $file The absolute path to the attachment file. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|int $date Either a string supported by the `strtotime` function or a UNIX timestamp that should be used to build the "year/time" uploads sub-folder structure. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $overrides An associative array of values overriding the default ones. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,array<int>> $imageSizes An associative array in the format [ <size> => [<width>,<height>]] to override the image sizes created by default. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The post ID of the inserted attachment. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If the WPFilesystem module is not loaded in the suite or the file to attach is not readable <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> \Gumlet\ImageResizeException If the image resize operation fails while trying to create the image sizes. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleRequireException If the `WPFileSystem` module is not loaded in the suite or if the 'gumlet/php-image-resize:^1.6' package is not installed. @example ```php $file = codecept_data_dir('images/test.png'); $attachmentId = $I->haveAttachmentInDatabase($file); $image = codecept_data_dir('images/test-2.png'); $lastWeekAttachment = $I->haveAttachmentInDatabase($image, '-1 week'); ``` <br /> Requires the WPFilesystem module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::haveAttachmentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabSiteUrl <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the current site URL as specified in the module configuration. <br /> @example ```php $shopPath = $I->grabSiteUrl('/shop'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $path A path that should be appended to the site URL. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The current site URL <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabSiteUrl() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeAttachmentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks for an attachment in the database. <br /> @example ```php $url = 'https://example.org/images/foo.png'; $I->seeAttachmentInDatabase(['guid' => $url]); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeAttachmentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeAttachmentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks for an attachment in the database. <br /> @example ```php $url = 'https://example.org/images/foo.png'; $I->seeAttachmentInDatabase(['guid' => $url]); ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::seeAttachmentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeAttachmentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that an attachment is not in the database. <br /> @example ```php $url = 'https://example.org/images/foo.png'; $I->dontSeeAttachmentInDatabase(['guid' => $url]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeAttachmentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeAttachmentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that an attachment is not in the database. <br /> @example ```php $url = 'https://example.org/images/foo.png'; $I->dontSeeAttachmentInDatabase(['guid' => $url]); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeAttachmentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveAttachmentInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an attachment from the posts table. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria to find the attachment post in the posts table. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $purgeMeta If set to `true` then the meta for the attachment will be purged too. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $removeFiles Remove all files too, requires the `WPFilesystem` module to be loaded in the suite. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If the WPFilesystem module is not loaded in the suite and the `$removeFiles` argument is `true`. @example ``` $postmeta = $I->grabpostmetatablename(); $thumbnailId = $I->grabFromDatabase($postmeta, 'meta_value', [ 'post_id' => $id, 'meta_key'=>'thumbnail_id' ]); // Remove only the database entry (including postmeta) but not the files. $I->dontHaveAttachmentInDatabase($thumbnailId); // Remove the database entry (including postmeta) and the files. $I->dontHaveAttachmentInDatabase($thumbnailId, true, true); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveAttachmentInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveAttachmentFilesInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes all the files attached with an attachment post, it will not remove the database entries. Requires the `WPFilesystem` module to be loaded in the suite. <br /> @example ```php $posts = $I->grabPostsTableName(); $attachmentIds = $I->grabColumnFromDatabase($posts, 'ID', ['post_type' => 'attachment']); // This will only remove the files, not the database entries. $I->dontHaveAttachmentFilesInDatabase($attachmentIds); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<int>|int $attachmentIds An attachment post ID or an array of attachment post IDs. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleRequireException If the `WPFilesystem` module is not loaded in the suite. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveAttachmentFilesInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabAttachmentAttachedFile <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the path, as stored in the database, of an attachment `_wp_attached_file` meta. The attached file is, usually, an attachment origal file. <br /> @example ```php $file = $I->grabAttachmentAttachedFile($attachmentId); $fileInfo = new SplFileInfo($file); $I->assertEquals('jpg', $fileInfo->getExtension()); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $attachmentPostId The attachment post ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The attachment attached file path or an empt string if not set. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabAttachmentAttachedFile() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabAttachmentMetadata <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the metadata array for an attachment post. This is the value of the `_wp_attachment_metadata` meta. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $attachmentPostId The attachment post ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<string,mixed> The unserialized contents of the attachment `_wp_attachment_metadata` meta or an empty array. @example ```php $metadata = $I->grabAttachmentMetadata($attachmentId); $I->assertEquals(['thumbnail', 'medium', 'medium_large'], array_keys($metadata['sizes']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabAttachmentMetadata() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHavePostInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the posts table. <br /> @example ```php $posts = $I->haveManyPostsInDatabase(3, ['post_title' => 'Test {{n}}']); $I->dontHavePostInDatabase(['post_title' => 'Test 2']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $purgeMeta If set to `true` then the meta for the post will be purged too. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHavePostInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHavePostMetaInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes an entry from the postmeta table. <br /> @example ```php $postId = $I->havePostInDatabase(['meta_input' => ['rating' => 23]]); $I->dontHavePostMetaInDatabase(['post_id' => $postId, 'meta_key' => 'rating']); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string,mixed> $criteria An array of search criteria. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHavePostMetaInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveUserInDatabaseWithEmail <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a user(s) from the database using the user email address. <br /> @example ```php $luca = $I->haveUserInDatabase('luca', 'editor', ['user_email' => 'luca@example.org']); $I->dontHaveUserInDatabaseWithEmail('luca@exampl.org'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $userEmail The email of the user to remove. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $purgeMeta Whether the user meta should be purged alongside the user or not. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array<int> An array of the deleted user(s) ID(s) <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveUserInDatabaseWithEmail() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabTablePrefix <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the table prefix, namespaced for secondary blogs if selected. <br /> @example ```php // Assuming a table prefix of `wp_` it will return `wp_`; $tablePrefix = $I->grabTablePrefix(); $I->useBlog(23); // Assuming a table prefix of `wp_` it will return `wp_23_`; $tablePrefix = $I->grabTablePrefix(); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The blog aware table prefix. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabTablePrefix() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHaveUserInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Removes a user from the database. <br /> @example ```php $bob = $I->haveUserInDatabase('bob'); $alice = $I->haveUserInDatabase('alice'); // Remove Bob's user and meta. $I->dontHaveUserInDatabase('bob'); // Remove Alice's user but not meta. $I->dontHaveUserInDatabase($alice); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|string $userIdOrLogin The user ID or login name. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $purgeMeta Whether the user meta should be purged alongside the user or not. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHaveUserInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabUserIdFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the a user ID from the database using the user login. <br /> @example ```php $userId = $I->grabUserIdFromDatabase('luca'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $userLogin The user login name. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The user ID <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabUserIdFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabPostMetaFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Gets the value of one or more post meta values from the database. <br /> @example ```php $thumbnail_id = $I->grabPostMetaFromDatabase($postId, '_thumbnail_id', true); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $postId The post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $metaKey The key of the meta to retrieve. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $single Whether to return a single meta value or an arrya of all available meta values. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed|array<string,mixed> Either a single meta value or an array of all the available meta values. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabPostMetaFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogTableName <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the full name of a table for a blog from a multisite installation database. <br /> @example ```php $blogOptionTable = $I->grabBlogTableName($blogId, 'option'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $blogId The blog ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The table name, without table prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The full blog table name, including the table prefix or an empty string if the table does not exist. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If no tables are found for the blog. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogTableName() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeTableInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a table is not in the database. <br /> @example ```php $options = $I->grabPrefixedTableNameFor('options'); $I->dontHaveTableInDatabase($options) $I->dontSeeTableInDatabase($options); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The full table name, including the table prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTableInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeTableInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a table is not in the database. <br /> @example ```php $options = $I->grabPrefixedTableNameFor('options'); $I->dontHaveTableInDatabase($options) $I->dontSeeTableInDatabase($options); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table The full table name, including the table prefix. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeeTableInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogTablePrefix <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the table prefix for a blog. <br /> @example ```php $blogId = $I->haveBlogInDatabase('test'); $blogTablePrefix = $I->getBlogTablePrefix($blogId); $blogOrders = $I->blogTablePrefix . 'orders'; ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $blogId The blog ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The table prefix for the blog. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogTablePrefix() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogDomain <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns a blog domain given its ID. <br /> @example ```php $blogIds = $I->haveManyBlogsInDatabase(3); $domains = array_map(function($blogId){ return $I->grabBlogDomain($blogId); }, $blogIds); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $blogId The blog ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The blog domain. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogDomain() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabBlogPath <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Grabs a blog domain from the blogs table. <br /> @example ```php $blogId = $I->haveBlogInDatabase('test'); $path = $I->grabBlogDomain($blogId); $I->amOnSubdomain($path); $I->amOnPage('/'); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $blogId The blog ID. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string The blog domain, if set in the database. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::grabBlogPath() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeePostWithTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that a post to term relation does not exist in the database. <br /> The method will check the "term_relationships" table. <br /> @example ```php $fiction = $I->haveTermInDatabase('fiction', 'genre'); $nonFiction = $I->haveTermInDatabase('non-fiction', 'genre'); $postId = $I->havePostInDatabase(['tax_input' => ['genre' => ['fiction']]]); $I->dontSeePostWithTermInDatabase($postId, $nonFiction['term_taxonomy_id], ); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $post_id The post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_taxonomy_id The term `term_id` or `term_taxonomy_id`; if the `$taxonomy` argument is passed this parameter will be interpreted as a `term_id`, else as a `term_taxonomy_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|null $term_order The order the term applies to the post, defaults to `null` to not use the term order. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $taxonomy The taxonomy the `term_id` is for; if passed this parameter will be used to build a `taxonomy_term_id` from the `term_id`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If a `term_id` is specified but it cannot be matched to the `taxonomy`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePostWithTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeePostWithTermInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Checks that a post to term relation does not exist in the database. <br /> The method will check the "term_relationships" table. <br /> @example ```php $fiction = $I->haveTermInDatabase('fiction', 'genre'); $nonFiction = $I->haveTermInDatabase('non-fiction', 'genre'); $postId = $I->havePostInDatabase(['tax_input' => ['genre' => ['fiction']]]); $I->dontSeePostWithTermInDatabase($postId, $nonFiction['term_taxonomy_id], ); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $post_id The post ID. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $term_taxonomy_id The term `term_id` or `term_taxonomy_id`; if the `$taxonomy` argument is passed this parameter will be interpreted as a `term_id`, else as a `term_taxonomy_id`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int|null $term_order The order the term applies to the post, defaults to `null` to not use the term order. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string|null $taxonomy The taxonomy the `term_id` is for; if passed this parameter will be used to build a `taxonomy_term_id` from the `term_id`. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleException If a `term_id` is specified but it cannot be matched to the `taxonomy`. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontSeePostWithTermInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> havePostThumbnailInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Assigns the specified attachment ID as thumbnail (featured image) to a post. <br /> @example ```php $attachmentId = $I->haveAttachmentInDatabase(codecept_data_dir('some-image.png')); $postId = $I->havePostInDatabase(); $I->havePostThumbnailInDatabase($postId, $attachmentId); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $postId The post ID to assign the thumbnail (featured image) to. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $thumbnailId The post ID of the attachment. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int The inserted meta id. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::havePostThumbnailInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontHavePostThumbnailInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Remove the thumbnail (featured image) from a post, if any. <br /> Please note: the method will NOT remove the attachment post, post meta and file. <br /> @example ```php $attachmentId = $I->haveAttachmentInDatabase(codecept_data_dir('some-image.png')); $postId = $I->havePostInDatabase(); // Attach the thumbnail to the post. $I->havePostThumbnailInDatabase($postId, $attachmentId); // Remove the thumbnail from the post. $I->dontHavePostThumbnailInDatabase($postId); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $postId The post ID to remove the thumbnail (featured image) from. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::dontHavePostThumbnailInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> importSql <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Loads a set SQL code lines in the current database. <br /> @example ```php // Import a SQL string. $I->importSql([$sqlString]); // Import a set of SQL strings. $I->importSql($sqlStrings); // Import a prepared set of SQL strings. $preparedSqlStrings = array_map(function($line){ return str_replace('{{date}}', date('Y-m-d H:i:s'), $line); }, $sqlTemplate); $I->importSql($preparedSqlStrings); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array<string> $sql The SQL strings to load. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\WPDb::importSql() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> amConnectedToDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Make sure you are connected to the right database. <br /> ```php <?php $I->seeNumRecords(2, 'users'); //executed on default database $I->amConnectedToDatabase('db_books'); $I->seeNumRecords(30, 'books'); //executed on db_books database //All the next queries will be on db_books ``` <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $databaseKey <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleConfigException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::amConnectedToDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> performInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Can be used with a callback if you don't want to change the current database in your test. <br /> ```php <?php $I->seeNumRecords(2, 'users'); //executed on default database $I->performInDatabase('db_books', function($I) { $I->seeNumRecords(30, 'books'); //executed on db_books database }); $I->seeNumRecords(2, 'users'); //executed on default database ``` List of actions can be pragmatically built using `Codeception\Util\ActionSequence`: <br /> ```php <?php $I->performInDatabase('db_books', ActionSequence::build() ->seeNumRecords(30, 'books') ); ``` Alternatively an array can be used: <br /> ```php $I->performInDatabase('db_books', ['seeNumRecords' => [30, 'books']]); ``` <br /> Choose the syntax you like the most and use it, <br /> Actions executed from array or ActionSequence will print debug output for actions, and adds an action name to exception on failure. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $databaseKey <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> \Codeception\Util\ActionSequence|array|callable $actions <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Throws</div> ModuleConfigException <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::performInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> haveInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Inserts an SQL record into a database. This record will be erased after the test. <br /> ```php <?php $I->haveInDatabase('users', array('name' => 'miles', 'email' => 'miles@davis.com')); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $data <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> integer $id <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::haveInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Asserts that a row with the given column values exists. Provide table name and column values. <br /> ```php <?php $I->seeInDatabase('users', ['name' => 'Davert', 'email' => 'davert@mail.com']); ``` Fails if no such user found. <br /> Comparison expressions can be used as well: <br /> ```php <?php $I->seeInDatabase('posts', ['num_comments >=' => '0']); $I->seeInDatabase('users', ['email like' => 'miles@davis.com']); ``` <br /> Supported operators: `<`, `>`, `>=`, `<=`, `!=`, `like`. <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::seeInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Asserts that a row with the given column values exists. Provide table name and column values. <br /> ```php <?php $I->seeInDatabase('users', ['name' => 'Davert', 'email' => 'davert@mail.com']); ``` Fails if no such user found. <br /> Comparison expressions can be used as well: <br /> ```php <?php $I->seeInDatabase('posts', ['num_comments >=' => '0']); $I->seeInDatabase('users', ['email like' => 'miles@davis.com']); ``` <br /> Supported operators: `<`, `>`, `>=`, `<=`, `!=`, `like`. <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::seeInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> seeNumRecords <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Asserts that the given number of records were found in the database. <br /> ```php <?php $I->seeNumRecords(1, 'users', ['name' => 'davert']) ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $expectedNumber Expected number <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table Table name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria Search criteria [Optional] <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::seeNumRecords() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> canSeeNumRecords <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Asserts that the given number of records were found in the database. <br /> ```php <?php $I->seeNumRecords(1, 'users', ['name' => 'davert']) ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> int $expectedNumber Expected number <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table Table name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria Search criteria [Optional] <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::seeNumRecords() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> dontSeeInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Effect is opposite to ->seeInDatabase <br /> Asserts that there is no record with the given column values in a database. Provide table name and column values. <br /> ``` php <?php $I->dontSeeInDatabase('users', ['name' => 'Davert', 'email' => 'davert@mail.com']); ``` Fails if such user was found. <br /> Comparison expressions can be used as well: <br /> ```php <?php $I->dontSeeInDatabase('posts', ['num_comments >=' => '0']); $I->dontSeeInDatabase('users', ['email like' => 'miles%']); ``` <br /> Supported operators: `<`, `>`, `>=`, `<=`, `!=`, `like`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::dontSeeInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> cantSeeInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> [!] Conditional Assertion: Test won't be stopped on fail Effect is opposite to ->seeInDatabase <br /> Asserts that there is no record with the given column values in a database. Provide table name and column values. <br /> ``` php <?php $I->dontSeeInDatabase('users', ['name' => 'Davert', 'email' => 'davert@mail.com']); ``` Fails if such user was found. <br /> Comparison expressions can be used as well: <br /> ```php <?php $I->dontSeeInDatabase('posts', ['num_comments >=' => '0']); $I->dontSeeInDatabase('users', ['email like' => 'miles%']); ``` <br /> Supported operators: `<`, `>`, `>=`, `<=`, `!=`, `like`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::dontSeeInDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabColumnFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Fetches all values from the column in database. Provide table name, desired column and criteria. <br /> ``` php <?php $mails = $I->grabColumnFromDatabase('users', 'email', array('name' => 'RebOOter')); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $column <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::grabColumnFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabFromDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Fetches a single column value from a database. Provide table name, desired column and criteria. <br /> ``` php <?php $mail = $I->grabFromDatabase('users', 'email', array('name' => 'Davert')); ``` Comparison expressions can be used as well: <br /> ```php <?php $post = $I->grabFromDatabase('posts', ['num_comments >=' => 100]); $user = $I->grabFromDatabase('users', ['email like' => 'miles%']); ``` <br /> Supported operators: `<`, `>`, `>=`, `<=`, `!=`, `like`. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $column <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed Returns a single column value or false <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::grabFromDatabase() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> grabNumRecords <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Returns the number of rows in a database <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table Table name <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria Search criteria [Optional] <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> int <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::grabNumRecords() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> updateInDatabase <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Update an SQL record into a database. <br /> ```php <?php $I->updateInDatabase('users', array('isAdmin' => true), array('email' => 'miles@davis.com')); ?> ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $table <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $data <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $criteria <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Db::updateInDatabase() </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">UnitTester</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getScenario <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">UnitTester</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getScenario <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that two variables are equal. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that two variables are not equal <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertSame <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that two variables are same <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> mixed|void <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertSame() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotSame <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that two variables are not same <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotSame() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertGreaterThan <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that actual is greater than expected <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertGreaterThan() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertGreaterThen <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Deprecated</div> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertGreaterThen() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertGreaterThanOrEqual <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that actual is greater or equal than expected <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertGreaterThanOrEqual() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertGreaterThenOrEqual <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Deprecated</div> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertGreaterThenOrEqual() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertLessThan <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that actual is less than expected <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertLessThan() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertLessThanOrEqual <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that actual is less or equal than expected <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertLessThanOrEqual() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertContains <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that haystack contains needle <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $needle <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $haystack <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertContains() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotContains <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that haystack doesn't contain needle. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $needle <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $haystack <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotContains() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertRegExp <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that string match with pattern <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pattern <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $string <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertRegExp() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotRegExp <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that string not match with pattern <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $pattern <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $string <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotRegExp() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertEmpty <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that variable is empty. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertEmpty() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotEmpty <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that variable is not empty. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotEmpty() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNull <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that variable is NULL <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNull() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotNull <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that variable is not NULL <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotNull() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertTrue <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that condition is positive. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $condition <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertTrue() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertFalse <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks that condition is negative. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $condition <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertFalse() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertFileExists <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks if file exists <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $filename <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertFileExists() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertFileNotExists <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Checks if file doesn't exist <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $filename <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertFileNotExists() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertGreaterOrEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertGreaterOrEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertLessOrEquals <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $expected <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertLessOrEquals() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertIsEmpty <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertIsEmpty() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertArrayHasKey <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $key <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertArrayHasKey() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertArrayNotHasKey <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $key <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertArrayNotHasKey() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertInstanceOf <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $class <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertInstanceOf() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertNotInstanceOf <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $class <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertNotInstanceOf() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> assertInternalType <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $type <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $actual <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $description <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::assertInternalType() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> fail <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Fails the test with message. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $message <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::fail() </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> expectException <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> [!] Method is generated. Documentation taken from corresponding module. <br /> Handles and checks exception called inside callback function. Either exception class name or exception instance should be provided. <br /> ```php <?php $I->expectException(MyException::class, function() { $this->doSomethingBad(); }); <br /> $I->expectException(new MyException(), function() { $this->doSomethingBad(); }); ``` If you want to check message or exception code, you can pass them with exception instance: ```php <?php // will check that exception MyException is thrown with "Don't do bad things" message $I->expectException(new MyException("Don't do bad things"), function() { $this->doSomethingBad(); }); ``` <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $exception string or \Exception <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> $callback <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">See</div> \Codeception\Module\Asserts::expectException() </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">ImportExportTest</h3> <p class="text-gray-600 mb-4"> Test class for ImportExport class Note that class cannot be </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ensureSanitizedUnserialization <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure that unserialization doesn't unpack malicious objects @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ensureIndexedArrayIsUnserialized <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure valid serialized string is unserialized into array @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ensureMaliciousObjectInArrayIsSanitized <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure valid serialized string is unserialized into array @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> makeObjectToTest <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Construct the object to test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> ImportExportObjectToTest </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> allowedSerializedString <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Allowed serialized JSON field object <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> disallowedObject <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Malicious serialized object with wakeup function <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> disallowedObjectInArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Embed malicious object within an indexed array <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">ImportExportObjectToTest</h3> <p class="text-gray-600 mb-4"> Expose methods to be tested </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> exposeSanitizeUnserialize <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">EvilInjection</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __wakeup <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">CalculationsReactTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testBasicYesDebug <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Test basic, expected function, yes debug <br /> @test <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testBasicNoDebug <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Test basic, expected function, no debug <br /> @test <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getTestedClass <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Mock the class when calcs_debug is false <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> CalculationsReact </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">$config</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> exposeExtractResponses <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Exposes the protected method <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $calculations <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> <span class="text-xs text-red-500">Static Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> setUpBeforeClass <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> /** @inheritDoc */ </span> </dt> <dd class="text-gray-500 mb-4"> @inheritDoc </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Telemetry_Email_SendCountTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testCountMetric <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testMaxMetric <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">MetaboxOutputEntityTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromEmptyArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Empty array constructs entity and returns array @test <br />/ </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromFullyDefinedArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a fully defined array @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromPoorlyDefinedArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a poorly defined array Construct when label value collection has unexpected values @test </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SingleSubmissionTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromEmptyArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Empty array constructs entity and returns array @test <br />/ </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromFullyDefinedArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a fully defined array @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromErrantData <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a faulty date format @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromAlternateDate <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from alternate date format @test </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionExtraHandlerResponseTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromEmptyArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Empty array constructs entity and returns array @test <br />/ </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromFullyDefinedArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a fully defined array @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromNullValues <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct when values are null @test </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionFieldTest</h3> <p class="text-gray-600 mb-4"> Unit test SubmissionField @covers \NinjaForms\Includes\Entities\SubmissionField </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromEmptyArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Empty array constructs entity and returns array @test <br />/ </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromFullyDefinedArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a fully defined array @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ensureUndefinedKeysPassed <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure undefined properties are not lost in toArray() @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromFieldsetRepeater <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a fully defined array including fieldset repeater @test </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionFilterTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromEmptyArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Empty array constructs entity and returns array @test <br />/ </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromFullyDefinedArray <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct from a fully defined array @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructFromNullDates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Construct when date values are null @test </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionFilterFactoryTest</h3> <p class="text-gray-600 mb-4"> Ensure factory constructs SubmissionFilter with correct properties <br /> UserId is only set in certain cases. This test class tests four combinations of two factors - user logged in (t/f) and filter present (t/f) <br /> The loggedInUser() method REQUIRES user logged in; the maybeLimitByLoggedInUser() only requires user logged in if an external WP filter changes the default functionality. <br /> Each comibination of four factors has a separate test for the public methods to ensure the constructs are correct. </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndNoFiltersUnfiltered <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Unfiltered method must not change default userId property in SubmissionFilter In this test series, user is NOT logged in and no external filters present @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndNoFiltersStartEndDates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Start and End dates set correctly with default loggedInUser and filter <br /> In this test series, user is NOT logged in and no external filters present @test @depends userNotLoggedInAndNoFiltersUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndNoFiltersLoggedInUser <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When requiring logged in user and NOT logged in, return -1 <br /> In this test series, user is NOT logged in and no external filters present @test @depends userNotLoggedInAndNoFiltersUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndNoFiltersMaybeFilter <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When only requiring logged in user if external filter is applied, do not override userId default <br /> In this test series, user is NOT logged in and no external filters present @test @depends userNotLoggedInAndNoFiltersUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInNoFiltersUnfiltered <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Unfiltered method must not change default userId property in SubmissionFilter In this test series, user IS logged in and no external filters present @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInNoFiltersStartEndDates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Start and End dates set correctly with default loggedInUser and filter <br /> In this test series, user IS logged in and no external filters present @test @depends userLoggedInNoFiltersUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInNoFiltersLoggedInUser <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When requiring logged in user and logged in, return userId <br /> In this test series, user IS logged in and no external filters present @test @depends userLoggedInNoFiltersUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInNoFilterssMaybeFilter <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When only requiring logged in user if external filter is applied, do not set user id by default <br /> In this test series, user IS logged in and no external filters present @test @depends userLoggedInNoFiltersUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndFiltersPresentUnfiltered <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Unfiltered method must not change default userId property in SubmissionFilter In this test series, user NOT logged in and external filters ARE present @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndFiltersPresentStartEndDates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Start and End dates set correctly with default loggedInUser and filter <br /> In this test series, user NOT logged in and external filters ARE present @test @depends userNotLoggedInAndFiltersPresentUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndFiltersPresentLoggedInUser <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When requiring logged in user and logged in, return userId <br /> In this test series, user NOT logged in and external filters ARE present @test @depends userNotLoggedInAndFiltersPresentUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userNotLoggedInAndFiltersPresentMaybeLimitByLoggedInUser <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When only requiring logged in user if external filter is applied, do not set user id by default <br /> In this test series, user NOT logged in and external filters ARE present @test @depends userNotLoggedInAndFiltersPresentUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInAndFiltersPresentUnfiltered <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Unfiltered method must not change default userId property in SubmissionFilter In this test series, user IS logged in and external filters ARE present @test <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInAndFiltersPresentStartEndDates <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Start and End dates set correctly with default loggedInUser and filter <br /> In this test series, user IS logged in and external filters ARE present @test @depends userLoggedInAndFiltersPresentUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInAndFiltersPresentLoggedInUser <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When requiring logged in user and logged in, return userId <br /> In this test series, user IS logged in and external filters ARE present @test @depends userLoggedInAndFiltersPresentUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> userLoggedInAndFiltersPresentMaybeLimitByLoggedInUser <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> When only requiring logged in user if external filter is applied, do not set user id by default <br /> In this test series, user IS logged in and external filters ARE present @test @depends userLoggedInAndFiltersPresentUnfiltered <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionFilterFactory $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> mockSubmissionFilterFactory <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Mock object by manually setting logged in user id and external filter <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> integer|null $userId <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> boolean|null $limitByUserId <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionFilterFactory </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">$userId</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getUserId <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Override with test value <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> integer </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> provideLimitByLoggedInUserFilter <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Override with test value <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> boolean </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Handlers_LocaleNumberFormattingTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> setUp <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeZero <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeInteger <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeNegativeInteger <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeNegativeFloat <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testBadLocaleDecode <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithSpaceThousandsAndCommaDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithNonBreakingSpaceThousandsAndCommaDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithCommaThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithNoThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithPeriodThousandsAndCommaDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithNoThousandsAndCommaDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithSpaceThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithNonBreakingSpaceThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeWithIndianCommaThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeOnlyCommaThousands <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeOnlyPeriodThousands <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeOnlySpaceThousands <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleDecodeOnlyNonBreakingSpaceThousands <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeZero <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeInteger <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeNegativeInteger <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeNegativeFloat <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testBadLocaleEncode <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeWithPeriodThousandsAndCommaDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeWithCommaThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeWithNonBreakingSpaceThousandsAndCommaDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleEncodeWithNonBreakingSpaceThousandsAndPeriodDecimal <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleConvertWesternToFrench <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleConvertWesternToGerman <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleConvertFrenchToGerman <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleConvertFrenchToWestern <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLocaleConvertGermanToWestern <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testAdditionFromGerman <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testSubtractionFromFrench <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testFactorial <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testSin <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testAdditionAndMultiplicationFromGerman <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testComplexFunction <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionAggregateCsvExportAdapterTest</h3> <p class="text-gray-600 mb-4"> Unit test SubmissionAggregateCsvExportAdapter @covers \NinjaForms\Includes\Handlers\SubmissionAggregateCsvExportAdapter </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructionTest01 <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure object construction with data series 01 <br /> This series of tests uses PopulatedSubmissions-01 @test <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testLabelConstruct01 <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure all label/columns constructed with Data Series 01 <br /> @test @depends constructionTest01 <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testColumnValuesBeforeAddingFields <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure column values are correctly populated <br /> Assume a form is built and has submissions; then, additional fields are added to the fieldset repeater. The original submisisons must display without errors from missing data @test @depends constructionTest01 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionAggregateCsvExportAdapter $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregateCsvExportAdapter </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testColumnValues <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure column values are correctly populated <br /> This submission has checkbox, listmultiselect, and radio list in a fieldset repeater @test @depends constructionTest01 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionAggregateCsvExportAdapter $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregateCsvExportAdapter </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructObjectToTest <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Construct Object to test with fields and submissions <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $nFFormGetFieldsConfig <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $populatedSubmissionValues <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregateCsvExportAdapter </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">$submissionAggregate</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getFieldDefinitionCollection <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Mock submission field definition collection <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array SubmissionField[] </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> exposeConstructRepeaterColumns <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Expose constructRepeaterColumns </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> mockFieldDefinitionWithFieldset <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Mock FieldDefinition with fieldset data <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $configFilename Collection of SubmissionField entities <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructDependency <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Constructs the object's dependency Exposes protected methods as needed for testing <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">$nfFieldObjectsCollection</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getFieldsCollection <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Return the Ninja Forms field collection <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $formId <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionAggregateTest</h3> <p class="text-gray-600 mb-4"> Unit test SubmissionAggregate class @covers \NinjaForms\Includes\Handlers\SubmissionAggregate </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructionTest01 <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Ensure object construction with data series 01 <br /> This series of tests uses PopulatedSubmissions-01 @test <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testGetAggregatedSubmissions01 <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Test getAggregateSubmissions functionality with data series 01 @test @depends constructionTest01 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionAggregate $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testGetSubmissionCount <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Test getSubmissionCount functionality data series 01 @test @depends constructionTest01 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionAggregate $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> testGetFieldDefinitionCollection <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Test getFieldDefinitionCollection functionality data series 01 <br /> NOTE: The data for this method is manually set during the mocking, so this test is currently a placeholder @test @depends constructionTest01 <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SubmissionAggregate $objectToTest <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> constructObjectToTest <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Use configured NF->form()->get_fields() file to mock DB <br /> <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $nFFormGetFieldsConfig <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $populatedSubmissionValues <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionAggregate </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">$nfFieldObjectsCollection</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getFieldsCollection <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Return the Ninja Forms field collection <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $formId <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Telemetry_MockRepository</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> save <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_MockLocale</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">PluginTestCase</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> setUp <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Runs before each test. </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> setUpUnitTestMockEnvironment <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Sets up a mock environment for unit tests Adds just enough function shims to do unit testing in specific areas. Unit tests must not rely upon any of the shimmed functions, which are present only to prevent construction errors from missing function dependencies. <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> defineAbspath <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Set ABSPATH to the Wordpress directory <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> UnitShims <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Include WP shims not handled by Brain Monkey <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> shimNinjaForms <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> protected </span> </dt> <dd class="text-gray-500 mb-4"> Shim basic Ninja_Forms() functionality to enable unit testing <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> configureGetOption <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Mock get_option and update_option with global array variable <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $incomingOptions <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> configure <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Return a configuration array <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $configurationName <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $extension <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> tearDown <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Teardown which calls \WP_Mock tearDown <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> void </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">PluginTestCase</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> esc_html__ <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> esc_html <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NfField</h3> <p class="text-gray-600 mb-4"> Mocks NF_Database_Models_Field using configured data Where the following calles are made, this class can substitute: \Ninja_Forms()->form()->get_field( $fieldId ) \Ninja_Forms()->form($formId)->get_fields() (produces collection of fields) Note that each instance must be populated with configured test data </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_type <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Get the Type <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_setting <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Get a single setting with a default fallback <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $setting <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> bool $default optional <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string|int|bool </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get_settings <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Get Settings <br /> <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> array </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> loadSampleData <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Load sample data into the data source from config file <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $configurationName <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $extension <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionDataSource </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> populateSampleData <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Populate field settings from sample data <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $settings <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> NfField </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionDataSource</h3> <p class="text-gray-600 mb-4"> A data source populated by a configuration file <br /> Provides a substitute for a database source; the data is pre-populated with submission values since it does not have a data source outside of the configuration file </p> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> loadSampleData <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Load sample data into the data source <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $configurationName <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> string $extension <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionDataSource </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> retrieveSubmissionMeta <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Retrieve a collection of submissions meta given filtering args <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> array $args <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SingleSubmission[] </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> retrieveSubmissionValues <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Populate with submission values a single submission in a collection <br /> Submission collection may initially only contain submission meta to save time/memory. When called, this method retrieves the complete submission values for the provided SingleSubmision <br /> NOTE: in a test configuration, the data is already pre-populated, so return the incoming submission. A class in test would not be testing this method; it is here to honor the contract. <br /> <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SingleSubmission $singleSubmission <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SingleSubmission </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> retrieveSingleSubmission <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Retrieve a single submission with values <br /> Absent a previously filtered collection of single submissions within the aggregate, request a single submission, fully populate it, and return. <br /> NOTE: in a test configuration, the data is already pre-populated, so return the incoming submission. A class in test would not be testing this method; it is here to honor the contract. <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SingleSubmission $singleSubmission <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SingleSubmission </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> deleteSubmission <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Delete a submission from the data source <br /> Honoring the contract, nothing more <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SingleSubmission $singleSubmission <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionDataSource </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> restoreSubmission <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Restore a submission from the data source <br /> Honoring the contract, nothing more <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SingleSubmission $singleSubmission <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionDataSource </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> updateSubmission <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Update a submission from the data source <br /> Honoring the contract, nothing more <div class="block font-bold text-gray-800 text-xs mt-3 -mb-1">Param</div> SingleSubmission $singleSubmission <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> SubmissionDataSource </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> getDataSource <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> Return the dataSource id <br /> Identifies the implementing class, enabling retrieval of submission specifics by calling the implementing class <div class="block font-bold text-gray-800 text-xs mt-2 -mb-1">Return</div> string </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">SubmissionDataSource</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __ <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">VerifyTestStructureTest</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ensureTestSuiteRuns <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> @test </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> ensureTestSuiteFalse <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> @test </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_Telemetry_MockRepository</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> get <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> save <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> <div class="p-4 my-4 bg-white rounded shadow w-full"> <span class="text-sm text-gray-500">Class</span> <h3 class="font-bold text-gray-900 text-2xl mb-2">NF_MockLocale</h3> <dl> <span class="text-xs text-red-500"> Method</span> <dt class="font-bold text-gray-800 text-lg leading-tight mb-1"> __construct <span class="px-2 py-1 rounded-lg bg-gray-100 text-red-700 font-normal text-sm"> public </span> </dt> <dd class="text-gray-500 mb-4"> </dd> </dl> </div> </div> </div> </section> </main> <!-- Secondary column (hidden on smaller screens) --> <aside class="w-full md:w-72 lg:w-96 bg-white border-l border-gray-200 md:overflow-y-auto lg:block"> <div class="text-gray-700 p-6"> <h4 class="block font-semibold text-gray-900 text-lg border-b border-gray-100"> Ninja Forms Codex </h4> <nav class="flex flex-col space-y-1 mt-4" aria-label="Sidebar"> <a href="/ninja-forms/index" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 flex items-center px-3 py-2 text-sm font-medium rounded-md" aria-current="page"> <span class="truncate"> Index </span> </a> <a href="/ninja-forms/codex" class="bg-gray-100 text-gray-900 flex items-center px-3 py-2 text-sm font-medium rounded-md" aria-current="page"> <span class="truncate"> Codex </span> </a> </nav> </div> </aside> </div> </div> </div> </body> </html>