Absolutely Glamorous Custom Admin - Version 6.9

Version Description

  • Important security updates
Download this release

Release Info

Developer cusmin
Plugin Icon 128x128 Absolutely Glamorous Custom Admin
Version 6.9
Comparing to
See all releases

Code changes from version 6.8.1 to 6.9

plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Absolutely Glamorous Custom Admin
4
  Plugin URI: https://cusmin.com/agca
5
  Description: All-in-one plugin for WordPress dashboard customization. Change almost everything: admin menu, dashboard, login page, admin bar and much more.
6
  Author: Cusmin
7
- Version: 6.8.1
8
  Text Domain: ag-custom-admin
9
  Domain Path: /languages
10
  Author URI: https://cusmin.com/
@@ -28,7 +28,7 @@ Author URI: https://cusmin.com/
28
  $agca = new AGCA();
29
 
30
  class AGCA{
31
- private $agca_version = "6.8.1";
32
  private $colorizer="";
33
  private $agca_debug = false;
34
  private $admin_capabilities;
@@ -63,6 +63,7 @@ class AGCA{
63
  add_action( 'customize_controls_enqueue_scripts', array(&$this,'agca_customizer_php') );
64
 
65
  add_action( 'admin_bar_menu', array(&$this,'wp_admin_bar_my_custom_account_menu'), 11 );
 
66
 
67
  /* wp_localize_script(
68
  'agca-script',//use agca enqueued script
@@ -72,6 +73,7 @@ class AGCA{
72
 
73
  /*Initialize properties*/
74
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
 
75
  }
76
 
77
  function isAGCASettingsPage() {
@@ -113,6 +115,20 @@ class AGCA{
113
  return 'default';
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  function agca_customizer_php(){
117
  $this->agca_get_includes();
118
  }
@@ -155,6 +171,10 @@ class AGCA{
155
  function checkPOST(){
156
  }
157
 
 
 
 
 
158
  function verifyPostRequest(){
159
  if ($_SERVER['REQUEST_METHOD'] === 'POST') {
160
  if (!is_admin()) {
@@ -229,9 +249,9 @@ class AGCA{
229
  $customTitle = get_option('agca_custom_title');
230
  $customTitle = str_replace('%BLOG%',$blog,$customTitle);
231
  $customTitle = str_replace('%PAGE%',$page,$customTitle);
232
- return $customTitle;
233
  }else{
234
- return $admin_title;
235
  }
236
  }
237
  function agca_get_includes() {
@@ -266,9 +286,7 @@ class AGCA{
266
  if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($this->admin_capability())))){
267
  ?>
268
  <style type="text/css">
269
- <?php
270
- echo get_option('agca_custom_css');
271
- ?>
272
  </style>
273
  <script type="text/javascript">
274
  try{
@@ -889,7 +907,7 @@ class AGCA{
889
  <?php } ?>
890
  <?php if(get_option('agca_header_logo_custom')!=""){ ?>
891
 
892
- var img_url = '<?php echo addslashes(get_option('agca_header_logo_custom')); ?>';
893
 
894
  advanced_url = img_url;
895
  image = jQuery("<img id=\"admin-top-branding-logo\" style='max-width:98%;position:relative;'/>").attr("src",advanced_url);
@@ -900,7 +918,7 @@ class AGCA{
900
  <?php } ?>
901
  <?php if(get_option('agca_wp_logo_custom')!=""){ ?>
902
  jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon")
903
- .html("<img style=\"height:32px;margin-top:0\" src=\"<?php echo get_option('agca_wp_logo_custom'); ?>\" />")
904
  .css('background-image','none')
905
  .css('width','auto');
906
  jQuery("li#wp-admin-bar-wp-logo > a.ab-item")
@@ -915,7 +933,7 @@ class AGCA{
915
 
916
  <?php } ?>
917
  <?php if(get_option('agca_wp_logo_custom_link')!=""){ ?>
918
- var href = "<?php echo get_option('agca_wp_logo_custom_link'); ?>";
919
  href = href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
920
  if(href == "%SWITCH%"){
921
  href = "<?php echo get_bloginfo('wpurl'); ?>";
@@ -931,8 +949,8 @@ class AGCA{
931
  jQuery("#wphead #site-heading").css("display","none");
932
  <?php } ?>
933
  <?php if(get_option('agca_custom_site_heading')!=""){ ?>
934
- jQuery("#wphead #site-heading").after('<h1><?php echo addslashes(get_option('agca_custom_site_heading')); ?></h1>');
935
- jQuery("#wp-admin-bar-site-name a:first").html('<?php echo addslashes(get_option('agca_custom_site_heading')); ?>');
936
 
937
  <?php } ?>
938
  <?php if(get_option('agca_header')==true && $this->context =='admin'){
@@ -947,7 +965,7 @@ class AGCA{
947
  <?php
948
  $agca_logout_text = ((get_option('agca_logout')=="")?__("Log Out", 'ag-custom-admin'):get_option('agca_logout'));
949
  ?>
950
- jQuery("#wpbody-content").prepend('<a href="<?php echo wp_logout_url(); ?>" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo $agca_logout_text; ?></a>');
951
 
952
 
953
  <?php } ?>
@@ -958,7 +976,7 @@ class AGCA{
958
  }
959
  ?>
960
  <?php if(get_option('agca_logout')!=""){ ?>
961
- jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").text("<?php echo get_option('agca_logout'); ?>");
962
  <?php } ?>
963
  <?php if(get_option('agca_remove_your_profile')==true){ ?>
964
  jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
@@ -989,7 +1007,7 @@ class AGCA{
989
  if ( 0 != $user_id ) {
990
  /* Add the "My Account" menu */
991
  $avatar = get_avatar( $user_id, 28 );
992
- $howdy = sprintf( __(get_option('agca_howdy').', %1$s'), $current_user->display_name );
993
  $class = empty( $avatar ) ? '' : 'with-avatar';
994
 
995
  $wp_admin_bar->add_menu( array(
@@ -1047,7 +1065,7 @@ class AGCA{
1047
  $capabilitySelector .="<option value=\"$k\" $selected >".ucwords(str_replace('_', ' ', $k))."</option>\n";
1048
  }
1049
 
1050
- $this->admin_capabilities = "<select class=\"agca-selectbox\" id=\"agca_admin_capability\" name=\"agca_admin_capability\" val=\"upload_files\">".$capabilitySelector."</select>";
1051
  }
1052
 
1053
  function admin_capability(){
@@ -1155,12 +1173,13 @@ class AGCA{
1155
  $m = array();
1156
  foreach($menu as $top){
1157
  $name = $top[0];
1158
- $url = $top[2];
1159
  $cls = isset($top[5])?$top[5]:"";
1160
  $remove = false;
1161
  if($name == '') continue;
1162
  $pc = null;
1163
- $name = $this->menu_item_cleartext($name);
 
1164
 
1165
  //apply previous submenu customizations
1166
  if($customizationsSet && isset($previousCustomizations[$url])){
@@ -1173,9 +1192,9 @@ class AGCA{
1173
  $sitems = $submenu[$url];
1174
  foreach($sitems as $key=>$sub){
1175
  $nameSub = $sub[0];
1176
- $urlSub = $sub[2];
1177
  $removeSub = false;
1178
- $nameSub = $this->menu_item_cleartext($nameSub);
1179
  $s[$key]=array(
1180
  'name'=>$nameSub,
1181
  'new'=>'',
@@ -1184,7 +1203,7 @@ class AGCA{
1184
  );
1185
 
1186
  if(isset($pc['submenus'][$key])){
1187
- $s[$key]['new'] = $pc['submenus'][$key]['new'];
1188
  $s[$key]['remove'] = $pc['submenus'][$key]['remove'];
1189
 
1190
  if($s[$key]['new'] == null){
@@ -1211,7 +1230,7 @@ class AGCA{
1211
  $pc = $previousCustomizations[$url];
1212
  if(isset($pc)){
1213
  $m[$url]['remove'] = $pc['remove'];
1214
- $m[$url]['new'] = $pc['new'];
1215
  }
1216
  }
1217
  }
@@ -1354,6 +1373,7 @@ class AGCA{
1354
  }
1355
  function print_admin_css()
1356
  {
 
1357
  $wpversion = $this->get_wp_version();
1358
  $this->context = "admin";
1359
  $currentScreen = get_current_screen();
@@ -1362,12 +1382,14 @@ class AGCA{
1362
  var wpversion = "<?php echo $wpversion; ?>";
1363
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
1364
  var agca_version = "<?php echo $this->agca_version; ?>";
 
 
1365
  var errors = false;
1366
  var isSettingsImport = false;
1367
  var isCusminActive = <?php echo $this->isCusminActive()?'true':'false'; ?>;
1368
  var agca_context = "admin";
1369
  var roundedSidberSize = 0;
1370
- var agca_admin_menu = <?php echo json_encode($this->get_menu_customizations()) ?>;
1371
  var agca_string = {
1372
  file_imp_not_sel: '<?php _e('File for import is not selected!', 'ag-custom-admin'); ?>',
1373
  menu_general: '<?php _e('General', 'ag-custom-admin'); ?>',
@@ -1476,11 +1498,11 @@ class AGCA{
1476
  <?php } else{ ?>
1477
  <?php if(get_option('agca_admin_menu_brand')!=""){ ?>
1478
  additionalStyles = ' style="margin-bottom:-4px" ';
1479
- jQuery("#adminmenu").before('<div '+additionalStyles+' id="sidebar_adminmenu_logo"><img width="160" src="<?php echo get_option('agca_admin_menu_brand'); ?>" /></div>');
1480
  <?php } ?>
1481
  <?php if(get_option('agca_admin_menu_brand_link')!=""){ ?>
1482
 
1483
- var href = "<?php echo get_option('agca_admin_menu_brand_link'); ?>";
1484
  href = href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
1485
 
1486
  jQuery("#sidebar_adminmenu_logo").attr('onclick','window.open(\"'+ href+ '\");');
@@ -1493,10 +1515,10 @@ class AGCA{
1493
  <?php } ?>
1494
 
1495
  <?php if(get_option('agca_admin_menu_submenu_round')==true){ ?>
1496
- jQuery("#adminmenu .wp-submenu").css("border-radius","<?php echo get_option('agca_admin_menu_submenu_round_size'); ?>px");
1497
  jQuery("#adminmenu .wp-menu-open .wp-submenu").css('border-radius','');
1498
- <?php $roundedSidebarSize = get_option('agca_admin_menu_submenu_round_size'); ?>
1499
- roundedSidberSize = <?php echo ($roundedSidebarSize == "")?"0":$roundedSidebarSize; ?>;
1500
 
1501
 
1502
  <?php } ?>
@@ -1537,13 +1559,13 @@ class AGCA{
1537
  <?php } ?>
1538
 
1539
  <?php if(get_option('agca_footer_left')!=""){ ?>
1540
- jQuery("#footer-left").html('<?php echo addslashes(get_option('agca_footer_left')); ?>');
1541
  <?php } ?>
1542
  <?php if(get_option('agca_footer_left_hide')==true){ ?>
1543
  jQuery("#footer-left").css("display","none");
1544
  <?php } ?>
1545
  <?php if(get_option('agca_footer_right')!=""){ ?>
1546
- jQuery("#footer-upgrade").html('<?php echo addslashes(get_option('agca_footer_right')); ?>');
1547
  <?php } ?>
1548
  <?php if(get_option('agca_footer_right_hide')==true){ ?>
1549
  jQuery("#footer-upgrade").css("display","none");
@@ -1559,7 +1581,7 @@ class AGCA{
1559
  }
1560
  <?php } ?>
1561
  <?php if(get_option('agca_dashboard_text')!=""){ ?>
1562
- jQuery("#dashboard-widgets-wrap").parent().find("h1").html("<?php echo addslashes(get_option('agca_dashboard_text')); ?>");
1563
  <?php } ?>
1564
  <?php if(get_option('agca_dashboard_text_paragraph')!=""){
1565
  require_once($this->filePath('wp-includes/formatting.php'));
@@ -1765,22 +1787,22 @@ class AGCA{
1765
  jQuery(document).ready(function() {
1766
  try{
1767
  <?php if(get_option('agca_login_round_box')==true){ ?>
1768
- jQuery("form#loginform").css("border-radius","<?php echo get_option('agca_login_round_box_size'); ?>px");
1769
  <?php if(!get_option('agca_login_round_box_skip_logo')){ ?>
1770
- jQuery("#login h1 a").css("border-radius","<?php echo get_option('agca_login_round_box_size'); ?>px");
1771
  jQuery("#login h1 a").css("margin-bottom",'10px');
1772
  jQuery("#login h1 a").css("padding-bottom",'0');
1773
  <?php } ?>
1774
- jQuery("form#lostpasswordform").css("border-radius","<?php echo get_option('agca_login_round_box_size'); ?>px");
1775
  <?php } ?>
1776
  <?php if(get_option('agca_login_banner')==true){ ?>
1777
  jQuery("#backtoblog").css("display","none");
1778
  <?php } ?>
1779
  <?php if(get_option('agca_login_banner_text')==true){ ?>
1780
- jQuery("#backtoblog a").html('<?php echo "← " . addslashes(get_option('agca_login_banner_text')); ?>');
1781
  <?php } ?>
1782
  <?php if(get_option('agca_login_photo_url')==true && get_option('agca_login_photo_remove')!=true){ ?>
1783
- advanced_url = "<?php echo get_option('agca_login_photo_url'); ?>";
1784
  var $url = "url(" + advanced_url + ")";
1785
  jQuery("#login h1 a").css("background",$url+' no-repeat');
1786
  jQuery("#login h1 a").hide();
@@ -1806,7 +1828,7 @@ class AGCA{
1806
  });
1807
  <?php } ?>
1808
  <?php if(get_option('agca_login_photo_href')==true){ ?>
1809
- var $href = "<?php echo get_option('agca_login_photo_href'); ?>";
1810
  $href = $href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
1811
 
1812
  jQuery("#login h1 a").attr("href",$href);
@@ -1831,7 +1853,7 @@ class AGCA{
1831
  <?php if(get_option('agca_login_register_href')!=""){ ?>
1832
  jQuery('p#nav a').each(function(){
1833
  if(jQuery(this).attr('href').indexOf('register') != -1){
1834
- jQuery(this).attr('href','<?php echo get_option('agca_login_register_href'); ?>');
1835
  }
1836
  });
1837
 
@@ -2001,6 +2023,14 @@ class AGCA{
2001
  <td>
2002
  </td>
2003
  </tr>
 
 
 
 
 
 
 
 
2004
  <tr>
2005
  <td>
2006
  <p>Need to apply multiple configurations to multiple user groups/roles? <a href="https://cusmin.com/docs/general/configuration-management?ref=agca" target="_blank">Upgrade to Cusmin</a></p>
@@ -2325,7 +2355,10 @@ class AGCA{
2325
  ?>
2326
  <tr valign="center">
2327
  <th scope="row">
2328
- <label title="<?php _e('Adds custom text (or HTML) between heading and widgets area on Dashboard page', 'ag-custom-admin'); ?>" for="agca_dashboard_text_paragraph"><?php _e('Add custom Dashboard content<br> <em>(text or HTML content)', 'ag-custom-admin'); ?></em></label>
 
 
 
2329
  </th>
2330
  <td class="agca_editor">
2331
  <?php $this->getTextEditor('agca_dashboard_text_paragraph'); ?>
@@ -2719,6 +2752,7 @@ class AGCA{
2719
  <tr valign="center">
2720
  <th scope="row">
2721
  <label title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>" for="agca_script_css"><?php _e('Custom CSS script', 'ag-custom-admin'); ?></em></label>
 
2722
  </th>
2723
  <td>
2724
  <textarea style="width:100%;height:200px" title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>" rows="5" id="agca_custom_css" name="agca_custom_css" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_css')); ?></textarea>
@@ -2727,6 +2761,7 @@ class AGCA{
2727
  <tr valign="center">
2728
  <th scope="row">
2729
  <label title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>" for="agca_custom_js"><?php _e('Custom JavaScript', 'ag-custom-admin'); ?></label>
 
2730
  </th>
2731
  <td>
2732
  <textarea style="width:100%;height:200px" title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>" rows="5" name="agca_custom_js" id="agca_custom_js" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_js')); ?></textarea>
@@ -2853,7 +2888,7 @@ class AGCA{
2853
  <label title="<?php echo $data['title'] ?>" for="<?php echo $data['name'] ?>"><?php echo $data['label'] ?></label>
2854
  </th>
2855
  <td>
2856
- <input id="<?php echo $data['name'] ?>" title="<?php echo $data['title'] ?>" type="text" size="47" name="<?php echo $data['name'] ?>" value="<?php echo get_option($data['name']); ?>" />
2857
  <a title="<?php _e('Clear', 'ag-custom-admin'); ?>" class="agca_button clear" onClick="jQuery('#<?php echo $data['name'] ?>').val('');"><span class="dashicons clear dashicons-no-alt"></span></a><?php echo $suffix ?>
2858
  <?php echo $strHint ?>
2859
  </td>
4
  Plugin URI: https://cusmin.com/agca
5
  Description: All-in-one plugin for WordPress dashboard customization. Change almost everything: admin menu, dashboard, login page, admin bar and much more.
6
  Author: Cusmin
7
+ Version: 6.9
8
  Text Domain: ag-custom-admin
9
  Domain Path: /languages
10
  Author URI: https://cusmin.com/
28
  $agca = new AGCA();
29
 
30
  class AGCA{
31
+ private $agca_version = "6.9";
32
  private $colorizer="";
33
  private $agca_debug = false;
34
  private $admin_capabilities;
63
  add_action( 'customize_controls_enqueue_scripts', array(&$this,'agca_customizer_php') );
64
 
65
  add_action( 'admin_bar_menu', array(&$this,'wp_admin_bar_my_custom_account_menu'), 11 );
66
+ add_action( 'updated_option', array(&$this,'after_update_option'), 10, 3);
67
 
68
  /* wp_localize_script(
69
  'agca-script',//use agca enqueued script
73
 
74
  /*Initialize properties*/
75
  $this->colorizer = $this->jsonMenuArray(get_option('ag_colorizer_json'),'colorizer');
76
+
77
  }
78
 
79
  function isAGCASettingsPage() {
115
  return 'default';
116
  }
117
 
118
+ //Prevent non-admin users to update sensitive options
119
+ //Revert option value to previous
120
+ function after_update_option( $option, $old_value, $new_value ){
121
+ if(!current_user_can('administrator')) {
122
+ if($option === 'agca_dashboard_text_paragraph' ||
123
+ $option === 'agca_custom_css' ||
124
+ $option === 'agca_custom_js' ) {
125
+ remove_action( 'updated_option', array(&$this,'after_update_option'));
126
+ update_option($option, $old_value);
127
+ add_action( 'updated_option', array(&$this,'after_update_option'), 10, 3);
128
+ }
129
+ }
130
+ }
131
+
132
  function agca_customizer_php(){
133
  $this->agca_get_includes();
134
  }
171
  function checkPOST(){
172
  }
173
 
174
+ function printFieldSecurityProtected(){
175
+ ?><p style="color: red">(&nbsp;For security reasons, this field is available for editing only to WordPress <b>Administrators</b> group&nbsp;)</p><?php
176
+ }
177
+
178
  function verifyPostRequest(){
179
  if ($_SERVER['REQUEST_METHOD'] === 'POST') {
180
  if (!is_admin()) {
249
  $customTitle = get_option('agca_custom_title');
250
  $customTitle = str_replace('%BLOG%',$blog,$customTitle);
251
  $customTitle = str_replace('%PAGE%',$page,$customTitle);
252
+ return htmlentities($customTitle);
253
  }else{
254
+ return htmlentities($admin_title);
255
  }
256
  }
257
  function agca_get_includes() {
286
  if(!((get_option('agca_role_allbutadmin')==true) and (current_user_can($this->admin_capability())))){
287
  ?>
288
  <style type="text/css">
289
+ <?php echo get_option('agca_custom_css'); ?>
 
 
290
  </style>
291
  <script type="text/javascript">
292
  try{
907
  <?php } ?>
908
  <?php if(get_option('agca_header_logo_custom')!=""){ ?>
909
 
910
+ var img_url = '<?php echo htmlentities(addslashes(get_option('agca_header_logo_custom'))); ?>';
911
 
912
  advanced_url = img_url;
913
  image = jQuery("<img id=\"admin-top-branding-logo\" style='max-width:98%;position:relative;'/>").attr("src",advanced_url);
918
  <?php } ?>
919
  <?php if(get_option('agca_wp_logo_custom')!=""){ ?>
920
  jQuery("li#wp-admin-bar-wp-logo a.ab-item span.ab-icon")
921
+ .html("<img style=\"height:32px;margin-top:0\" src=\"<?php echo htmlentities(get_option('agca_wp_logo_custom')); ?>\" />")
922
  .css('background-image','none')
923
  .css('width','auto');
924
  jQuery("li#wp-admin-bar-wp-logo > a.ab-item")
933
 
934
  <?php } ?>
935
  <?php if(get_option('agca_wp_logo_custom_link')!=""){ ?>
936
+ var href = "<?php echo htmlentities(get_option('agca_wp_logo_custom_link')); ?>";
937
  href = href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
938
  if(href == "%SWITCH%"){
939
  href = "<?php echo get_bloginfo('wpurl'); ?>";
949
  jQuery("#wphead #site-heading").css("display","none");
950
  <?php } ?>
951
  <?php if(get_option('agca_custom_site_heading')!=""){ ?>
952
+ jQuery("#wphead #site-heading").after('<h1><?php echo htmlentities(addslashes(get_option('agca_custom_site_heading'))); ?></h1>');
953
+ jQuery("#wp-admin-bar-site-name a:first").html('<?php echo htmlentities(addslashes(get_option('agca_custom_site_heading'))); ?>');
954
 
955
  <?php } ?>
956
  <?php if(get_option('agca_header')==true && $this->context =='admin'){
965
  <?php
966
  $agca_logout_text = ((get_option('agca_logout')=="")?__("Log Out", 'ag-custom-admin'):get_option('agca_logout'));
967
  ?>
968
+ jQuery("#wpbody-content").prepend('<a href="<?php echo wp_logout_url(); ?>" tabindex="10" style="float:right;margin-right:20px" class="ab-item agca_logout_button"><?php echo htmlentities($agca_logout_text); ?></a>');
969
 
970
 
971
  <?php } ?>
976
  }
977
  ?>
978
  <?php if(get_option('agca_logout')!=""){ ?>
979
+ jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-logout a").text("<?php echo htmlentities(get_option('agca_logout')); ?>");
980
  <?php } ?>
981
  <?php if(get_option('agca_remove_your_profile')==true){ ?>
982
  jQuery("ul#wp-admin-bar-user-actions li#wp-admin-bar-edit-profile").css("visibility","hidden");
1007
  if ( 0 != $user_id ) {
1008
  /* Add the "My Account" menu */
1009
  $avatar = get_avatar( $user_id, 28 );
1010
+ $howdy = htmlspecialchars(sprintf( __(get_option('agca_howdy').', %1$s'), $current_user->display_name ), ENT_QUOTES, 'UTF-8');
1011
  $class = empty( $avatar ) ? '' : 'with-avatar';
1012
 
1013
  $wp_admin_bar->add_menu( array(
1065
  $capabilitySelector .="<option value=\"$k\" $selected >".ucwords(str_replace('_', ' ', $k))."</option>\n";
1066
  }
1067
 
1068
+ $this->admin_capabilities = "<select class=\"agca-selectbox\" id=\"agca_admin_capability\" name=\"agca_admin_capability\" val=\"upload_files\" onchange='agca_show_affected_groups()'>".$capabilitySelector."</select>";
1069
  }
1070
 
1071
  function admin_capability(){
1173
  $m = array();
1174
  foreach($menu as $top){
1175
  $name = $top[0];
1176
+ $url = htmlentities($top[2]);
1177
  $cls = isset($top[5])?$top[5]:"";
1178
  $remove = false;
1179
  if($name == '') continue;
1180
  $pc = null;
1181
+ $name = htmlentities($this->menu_item_cleartext($name));
1182
+
1183
 
1184
  //apply previous submenu customizations
1185
  if($customizationsSet && isset($previousCustomizations[$url])){
1192
  $sitems = $submenu[$url];
1193
  foreach($sitems as $key=>$sub){
1194
  $nameSub = $sub[0];
1195
+ $urlSub = htmlentities($sub[2]);
1196
  $removeSub = false;
1197
+ $nameSub = htmlentities($this->menu_item_cleartext($nameSub));
1198
  $s[$key]=array(
1199
  'name'=>$nameSub,
1200
  'new'=>'',
1203
  );
1204
 
1205
  if(isset($pc['submenus'][$key])){
1206
+ $s[$key]['new'] = htmlentities($pc['submenus'][$key]['new']);
1207
  $s[$key]['remove'] = $pc['submenus'][$key]['remove'];
1208
 
1209
  if($s[$key]['new'] == null){
1230
  $pc = $previousCustomizations[$url];
1231
  if(isset($pc)){
1232
  $m[$url]['remove'] = $pc['remove'];
1233
+ $m[$url]['new'] = htmlentities($pc['new']);
1234
  }
1235
  }
1236
  }
1373
  }
1374
  function print_admin_css()
1375
  {
1376
+ global $wp_roles;
1377
  $wpversion = $this->get_wp_version();
1378
  $this->context = "admin";
1379
  $currentScreen = get_current_screen();
1382
  var wpversion = "<?php echo $wpversion; ?>";
1383
  var agca_debug = <?php echo ($this->agca_debug)?"true":"false"; ?>;
1384
  var agca_version = "<?php echo $this->agca_version; ?>";
1385
+ var agca_wp_groups = <?php echo json_encode($wp_roles->roles); ?>;
1386
+ var agca_selected_capability = "<?php echo $this->admin_capability(); ?>";
1387
  var errors = false;
1388
  var isSettingsImport = false;
1389
  var isCusminActive = <?php echo $this->isCusminActive()?'true':'false'; ?>;
1390
  var agca_context = "admin";
1391
  var roundedSidberSize = 0;
1392
+ var agca_admin_menu = <?php echo json_encode($this->get_menu_customizations()); ?>;
1393
  var agca_string = {
1394
  file_imp_not_sel: '<?php _e('File for import is not selected!', 'ag-custom-admin'); ?>',
1395
  menu_general: '<?php _e('General', 'ag-custom-admin'); ?>',
1498
  <?php } else{ ?>
1499
  <?php if(get_option('agca_admin_menu_brand')!=""){ ?>
1500
  additionalStyles = ' style="margin-bottom:-4px" ';
1501
+ jQuery("#adminmenu").before('<div '+additionalStyles+' id="sidebar_adminmenu_logo"><img width="160" src="<?php echo htmlentities(get_option('agca_admin_menu_brand')); ?>" /></div>');
1502
  <?php } ?>
1503
  <?php if(get_option('agca_admin_menu_brand_link')!=""){ ?>
1504
 
1505
+ var href = "<?php echo htmlentities(get_option('agca_admin_menu_brand_link')); ?>";
1506
  href = href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
1507
 
1508
  jQuery("#sidebar_adminmenu_logo").attr('onclick','window.open(\"'+ href+ '\");');
1515
  <?php } ?>
1516
 
1517
  <?php if(get_option('agca_admin_menu_submenu_round')==true){ ?>
1518
+ jQuery("#adminmenu .wp-submenu").css("border-radius","<?php echo intval(htmlentities(get_option('agca_admin_menu_submenu_round_size'))); ?>px");
1519
  jQuery("#adminmenu .wp-menu-open .wp-submenu").css('border-radius','');
1520
+ <?php $roundedSidebarSize = htmlentities(get_option('agca_admin_menu_submenu_round_size')); ?>
1521
+ roundedSidberSize = <?php echo intval(($roundedSidebarSize == "") ? "0" : $roundedSidebarSize); ?>;
1522
 
1523
 
1524
  <?php } ?>
1559
  <?php } ?>
1560
 
1561
  <?php if(get_option('agca_footer_left')!=""){ ?>
1562
+ jQuery("#footer-left").html('<?php echo htmlentities(addslashes(get_option('agca_footer_left'))); ?>');
1563
  <?php } ?>
1564
  <?php if(get_option('agca_footer_left_hide')==true){ ?>
1565
  jQuery("#footer-left").css("display","none");
1566
  <?php } ?>
1567
  <?php if(get_option('agca_footer_right')!=""){ ?>
1568
+ jQuery("#footer-upgrade").html('<?php echo htmlentities(addslashes(get_option('agca_footer_right'))); ?>');
1569
  <?php } ?>
1570
  <?php if(get_option('agca_footer_right_hide')==true){ ?>
1571
  jQuery("#footer-upgrade").css("display","none");
1581
  }
1582
  <?php } ?>
1583
  <?php if(get_option('agca_dashboard_text')!=""){ ?>
1584
+ jQuery("#dashboard-widgets-wrap").parent().find("h1").html("<?php echo htmlentities(addslashes(get_option('agca_dashboard_text'))); ?>");
1585
  <?php } ?>
1586
  <?php if(get_option('agca_dashboard_text_paragraph')!=""){
1587
  require_once($this->filePath('wp-includes/formatting.php'));
1787
  jQuery(document).ready(function() {
1788
  try{
1789
  <?php if(get_option('agca_login_round_box')==true){ ?>
1790
+ jQuery("form#loginform").css("border-radius","<?php echo intval(htmlentities(get_option('agca_login_round_box_size'))); ?>px");
1791
  <?php if(!get_option('agca_login_round_box_skip_logo')){ ?>
1792
+ jQuery("#login h1 a").css("border-radius","<?php echo intval(htmlentities(get_option('agca_login_round_box_size'))); ?>px");
1793
  jQuery("#login h1 a").css("margin-bottom",'10px');
1794
  jQuery("#login h1 a").css("padding-bottom",'0');
1795
  <?php } ?>
1796
+ jQuery("form#lostpasswordform").css("border-radius","<?php echo intval(htmlentities(get_option('agca_login_round_box_size'))); ?>px");
1797
  <?php } ?>
1798
  <?php if(get_option('agca_login_banner')==true){ ?>
1799
  jQuery("#backtoblog").css("display","none");
1800
  <?php } ?>
1801
  <?php if(get_option('agca_login_banner_text')==true){ ?>
1802
+ jQuery("#backtoblog a").html('<?php echo "← " . htmlentities(addslashes(get_option('agca_login_banner_text'))); ?>');
1803
  <?php } ?>
1804
  <?php if(get_option('agca_login_photo_url')==true && get_option('agca_login_photo_remove')!=true){ ?>
1805
+ advanced_url = "<?php echo htmlentities(get_option('agca_login_photo_url')); ?>";
1806
  var $url = "url(" + advanced_url + ")";
1807
  jQuery("#login h1 a").css("background",$url+' no-repeat');
1808
  jQuery("#login h1 a").hide();
1828
  });
1829
  <?php } ?>
1830
  <?php if(get_option('agca_login_photo_href')==true){ ?>
1831
+ var $href = "<?php echo htmlentities(get_option('agca_login_photo_href')); ?>";
1832
  $href = $href.replace("%BLOG%", "<?php echo get_bloginfo('wpurl'); ?>");
1833
 
1834
  jQuery("#login h1 a").attr("href",$href);
1853
  <?php if(get_option('agca_login_register_href')!=""){ ?>
1854
  jQuery('p#nav a').each(function(){
1855
  if(jQuery(this).attr('href').indexOf('register') != -1){
1856
+ jQuery(this).attr('href','<?php echo htmlentities(get_option('agca_login_register_href')); ?>');
1857
  }
1858
  });
1859
 
2023
  <td>
2024
  </td>
2025
  </tr>
2026
+ <tr valign="center">
2027
+ <td>
2028
+ <p>These groups are AGCA administrators:</p>
2029
+ </td>
2030
+ <td>
2031
+ <div id="agca-affected-roles">Loading...</div>
2032
+ </td>
2033
+ </tr>
2034
  <tr>
2035
  <td>
2036
  <p>Need to apply multiple configurations to multiple user groups/roles? <a href="https://cusmin.com/docs/general/configuration-management?ref=agca" target="_blank">Upgrade to Cusmin</a></p>
2355
  ?>
2356
  <tr valign="center">
2357
  <th scope="row">
2358
+ <label title="<?php _e('Adds custom text (or HTML) between heading and widgets area on Dashboard page', 'ag-custom-admin'); ?>" for="agca_dashboard_text_paragraph">
2359
+ <?php _e('Add custom Dashboard content<br> <em>(&nbsp;text or HTML content&nbsp;)', 'ag-custom-admin'); ?></em>
2360
+ <?php $this->printFieldSecurityProtected(); ?>
2361
+ </label>
2362
  </th>
2363
  <td class="agca_editor">
2364
  <?php $this->getTextEditor('agca_dashboard_text_paragraph'); ?>
2752
  <tr valign="center">
2753
  <th scope="row">
2754
  <label title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>" for="agca_script_css"><?php _e('Custom CSS script', 'ag-custom-admin'); ?></em></label>
2755
+ <?php $this->printFieldSecurityProtected(); ?>
2756
  </th>
2757
  <td>
2758
  <textarea style="width:100%;height:200px" title="<?php _e('Add custom CSS script to override existing styles', 'ag-custom-admin'); ?>" rows="5" id="agca_custom_css" name="agca_custom_css" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_css')); ?></textarea>
2761
  <tr valign="center">
2762
  <th scope="row">
2763
  <label title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>" for="agca_custom_js"><?php _e('Custom JavaScript', 'ag-custom-admin'); ?></label>
2764
+ <?php $this->printFieldSecurityProtected(); ?>
2765
  </th>
2766
  <td>
2767
  <textarea style="width:100%;height:200px" title="<?php _e('Add additional custom JavaScript', 'ag-custom-admin'); ?>" rows="5" name="agca_custom_js" id="agca_custom_js" cols="40"><?php echo htmlspecialchars(get_option('agca_custom_js')); ?></textarea>
2888
  <label title="<?php echo $data['title'] ?>" for="<?php echo $data['name'] ?>"><?php echo $data['label'] ?></label>
2889
  </th>
2890
  <td>
2891
+ <input id="<?php echo $data['name'] ?>" title="<?php echo $data['title'] ?>" type="text" size="47" name="<?php echo $data['name'] ?>" value="<?php echo htmlentities(get_option($data['name'])); ?>" />
2892
  <a title="<?php _e('Clear', 'ag-custom-admin'); ?>" class="agca_button clear" onClick="jQuery('#<?php echo $data['name'] ?>').val('');"><span class="dashicons clear dashicons-no-alt"></span></a><?php echo $suffix ?>
2893
  <?php echo $strHint ?>
2894
  </td>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=agca@cus
4
  Tags: admin, dashboard, customize, hide, admin bar, login page, admin menu, colors, branding, dashboard widgets
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
- Stable tag: 6.8.1
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl.txt
10
 
@@ -21,8 +21,8 @@ With this plugin you can easily customize WordPress **admin panel**, **login pag
21
 
22
  = Recommended =
23
  > <strong>[CUSMIN](https://cusmin.com/?ref=wporg)</strong><br>
24
- > Cusmin is the premium version of the Absolutely Glamorous Custom Admin with the advanced features for customization and branding. It's perfect for professionals, but can be used on personal sites as well.<br><br>
25
- > For more info about Cusmin, please check how this pro plugin can help you completely [customize your WordPress dashboard](https://cusmin.com/blog/customize-wordpress-admin-dashboard-with-cusmin?ref=wporg).<br><br>
26
 
27
  = General Settings =
28
  * Hide **Screen Options** menu
@@ -99,7 +99,7 @@ With this plugin you can easily customize WordPress **admin panel**, **login pag
99
  * Export/import customizations settings
100
 
101
  > <strong>[PRO FEATURES](https://cusmin.com/?ref=wporg-bottom)</strong><br>
102
- > If you are a more advanced user or agency please check our [pro WordPress customizing plugin](https://cusmin.com/blog/customize-wordpress-admin-dashboard-with-cusmin?ref=wporg-bottom).<br><br>
103
 
104
  = Contact =
105
  For any additional help, please check our [FAQ](http://wordpress.org/extend/plugins/ag-custom-admin/faq/) and [SUPPORT](http://wordpress.org/support/plugin/ag-custom-admin) page.
@@ -114,14 +114,14 @@ For any additional help, please check our [FAQ](http://wordpress.org/extend/plug
114
 
115
  = I see errors on my page. What can I do? =
116
  Please follow these steps:
117
- <br>* Open browser's console and try to find JavaScript errors.
118
- <br>* Check if you can locate the plugin that throws the error, if so, try disabling that plugin and contacting their support.
119
  <br>* Try disabling plugins one-by-one to see when this problem occurs. If you can't access login page, please temporary disable JavaScript in your browser and refresh the page.
120
  <br>* Try updating WordPress core and plugins
121
  <br>* If problem still persists, please contact the support
122
 
123
  = The plugin does not work after upgrading. What should I do? =
124
- Make sure to have latest WordPress version installed. If nothing of these solutions help, please contact support.
125
 
126
  = I use older version of WordPress, can I still use this plugin? =
127
  It's highly recommended to update WordPress to the latest, since attackers target especially older versions of WP,
@@ -136,7 +136,7 @@ If you have the latest WordPress and plugin versions and you still experience so
136
 
137
  == Screenshots ==
138
 
139
- 1. Absolutely Glamorous Custom Admin provides many options for admin panel customization, and it's quite easy to use it.
140
  2. Login page can be customized and styled with custom branding logo or image, rounded borders, background colors.
141
  3. Colorizer options for branding with custom colors.
142
  4. Custom Admin menu items.
@@ -150,6 +150,9 @@ If you have the latest WordPress and plugin versions and you still experience so
150
 
151
  == Change Log ==
152
 
 
 
 
153
  = 6.8.1 =
154
  * WordPress 5.8 ready
155
  * Fixing responsive issues
@@ -612,6 +615,9 @@ If you have the latest WordPress and plugin versions and you still experience so
612
 
613
  == Upgrade Notice ==
614
 
 
 
 
615
  = 6.8.1 =
616
  * WordPress 5.8 ready, responsive improvements and bug fixing
617
 
4
  Tags: admin, dashboard, customize, hide, admin bar, login page, admin menu, colors, branding, dashboard widgets
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 6.9
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl.txt
10
 
21
 
22
  = Recommended =
23
  > <strong>[CUSMIN](https://cusmin.com/?ref=wporg)</strong><br>
24
+ > Cusmin is the premium version of the Absolutely Glamorous Custom Admin with the advanced features for customization and branding. It's perfect for professionals, but can be also used on personal sites as well.<br><br>
25
+ > Please check how this pro plugin can help you to completely [customize your WordPress dashboard](https://cusmin.com/blog/customize-wordpress-admin-dashboard-with-cusmin?ref=wporg).<br><br>
26
 
27
  = General Settings =
28
  * Hide **Screen Options** menu
99
  * Export/import customizations settings
100
 
101
  > <strong>[PRO FEATURES](https://cusmin.com/?ref=wporg-bottom)</strong><br>
102
+ > If you need even more advanced customization options, please check our [PRO WordPress customizing plugin](https://cusmin.com/blog/customize-wordpress-admin-dashboard-with-cusmin?ref=wporg-bottom).<br><br>
103
 
104
  = Contact =
105
  For any additional help, please check our [FAQ](http://wordpress.org/extend/plugins/ag-custom-admin/faq/) and [SUPPORT](http://wordpress.org/support/plugin/ag-custom-admin) page.
114
 
115
  = I see errors on my page. What can I do? =
116
  Please follow these steps:
117
+ <br>* Open the browser's console and try to find JavaScript errors.
118
+ <br>* Check if you can locate the plugin that throws errors, if so, try disabling that plugin and contacting their support.
119
  <br>* Try disabling plugins one-by-one to see when this problem occurs. If you can't access login page, please temporary disable JavaScript in your browser and refresh the page.
120
  <br>* Try updating WordPress core and plugins
121
  <br>* If problem still persists, please contact the support
122
 
123
  = The plugin does not work after upgrading. What should I do? =
124
+ Make sure you have the latest WordPress version installed. If nothing of these solutions help, please contact support.
125
 
126
  = I use older version of WordPress, can I still use this plugin? =
127
  It's highly recommended to update WordPress to the latest, since attackers target especially older versions of WP,
136
 
137
  == Screenshots ==
138
 
139
+ 1. Absolutely Glamorous Custom Admin provides many options for admin panel customization, and it's quite easy to use.
140
  2. Login page can be customized and styled with custom branding logo or image, rounded borders, background colors.
141
  3. Colorizer options for branding with custom colors.
142
  4. Custom Admin menu items.
150
 
151
  == Change Log ==
152
 
153
+ = 6.9 =
154
+ * Important security updates
155
+
156
  = 6.8.1 =
157
  * WordPress 5.8 ready
158
  * Fixing responsive issues
615
 
616
  == Upgrade Notice ==
617
 
618
+ = 6.9 =
619
+ * Important security updates
620
+
621
  = 6.8.1 =
622
  * WordPress 5.8 ready, responsive improvements and bug fixing
623
 
script/ag_script.js CHANGED
@@ -335,9 +335,9 @@ jQuery(document).ready(function(){
335
  //dont use first button for adding new buttons
336
  if(element > 0){
337
  if(jQuery(this).html() == editingButtonNow){
338
- jQuery(this).attr('title',url);
339
  jQuery(this).attr('target',target);
340
- jQuery(this).html(name);
341
  }
342
  }
343
  element++;
@@ -440,7 +440,7 @@ jQuery(document).ready(function(){
440
  jQuery('#ag_add_adminmenu_name').val("");
441
  jQuery('#ag_add_adminmenu_url').val("");
442
  jQuery('#ag_add_adminmenu_target').val("_self");
443
- jQuery('#ag_add_adminmenu').append('<tr><td colspan="2"><button target="'+target+'" title="'+url+'" type="button" class="button-secondary">'+name+'</button>&nbsp;<a style="cursor:pointer;" title="Edit" class="button_edit"><span class="dashicons dashicons-edit"></span></a>&nbsp;<a style="cursor:pointer" title="'+agca_string.delete+'" class="button_remove"><span class="dashicons dashicons-no"></span></a></td><td></td></tr>');
444
  reloadRemoveButtonEvents();
445
  });
446
 
@@ -599,6 +599,12 @@ function agca_escapeChars(str){
599
  //return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
600
  }
601
 
 
 
 
 
 
 
602
  /*C O L O R I Z E R*/
603
  function updateTargetColor(id, color){
604
  switch(id)
@@ -913,4 +919,30 @@ jQuery(document).ready(function() {
913
  }
914
  }
915
 
916
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  //dont use first button for adding new buttons
336
  if(element > 0){
337
  if(jQuery(this).html() == editingButtonNow){
338
+ jQuery(this).attr('title',agca_encode_html_string(url));
339
  jQuery(this).attr('target',target);
340
+ jQuery(this).html(agca_encode_html_string(name));
341
  }
342
  }
343
  element++;
440
  jQuery('#ag_add_adminmenu_name').val("");
441
  jQuery('#ag_add_adminmenu_url').val("");
442
  jQuery('#ag_add_adminmenu_target').val("_self");
443
+ jQuery('#ag_add_adminmenu').append('<tr><td colspan="2"><button target="'+target+'" title="'+agca_encode_html_string(url)+'" type="button" class="button-secondary">'+agca_encode_html_string(name)+'</button>&nbsp;<a style="cursor:pointer;" title="Edit" class="button_edit"><span class="dashicons dashicons-edit"></span></a>&nbsp;<a style="cursor:pointer" title="'+agca_string.delete+'" class="button_remove"><span class="dashicons dashicons-no"></span></a></td><td></td></tr>');
444
  reloadRemoveButtonEvents();
445
  });
446
 
599
  //return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
600
  }
601
 
602
+ function agca_encode_html_string(rawStr) {
603
+ return rawStr.replace(/[\u00A0-\u9999<>\&]/g, function(i) {
604
+ return '&#'+i.charCodeAt(0)+';';
605
+ });
606
+ }
607
+
608
  /*C O L O R I Z E R*/
609
  function updateTargetColor(id, color){
610
  switch(id)
919
  }
920
  }
921
 
922
+ })(jQuery);
923
+
924
+ window.agca_show_affected_groups = function() {
925
+ var selCapability = document.getElementById('agca_admin_capability').value;
926
+ if(!selCapability) {
927
+ selCapability = window.agca_selected_capability;
928
+ }
929
+ var groups = [];
930
+ var error = '';
931
+ for(var slug in window.agca_wp_groups) {
932
+ var g = window.agca_wp_groups[slug];
933
+ if(g['capabilities'][selCapability]) {
934
+ groups.push(g.name);
935
+ if(slug === 'subscriber' || slug === 'contributor' || slug === 'author') {
936
+ error = '<p style="color: red; filter: none;max-width: 600px;">You have selected a capability that include low level user groups. Please remember that these user groups can make additional changes to AGCA.</p>';
937
+ }
938
+ }
939
+ }
940
+ document.getElementById('agca-affected-roles').innerHTML = '<b>' + groups.join(', ') + '</b>' + error;
941
+ }
942
+
943
+ window.agcaGroupsLoaded = window.setInterval(function(){
944
+ if(document.getElementById('agca_admin_capability')) {
945
+ clearInterval(window.agcaGroupsLoaded);
946
+ window.agca_show_affected_groups();
947
+ }
948
+ }, 100);
tests/_bootstrap.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define('AGCA_SITE_URL','http://wp47.dev');
3
  define('AGCA_SITE_USERNAME','admin');
4
  define('AGCA_SITE_PASSWORD','admin');
5
  define('AGCA_SITE_SUBSCRIBER_USERNAME','subscriber');
1
  <?php
2
+ define('AGCA_SITE_URL','https://wp47.dev');
3
  define('AGCA_SITE_USERNAME','admin');
4
  define('AGCA_SITE_PASSWORD','admin');
5
  define('AGCA_SITE_SUBSCRIBER_USERNAME','subscriber');
tests/_support/_generated/AcceptanceTesterActions.php CHANGED
@@ -93,7 +93,7 @@ trait AcceptanceTesterActions
93
  * @param int $height
94
  * @see \Codeception\Module\WebDriver::resizeWindow()
95
  */
96
- public function resizeWindow($width, $height) {
97
  return $this->getScenario()->runStep(new \Codeception\Step\Action('resizeWindow', func_get_args()));
98
  }
99
 
@@ -111,12 +111,12 @@ trait AcceptanceTesterActions
111
  * ```
112
  *
113
  * @param $cookie
114
- * @param array $params
115
  * @return mixed
116
  * Conditional Assertion: Test won't be stopped on fail
117
  * @see \Codeception\Module\WebDriver::seeCookie()
118
  */
119
- public function canSeeCookie($cookie, $params = null) {
120
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
121
  }
122
  /**
@@ -132,11 +132,11 @@ trait AcceptanceTesterActions
132
  * ```
133
  *
134
  * @param $cookie
135
- * @param array $params
136
  * @return mixed
137
  * @see \Codeception\Module\WebDriver::seeCookie()
138
  */
139
- public function seeCookie($cookie, $params = null) {
140
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
141
  }
142
 
@@ -149,12 +149,12 @@ trait AcceptanceTesterActions
149
  *
150
  * @param $cookie
151
  *
152
- * @param array $params
153
  * @return mixed
154
  * Conditional Assertion: Test won't be stopped on fail
155
  * @see \Codeception\Module\WebDriver::dontSeeCookie()
156
  */
157
- public function cantSeeCookie($cookie, $params = null) {
158
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
159
  }
160
  /**
@@ -165,11 +165,11 @@ trait AcceptanceTesterActions
165
  *
166
  * @param $cookie
167
  *
168
- * @param array $params
169
  * @return mixed
170
  * @see \Codeception\Module\WebDriver::dontSeeCookie()
171
  */
172
- public function dontSeeCookie($cookie, $params = null) {
173
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
174
  }
175
 
@@ -188,12 +188,12 @@ trait AcceptanceTesterActions
188
  *
189
  * @param $name
190
  * @param $val
191
- * @param array $params
192
  *
193
  * @return mixed
194
  * @see \Codeception\Module\WebDriver::setCookie()
195
  */
196
- public function setCookie($cookie, $value, $params = null) {
197
  return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
198
  }
199
 
@@ -206,11 +206,11 @@ trait AcceptanceTesterActions
206
  *
207
  * @param $cookie
208
  *
209
- * @param array $params
210
  * @return mixed
211
  * @see \Codeception\Module\WebDriver::resetCookie()
212
  */
213
- public function resetCookie($cookie, $params = null) {
214
  return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
215
  }
216
 
@@ -223,11 +223,11 @@ trait AcceptanceTesterActions
223
  *
224
  * @param $cookie
225
  *
226
- * @param array $params
227
  * @return mixed
228
  * @see \Codeception\Module\WebDriver::grabCookie()
229
  */
230
- public function grabCookie($cookie, $params = null) {
231
  return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
232
  }
233
 
@@ -1623,12 +1623,12 @@ trait AcceptanceTesterActions
1623
  * ```
1624
  *
1625
  * @param $selector
1626
- * @param array $attributes
1627
  * @return
1628
  * Conditional Assertion: Test won't be stopped on fail
1629
  * @see \Codeception\Module\WebDriver::seeElement()
1630
  */
1631
- public function canSeeElement($selector, $attributes = null) {
1632
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
1633
  }
1634
  /**
@@ -1650,11 +1650,11 @@ trait AcceptanceTesterActions
1650
  * ```
1651
  *
1652
  * @param $selector
1653
- * @param array $attributes
1654
  * @return
1655
  * @see \Codeception\Module\WebDriver::seeElement()
1656
  */
1657
- public function seeElement($selector, $attributes = null) {
1658
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
1659
  }
1660
 
@@ -1675,11 +1675,11 @@ trait AcceptanceTesterActions
1675
  * ```
1676
  *
1677
  * @param $selector
1678
- * @param array $attributes
1679
  * Conditional Assertion: Test won't be stopped on fail
1680
  * @see \Codeception\Module\WebDriver::dontSeeElement()
1681
  */
1682
- public function cantSeeElement($selector, $attributes = null) {
1683
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
1684
  }
1685
  /**
@@ -1698,10 +1698,10 @@ trait AcceptanceTesterActions
1698
  * ```
1699
  *
1700
  * @param $selector
1701
- * @param array $attributes
1702
  * @see \Codeception\Module\WebDriver::dontSeeElement()
1703
  */
1704
- public function dontSeeElement($selector, $attributes = null) {
1705
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
1706
  }
1707
 
@@ -2269,12 +2269,12 @@ trait AcceptanceTesterActions
2269
  * ```
2270
  *
2271
  * @param $element
2272
- * @param \Closure $callback
2273
- * @param int $timeout seconds
2274
  * @throws \Codeception\Exception\ElementNotFound
2275
  * @see \Codeception\Module\WebDriver::waitForElementChange()
2276
  */
2277
- public function waitForElementChange($element, $callback, $timeout = null) {
2278
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementChange', func_get_args()));
2279
  }
2280
 
@@ -2293,11 +2293,11 @@ trait AcceptanceTesterActions
2293
  * ```
2294
  *
2295
  * @param $element
2296
- * @param int $timeout seconds
2297
  * @throws \Exception
2298
  * @see \Codeception\Module\WebDriver::waitForElement()
2299
  */
2300
- public function waitForElement($element, $timeout = null) {
2301
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElement', func_get_args()));
2302
  }
2303
 
@@ -2316,11 +2316,11 @@ trait AcceptanceTesterActions
2316
  * ```
2317
  *
2318
  * @param $element
2319
- * @param int $timeout seconds
2320
  * @throws \Exception
2321
  * @see \Codeception\Module\WebDriver::waitForElementVisible()
2322
  */
2323
- public function waitForElementVisible($element, $timeout = null) {
2324
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementVisible', func_get_args()));
2325
  }
2326
 
@@ -2338,11 +2338,11 @@ trait AcceptanceTesterActions
2338
  * ```
2339
  *
2340
  * @param $element
2341
- * @param int $timeout seconds
2342
  * @throws \Exception
2343
  * @see \Codeception\Module\WebDriver::waitForElementNotVisible()
2344
  */
2345
- public function waitForElementNotVisible($element, $timeout = null) {
2346
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementNotVisible', func_get_args()));
2347
  }
2348
 
@@ -2362,12 +2362,12 @@ trait AcceptanceTesterActions
2362
  * ```
2363
  *
2364
  * @param string $text
2365
- * @param int $timeout seconds
2366
  * @param null $selector
2367
  * @throws \Exception
2368
  * @see \Codeception\Module\WebDriver::waitForText()
2369
  */
2370
- public function waitForText($text, $timeout = null, $selector = null) {
2371
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForText', func_get_args()));
2372
  }
2373
 
@@ -2406,7 +2406,7 @@ trait AcceptanceTesterActions
2406
  * @param callable $function
2407
  * @see \Codeception\Module\WebDriver::executeInSelenium()
2408
  */
2409
- public function executeInSelenium($function) {
2410
  return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInSelenium', func_get_args()));
2411
  }
2412
 
@@ -2448,7 +2448,7 @@ trait AcceptanceTesterActions
2448
  * @param string|null $name
2449
  * @see \Codeception\Module\WebDriver::switchToWindow()
2450
  */
2451
- public function switchToWindow($name = null) {
2452
  return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToWindow', func_get_args()));
2453
  }
2454
 
@@ -2476,7 +2476,7 @@ trait AcceptanceTesterActions
2476
  * @param string|null $name
2477
  * @see \Codeception\Module\WebDriver::switchToIFrame()
2478
  */
2479
- public function switchToIFrame($name = null) {
2480
  return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIFrame', func_get_args()));
2481
  }
2482
 
@@ -2495,10 +2495,10 @@ trait AcceptanceTesterActions
2495
  * ```
2496
  *
2497
  * @param string $script
2498
- * @param int $timeout seconds
2499
  * @see \Codeception\Module\WebDriver::waitForJS()
2500
  */
2501
- public function waitForJS($script, $timeout = null) {
2502
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForJS', func_get_args()));
2503
  }
2504
 
@@ -2551,7 +2551,7 @@ trait AcceptanceTesterActions
2551
  * @param string $target (CSS ID or XPath)
2552
  * @see \Codeception\Module\WebDriver::dragAndDrop()
2553
  */
2554
- public function dragAndDrop($source, $target) {
2555
  return $this->getScenario()->runStep(new \Codeception\Step\Action('dragAndDrop', func_get_args()));
2556
  }
2557
 
@@ -2571,13 +2571,13 @@ trait AcceptanceTesterActions
2571
  * ```
2572
  *
2573
  * @param string $cssOrXPath css or xpath of the web element
2574
- * @param int $offsetX
2575
- * @param int $offsetY
2576
  *
2577
  * @throws \Codeception\Exception\ElementNotFound
2578
  * @see \Codeception\Module\WebDriver::moveMouseOver()
2579
  */
2580
- public function moveMouseOver($cssOrXPath, $offsetX = null, $offsetY = null) {
2581
  return $this->getScenario()->runStep(new \Codeception\Step\Action('moveMouseOver', func_get_args()));
2582
  }
2583
 
@@ -2672,7 +2672,7 @@ trait AcceptanceTesterActions
2672
  * @throws \Codeception\Exception\ElementNotFound
2673
  * @see \Codeception\Module\WebDriver::appendField()
2674
  */
2675
- public function appendField($field, $value) {
2676
  return $this->getScenario()->runStep(new \Codeception\Step\Action('appendField', func_get_args()));
2677
  }
2678
 
@@ -2683,7 +2683,7 @@ trait AcceptanceTesterActions
2683
  * @param string $name
2684
  * @see \Codeception\Module\WebDriver::saveSessionSnapshot()
2685
  */
2686
- public function saveSessionSnapshot($name) {
2687
  return $this->getScenario()->runStep(new \Codeception\Step\Action('saveSessionSnapshot', func_get_args()));
2688
  }
2689
 
@@ -2695,7 +2695,7 @@ trait AcceptanceTesterActions
2695
  * @return bool
2696
  * @see \Codeception\Module\WebDriver::loadSessionSnapshot()
2697
  */
2698
- public function loadSessionSnapshot($name) {
2699
  return $this->getScenario()->runStep(new \Codeception\Step\Action('loadSessionSnapshot', func_get_args()));
2700
  }
2701
 
@@ -2714,11 +2714,11 @@ trait AcceptanceTesterActions
2714
  * ```
2715
  *
2716
  * @param $selector
2717
- * @param int $offsetX
2718
- * @param int $offsetY
2719
  * @see \Codeception\Module\WebDriver::scrollTo()
2720
  */
2721
- public function scrollTo($selector, $offsetX = null, $offsetY = null) {
2722
  return $this->getScenario()->runStep(new \Codeception\Step\Action('scrollTo', func_get_args()));
2723
  }
2724
 
@@ -2878,7 +2878,7 @@ trait AcceptanceTesterActions
2878
  * Conditional Assertion: Test won't be stopped on fail
2879
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
2880
  */
2881
- public function canSeeNumberNewLines($number) {
2882
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
2883
  }
2884
  /**
@@ -2898,7 +2898,7 @@ trait AcceptanceTesterActions
2898
  * @param int $number New lines
2899
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
2900
  */
2901
- public function seeNumberNewLines($number) {
2902
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
2903
  }
2904
 
@@ -3036,11 +3036,11 @@ trait AcceptanceTesterActions
3036
  * ```
3037
  *
3038
  * @param $filename
3039
- * @param string $path
3040
  * Conditional Assertion: Test won't be stopped on fail
3041
  * @see \Codeception\Module\Filesystem::seeFileFound()
3042
  */
3043
- public function canSeeFileFound($filename, $path = null) {
3044
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
3045
  }
3046
  /**
@@ -3056,10 +3056,10 @@ trait AcceptanceTesterActions
3056
  * ```
3057
  *
3058
  * @param $filename
3059
- * @param string $path
3060
  * @see \Codeception\Module\Filesystem::seeFileFound()
3061
  */
3062
- public function seeFileFound($filename, $path = null) {
3063
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
3064
  }
3065
 
@@ -3070,11 +3070,11 @@ trait AcceptanceTesterActions
3070
  * Checks if file does not exist in path
3071
  *
3072
  * @param $filename
3073
- * @param string $path
3074
  * Conditional Assertion: Test won't be stopped on fail
3075
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
3076
  */
3077
- public function cantSeeFileFound($filename, $path = null) {
3078
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
3079
  }
3080
  /**
@@ -3083,10 +3083,10 @@ trait AcceptanceTesterActions
3083
  * Checks if file does not exist in path
3084
  *
3085
  * @param $filename
3086
- * @param string $path
3087
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
3088
  */
3089
- public function dontSeeFileFound($filename, $path = null) {
3090
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
3091
  }
3092
 
@@ -3146,10 +3146,10 @@ trait AcceptanceTesterActions
3146
  *
3147
  * @param $expected
3148
  * @param $actual
3149
- * @param string $message
3150
  * @see \Codeception\Module\Asserts::assertNotEquals()
3151
  */
3152
- public function assertNotEquals($expected, $actual, $message = null) {
3153
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
3154
  }
3155
 
@@ -3161,11 +3161,11 @@ trait AcceptanceTesterActions
3161
  *
3162
  * @param $expected
3163
  * @param $actual
3164
- * @param string $message
3165
  * @return mixed|void
3166
  * @see \Codeception\Module\Asserts::assertSame()
3167
  */
3168
- public function assertSame($expected, $actual, $message = null) {
3169
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
3170
  }
3171
 
@@ -3177,10 +3177,10 @@ trait AcceptanceTesterActions
3177
  *
3178
  * @param $expected
3179
  * @param $actual
3180
- * @param string $message
3181
  * @see \Codeception\Module\Asserts::assertNotSame()
3182
  */
3183
- public function assertNotSame($expected, $actual, $message = null) {
3184
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
3185
  }
3186
 
@@ -3192,10 +3192,10 @@ trait AcceptanceTesterActions
3192
  *
3193
  * @param $expected
3194
  * @param $actual
3195
- * @param string $message
3196
  * @see \Codeception\Module\Asserts::assertGreaterThan()
3197
  */
3198
- public function assertGreaterThan($expected, $actual, $message = null) {
3199
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
3200
  }
3201
 
@@ -3207,10 +3207,10 @@ trait AcceptanceTesterActions
3207
  *
3208
  * @param $expected
3209
  * @param $actual
3210
- * @param string $message
3211
  * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
3212
  */
3213
- public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
3214
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
3215
  }
3216
 
@@ -3222,10 +3222,10 @@ trait AcceptanceTesterActions
3222
  *
3223
  * @param $expected
3224
  * @param $actual
3225
- * @param string $message
3226
  * @see \Codeception\Module\Asserts::assertLessThan()
3227
  */
3228
- public function assertLessThan($expected, $actual, $message = null) {
3229
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
3230
  }
3231
 
@@ -3237,10 +3237,10 @@ trait AcceptanceTesterActions
3237
  *
3238
  * @param $expected
3239
  * @param $actual
3240
- * @param string $message
3241
  * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
3242
  */
3243
- public function assertLessThanOrEqual($expected, $actual, $message = null) {
3244
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
3245
  }
3246
 
@@ -3252,10 +3252,10 @@ trait AcceptanceTesterActions
3252
  *
3253
  * @param $needle
3254
  * @param $haystack
3255
- * @param string $message
3256
  * @see \Codeception\Module\Asserts::assertContains()
3257
  */
3258
- public function assertContains($needle, $haystack, $message = null) {
3259
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
3260
  }
3261
 
@@ -3267,10 +3267,10 @@ trait AcceptanceTesterActions
3267
  *
3268
  * @param $needle
3269
  * @param $haystack
3270
- * @param string $message
3271
  * @see \Codeception\Module\Asserts::assertNotContains()
3272
  */
3273
- public function assertNotContains($needle, $haystack, $message = null) {
3274
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
3275
  }
3276
 
@@ -3282,10 +3282,10 @@ trait AcceptanceTesterActions
3282
  *
3283
  * @param string $pattern
3284
  * @param string $string
3285
- * @param string $message
3286
  * @see \Codeception\Module\Asserts::assertRegExp()
3287
  */
3288
- public function assertRegExp($pattern, $string, $message = null) {
3289
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
3290
  }
3291
 
@@ -3297,10 +3297,10 @@ trait AcceptanceTesterActions
3297
  *
3298
  * @param string $pattern
3299
  * @param string $string
3300
- * @param string $message
3301
  * @see \Codeception\Module\Asserts::assertNotRegExp()
3302
  */
3303
- public function assertNotRegExp($pattern, $string, $message = null) {
3304
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
3305
  }
3306
 
@@ -3311,10 +3311,10 @@ trait AcceptanceTesterActions
3311
  * Checks that variable is empty.
3312
  *
3313
  * @param $actual
3314
- * @param string $message
3315
  * @see \Codeception\Module\Asserts::assertEmpty()
3316
  */
3317
- public function assertEmpty($actual, $message = null) {
3318
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
3319
  }
3320
 
@@ -3325,10 +3325,10 @@ trait AcceptanceTesterActions
3325
  * Checks that variable is not empty.
3326
  *
3327
  * @param $actual
3328
- * @param string $message
3329
  * @see \Codeception\Module\Asserts::assertNotEmpty()
3330
  */
3331
- public function assertNotEmpty($actual, $message = null) {
3332
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
3333
  }
3334
 
@@ -3339,10 +3339,10 @@ trait AcceptanceTesterActions
3339
  * Checks that variable is NULL
3340
  *
3341
  * @param $actual
3342
- * @param string $message
3343
  * @see \Codeception\Module\Asserts::assertNull()
3344
  */
3345
- public function assertNull($actual, $message = null) {
3346
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
3347
  }
3348
 
@@ -3353,10 +3353,10 @@ trait AcceptanceTesterActions
3353
  * Checks that variable is not NULL
3354
  *
3355
  * @param $actual
3356
- * @param string $message
3357
  * @see \Codeception\Module\Asserts::assertNotNull()
3358
  */
3359
- public function assertNotNull($actual, $message = null) {
3360
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
3361
  }
3362
 
@@ -3367,10 +3367,10 @@ trait AcceptanceTesterActions
3367
  * Checks that condition is positive.
3368
  *
3369
  * @param $condition
3370
- * @param string $message
3371
  * @see \Codeception\Module\Asserts::assertTrue()
3372
  */
3373
- public function assertTrue($condition, $message = null) {
3374
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
3375
  }
3376
 
@@ -3381,10 +3381,10 @@ trait AcceptanceTesterActions
3381
  * Checks that condition is negative.
3382
  *
3383
  * @param $condition
3384
- * @param string $message
3385
  * @see \Codeception\Module\Asserts::assertFalse()
3386
  */
3387
- public function assertFalse($condition, $message = null) {
3388
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
3389
  }
3390
 
@@ -3395,10 +3395,10 @@ trait AcceptanceTesterActions
3395
  * Checks if file exists
3396
  *
3397
  * @param string $filename
3398
- * @param string $message
3399
  * @see \Codeception\Module\Asserts::assertFileExists()
3400
  */
3401
- public function assertFileExists($filename, $message = null) {
3402
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
3403
  }
3404
 
@@ -3409,10 +3409,10 @@ trait AcceptanceTesterActions
3409
  * Checks if file doesn't exist
3410
  *
3411
  * @param string $filename
3412
- * @param string $message
3413
  * @see \Codeception\Module\Asserts::assertFileNotExists()
3414
  */
3415
- public function assertFileNotExists($filename, $message = null) {
3416
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
3417
  }
3418
 
@@ -3562,7 +3562,7 @@ trait AcceptanceTesterActions
3562
  * @param $callback
3563
  * @see \Codeception\Module\Asserts::expectException()
3564
  */
3565
- public function expectException($exception, $callback) {
3566
  return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
3567
  }
3568
  }
93
  * @param int $height
94
  * @see \Codeception\Module\WebDriver::resizeWindow()
95
  */
96
+ public function resizeWindow(int $width, int $height) {
97
  return $this->getScenario()->runStep(new \Codeception\Step\Action('resizeWindow', func_get_args()));
98
  }
99
 
111
  * ```
112
  *
113
  * @param $cookie
114
+ * @param array|null $params
115
  * @return mixed
116
  * Conditional Assertion: Test won't be stopped on fail
117
  * @see \Codeception\Module\WebDriver::seeCookie()
118
  */
119
+ public function canSeeCookie($cookie, array $params = null) {
120
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
121
  }
122
  /**
132
  * ```
133
  *
134
  * @param $cookie
135
+ * @param array|null $params
136
  * @return mixed
137
  * @see \Codeception\Module\WebDriver::seeCookie()
138
  */
139
+ public function seeCookie($cookie, array $params = null) {
140
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
141
  }
142
 
149
  *
150
  * @param $cookie
151
  *
152
+ * @param array|null $params
153
  * @return mixed
154
  * Conditional Assertion: Test won't be stopped on fail
155
  * @see \Codeception\Module\WebDriver::dontSeeCookie()
156
  */
157
+ public function cantSeeCookie($cookie, array $params = null) {
158
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
159
  }
160
  /**
165
  *
166
  * @param $cookie
167
  *
168
+ * @param array|null $params
169
  * @return mixed
170
  * @see \Codeception\Module\WebDriver::dontSeeCookie()
171
  */
172
+ public function dontSeeCookie($cookie, array $params = null) {
173
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
174
  }
175
 
188
  *
189
  * @param $name
190
  * @param $val
191
+ * @param array|null $params
192
  *
193
  * @return mixed
194
  * @see \Codeception\Module\WebDriver::setCookie()
195
  */
196
+ public function setCookie($cookie, $value, array $params = null) {
197
  return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
198
  }
199
 
206
  *
207
  * @param $cookie
208
  *
209
+ * @param array|null $params
210
  * @return mixed
211
  * @see \Codeception\Module\WebDriver::resetCookie()
212
  */
213
+ public function resetCookie($cookie, array $params = null) {
214
  return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
215
  }
216
 
223
  *
224
  * @param $cookie
225
  *
226
+ * @param array|null $params
227
  * @return mixed
228
  * @see \Codeception\Module\WebDriver::grabCookie()
229
  */
230
+ public function grabCookie($cookie, array $params = null) {
231
  return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
232
  }
233
 
1623
  * ```
1624
  *
1625
  * @param $selector
1626
+ * @param array|null $attributes
1627
  * @return
1628
  * Conditional Assertion: Test won't be stopped on fail
1629
  * @see \Codeception\Module\WebDriver::seeElement()
1630
  */
1631
+ public function canSeeElement($selector, array $attributes = null) {
1632
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
1633
  }
1634
  /**
1650
  * ```
1651
  *
1652
  * @param $selector
1653
+ * @param array|null $attributes
1654
  * @return
1655
  * @see \Codeception\Module\WebDriver::seeElement()
1656
  */
1657
+ public function seeElement($selector, array $attributes = null) {
1658
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
1659
  }
1660
 
1675
  * ```
1676
  *
1677
  * @param $selector
1678
+ * @param array|null $attributes
1679
  * Conditional Assertion: Test won't be stopped on fail
1680
  * @see \Codeception\Module\WebDriver::dontSeeElement()
1681
  */
1682
+ public function cantSeeElement($selector, array $attributes = null) {
1683
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
1684
  }
1685
  /**
1698
  * ```
1699
  *
1700
  * @param $selector
1701
+ * @param array|null $attributes
1702
  * @see \Codeception\Module\WebDriver::dontSeeElement()
1703
  */
1704
+ public function dontSeeElement($selector, array $attributes = null) {
1705
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
1706
  }
1707
 
2269
  * ```
2270
  *
2271
  * @param $element
2272
+ * @param Closure $callback
2273
+ * @param int|null $timeout seconds
2274
  * @throws \Codeception\Exception\ElementNotFound
2275
  * @see \Codeception\Module\WebDriver::waitForElementChange()
2276
  */
2277
+ public function waitForElementChange($element, Closure $callback, int $timeout = null) {
2278
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementChange', func_get_args()));
2279
  }
2280
 
2293
  * ```
2294
  *
2295
  * @param $element
2296
+ * @param int|null $timeout seconds
2297
  * @throws \Exception
2298
  * @see \Codeception\Module\WebDriver::waitForElement()
2299
  */
2300
+ public function waitForElement($element, int $timeout = null) {
2301
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElement', func_get_args()));
2302
  }
2303
 
2316
  * ```
2317
  *
2318
  * @param $element
2319
+ * @param int|null $timeout seconds
2320
  * @throws \Exception
2321
  * @see \Codeception\Module\WebDriver::waitForElementVisible()
2322
  */
2323
+ public function waitForElementVisible($element, int $timeout = null) {
2324
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementVisible', func_get_args()));
2325
  }
2326
 
2338
  * ```
2339
  *
2340
  * @param $element
2341
+ * @param int|null $timeout seconds
2342
  * @throws \Exception
2343
  * @see \Codeception\Module\WebDriver::waitForElementNotVisible()
2344
  */
2345
+ public function waitForElementNotVisible($element, int $timeout = null) {
2346
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementNotVisible', func_get_args()));
2347
  }
2348
 
2362
  * ```
2363
  *
2364
  * @param string $text
2365
+ * @param int|null $timeout seconds
2366
  * @param null $selector
2367
  * @throws \Exception
2368
  * @see \Codeception\Module\WebDriver::waitForText()
2369
  */
2370
+ public function waitForText(string $text, int $timeout = null, $selector = null) {
2371
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForText', func_get_args()));
2372
  }
2373
 
2406
  * @param callable $function
2407
  * @see \Codeception\Module\WebDriver::executeInSelenium()
2408
  */
2409
+ public function executeInSelenium(callable $function) {
2410
  return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInSelenium', func_get_args()));
2411
  }
2412
 
2448
  * @param string|null $name
2449
  * @see \Codeception\Module\WebDriver::switchToWindow()
2450
  */
2451
+ public function switchToWindow(string $name = null) {
2452
  return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToWindow', func_get_args()));
2453
  }
2454
 
2476
  * @param string|null $name
2477
  * @see \Codeception\Module\WebDriver::switchToIFrame()
2478
  */
2479
+ public function switchToIFrame(string $name = null) {
2480
  return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIFrame', func_get_args()));
2481
  }
2482
 
2495
  * ```
2496
  *
2497
  * @param string $script
2498
+ * @param int|null $timeout seconds
2499
  * @see \Codeception\Module\WebDriver::waitForJS()
2500
  */
2501
+ public function waitForJS(string $script, int $timeout = null) {
2502
  return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForJS', func_get_args()));
2503
  }
2504
 
2551
  * @param string $target (CSS ID or XPath)
2552
  * @see \Codeception\Module\WebDriver::dragAndDrop()
2553
  */
2554
+ public function dragAndDrop(string $source, string $target) {
2555
  return $this->getScenario()->runStep(new \Codeception\Step\Action('dragAndDrop', func_get_args()));
2556
  }
2557
 
2571
  * ```
2572
  *
2573
  * @param string $cssOrXPath css or xpath of the web element
2574
+ * @param int|null $offsetX
2575
+ * @param int|null $offsetY
2576
  *
2577
  * @throws \Codeception\Exception\ElementNotFound
2578
  * @see \Codeception\Module\WebDriver::moveMouseOver()
2579
  */
2580
+ public function moveMouseOver(string $cssOrXPath, int $offsetX = null, int $offsetY = null) {
2581
  return $this->getScenario()->runStep(new \Codeception\Step\Action('moveMouseOver', func_get_args()));
2582
  }
2583
 
2672
  * @throws \Codeception\Exception\ElementNotFound
2673
  * @see \Codeception\Module\WebDriver::appendField()
2674
  */
2675
+ public function appendField(string $field, string $value) {
2676
  return $this->getScenario()->runStep(new \Codeception\Step\Action('appendField', func_get_args()));
2677
  }
2678
 
2683
  * @param string $name
2684
  * @see \Codeception\Module\WebDriver::saveSessionSnapshot()
2685
  */
2686
+ public function saveSessionSnapshot(string $name) {
2687
  return $this->getScenario()->runStep(new \Codeception\Step\Action('saveSessionSnapshot', func_get_args()));
2688
  }
2689
 
2695
  * @return bool
2696
  * @see \Codeception\Module\WebDriver::loadSessionSnapshot()
2697
  */
2698
+ public function loadSessionSnapshot(string $name) {
2699
  return $this->getScenario()->runStep(new \Codeception\Step\Action('loadSessionSnapshot', func_get_args()));
2700
  }
2701
 
2714
  * ```
2715
  *
2716
  * @param $selector
2717
+ * @param int|null $offsetX
2718
+ * @param int|null $offsetY
2719
  * @see \Codeception\Module\WebDriver::scrollTo()
2720
  */
2721
+ public function scrollTo($selector, int $offsetX = null, int $offsetY = null) {
2722
  return $this->getScenario()->runStep(new \Codeception\Step\Action('scrollTo', func_get_args()));
2723
  }
2724
 
2878
  * Conditional Assertion: Test won't be stopped on fail
2879
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
2880
  */
2881
+ public function canSeeNumberNewLines(int $number) {
2882
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
2883
  }
2884
  /**
2898
  * @param int $number New lines
2899
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
2900
  */
2901
+ public function seeNumberNewLines(int $number) {
2902
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
2903
  }
2904
 
3036
  * ```
3037
  *
3038
  * @param $filename
3039
+ * @param string|null $path
3040
  * Conditional Assertion: Test won't be stopped on fail
3041
  * @see \Codeception\Module\Filesystem::seeFileFound()
3042
  */
3043
+ public function canSeeFileFound($filename, string $path = null) {
3044
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
3045
  }
3046
  /**
3056
  * ```
3057
  *
3058
  * @param $filename
3059
+ * @param string|null $path
3060
  * @see \Codeception\Module\Filesystem::seeFileFound()
3061
  */
3062
+ public function seeFileFound($filename, string $path = null) {
3063
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
3064
  }
3065
 
3070
  * Checks if file does not exist in path
3071
  *
3072
  * @param $filename
3073
+ * @param string|null $path
3074
  * Conditional Assertion: Test won't be stopped on fail
3075
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
3076
  */
3077
+ public function cantSeeFileFound($filename, string $path = null) {
3078
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
3079
  }
3080
  /**
3083
  * Checks if file does not exist in path
3084
  *
3085
  * @param $filename
3086
+ * @param string|null $path
3087
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
3088
  */
3089
+ public function dontSeeFileFound($filename, string $path = null) {
3090
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
3091
  }
3092
 
3146
  *
3147
  * @param $expected
3148
  * @param $actual
3149
+ * @param string|null $message
3150
  * @see \Codeception\Module\Asserts::assertNotEquals()
3151
  */
3152
+ public function assertNotEquals($expected, $actual, string $message = null) {
3153
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
3154
  }
3155
 
3161
  *
3162
  * @param $expected
3163
  * @param $actual
3164
+ * @param string|null $message
3165
  * @return mixed|void
3166
  * @see \Codeception\Module\Asserts::assertSame()
3167
  */
3168
+ public function assertSame($expected, $actual, string $message = null) {
3169
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
3170
  }
3171
 
3177
  *
3178
  * @param $expected
3179
  * @param $actual
3180
+ * @param string|null $message
3181
  * @see \Codeception\Module\Asserts::assertNotSame()
3182
  */
3183
+ public function assertNotSame($expected, $actual, string $message = null) {
3184
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
3185
  }
3186
 
3192
  *
3193
  * @param $expected
3194
  * @param $actual
3195
+ * @param string|null $message
3196
  * @see \Codeception\Module\Asserts::assertGreaterThan()
3197
  */
3198
+ public function assertGreaterThan($expected, $actual, string $message = null) {
3199
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
3200
  }
3201
 
3207
  *
3208
  * @param $expected
3209
  * @param $actual
3210
+ * @param string|null $message
3211
  * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
3212
  */
3213
+ public function assertGreaterThanOrEqual($expected, $actual, string $message = null) {
3214
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
3215
  }
3216
 
3222
  *
3223
  * @param $expected
3224
  * @param $actual
3225
+ * @param string|null $message
3226
  * @see \Codeception\Module\Asserts::assertLessThan()
3227
  */
3228
+ public function assertLessThan($expected, $actual, string $message = null) {
3229
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
3230
  }
3231
 
3237
  *
3238
  * @param $expected
3239
  * @param $actual
3240
+ * @param string|null $message
3241
  * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
3242
  */
3243
+ public function assertLessThanOrEqual($expected, $actual, string $message = null) {
3244
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
3245
  }
3246
 
3252
  *
3253
  * @param $needle
3254
  * @param $haystack
3255
+ * @param string|null $message
3256
  * @see \Codeception\Module\Asserts::assertContains()
3257
  */
3258
+ public function assertContains($needle, $haystack, string $message = null) {
3259
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
3260
  }
3261
 
3267
  *
3268
  * @param $needle
3269
  * @param $haystack
3270
+ * @param string|null $message
3271
  * @see \Codeception\Module\Asserts::assertNotContains()
3272
  */
3273
+ public function assertNotContains($needle, $haystack, string $message = null) {
3274
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
3275
  }
3276
 
3282
  *
3283
  * @param string $pattern
3284
  * @param string $string
3285
+ * @param string|null $message
3286
  * @see \Codeception\Module\Asserts::assertRegExp()
3287
  */
3288
+ public function assertRegExp(string $pattern, string $string, string $message = null) {
3289
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
3290
  }
3291
 
3297
  *
3298
  * @param string $pattern
3299
  * @param string $string
3300
+ * @param string|null $message
3301
  * @see \Codeception\Module\Asserts::assertNotRegExp()
3302
  */
3303
+ public function assertNotRegExp(string $pattern, string $string, string $message = null) {
3304
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
3305
  }
3306
 
3311
  * Checks that variable is empty.
3312
  *
3313
  * @param $actual
3314
+ * @param string|null $message
3315
  * @see \Codeception\Module\Asserts::assertEmpty()
3316
  */
3317
+ public function assertEmpty($actual, string $message = null) {
3318
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
3319
  }
3320
 
3325
  * Checks that variable is not empty.
3326
  *
3327
  * @param $actual
3328
+ * @param string|null $message
3329
  * @see \Codeception\Module\Asserts::assertNotEmpty()
3330
  */
3331
+ public function assertNotEmpty($actual, string $message = null) {
3332
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
3333
  }
3334
 
3339
  * Checks that variable is NULL
3340
  *
3341
  * @param $actual
3342
+ * @param string|null $message
3343
  * @see \Codeception\Module\Asserts::assertNull()
3344
  */
3345
+ public function assertNull($actual, string $message = null) {
3346
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
3347
  }
3348
 
3353
  * Checks that variable is not NULL
3354
  *
3355
  * @param $actual
3356
+ * @param string|null $message
3357
  * @see \Codeception\Module\Asserts::assertNotNull()
3358
  */
3359
+ public function assertNotNull($actual, string $message = null) {
3360
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
3361
  }
3362
 
3367
  * Checks that condition is positive.
3368
  *
3369
  * @param $condition
3370
+ * @param string|null $message
3371
  * @see \Codeception\Module\Asserts::assertTrue()
3372
  */
3373
+ public function assertTrue($condition, string $message = null) {
3374
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
3375
  }
3376
 
3381
  * Checks that condition is negative.
3382
  *
3383
  * @param $condition
3384
+ * @param string|null $message
3385
  * @see \Codeception\Module\Asserts::assertFalse()
3386
  */
3387
+ public function assertFalse($condition, string $message = null) {
3388
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
3389
  }
3390
 
3395
  * Checks if file exists
3396
  *
3397
  * @param string $filename
3398
+ * @param string|null $message
3399
  * @see \Codeception\Module\Asserts::assertFileExists()
3400
  */
3401
+ public function assertFileExists(string $filename, string $message = null) {
3402
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
3403
  }
3404
 
3409
  * Checks if file doesn't exist
3410
  *
3411
  * @param string $filename
3412
+ * @param string|null $message
3413
  * @see \Codeception\Module\Asserts::assertFileNotExists()
3414
  */
3415
+ public function assertFileNotExists(string $filename, string $message = null) {
3416
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
3417
  }
3418
 
3562
  * @param $callback
3563
  * @see \Codeception\Module\Asserts::expectException()
3564
  */
3565
+ public function expectException(string $exception, $callback) {
3566
  return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
3567
  }
3568
  }
tests/_support/_generated/FunctionalTesterActions.php CHANGED
@@ -172,7 +172,7 @@ trait FunctionalTesterActions
172
  * Conditional Assertion: Test won't be stopped on fail
173
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
174
  */
175
- public function canSeeNumberNewLines($number) {
176
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
177
  }
178
  /**
@@ -192,7 +192,7 @@ trait FunctionalTesterActions
192
  * @param int $number New lines
193
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
194
  */
195
- public function seeNumberNewLines($number) {
196
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
197
  }
198
 
@@ -330,11 +330,11 @@ trait FunctionalTesterActions
330
  * ```
331
  *
332
  * @param $filename
333
- * @param string $path
334
  * Conditional Assertion: Test won't be stopped on fail
335
  * @see \Codeception\Module\Filesystem::seeFileFound()
336
  */
337
- public function canSeeFileFound($filename, $path = null) {
338
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
339
  }
340
  /**
@@ -350,10 +350,10 @@ trait FunctionalTesterActions
350
  * ```
351
  *
352
  * @param $filename
353
- * @param string $path
354
  * @see \Codeception\Module\Filesystem::seeFileFound()
355
  */
356
- public function seeFileFound($filename, $path = null) {
357
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
358
  }
359
 
@@ -364,11 +364,11 @@ trait FunctionalTesterActions
364
  * Checks if file does not exist in path
365
  *
366
  * @param $filename
367
- * @param string $path
368
  * Conditional Assertion: Test won't be stopped on fail
369
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
370
  */
371
- public function cantSeeFileFound($filename, $path = null) {
372
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
373
  }
374
  /**
@@ -377,10 +377,10 @@ trait FunctionalTesterActions
377
  * Checks if file does not exist in path
378
  *
379
  * @param $filename
380
- * @param string $path
381
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
382
  */
383
- public function dontSeeFileFound($filename, $path = null) {
384
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
385
  }
386
 
@@ -425,10 +425,10 @@ trait FunctionalTesterActions
425
  *
426
  * @param $expected
427
  * @param $actual
428
- * @param string $message
429
  * @see \Codeception\Module\Asserts::assertEquals()
430
  */
431
- public function assertEquals($expected, $actual, $message = null) {
432
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
433
  }
434
 
@@ -440,10 +440,10 @@ trait FunctionalTesterActions
440
  *
441
  * @param $expected
442
  * @param $actual
443
- * @param string $message
444
  * @see \Codeception\Module\Asserts::assertNotEquals()
445
  */
446
- public function assertNotEquals($expected, $actual, $message = null) {
447
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
448
  }
449
 
@@ -455,11 +455,11 @@ trait FunctionalTesterActions
455
  *
456
  * @param $expected
457
  * @param $actual
458
- * @param string $message
459
  * @return mixed|void
460
  * @see \Codeception\Module\Asserts::assertSame()
461
  */
462
- public function assertSame($expected, $actual, $message = null) {
463
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
464
  }
465
 
@@ -471,10 +471,10 @@ trait FunctionalTesterActions
471
  *
472
  * @param $expected
473
  * @param $actual
474
- * @param string $message
475
  * @see \Codeception\Module\Asserts::assertNotSame()
476
  */
477
- public function assertNotSame($expected, $actual, $message = null) {
478
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
479
  }
480
 
@@ -486,10 +486,10 @@ trait FunctionalTesterActions
486
  *
487
  * @param $expected
488
  * @param $actual
489
- * @param string $message
490
  * @see \Codeception\Module\Asserts::assertGreaterThan()
491
  */
492
- public function assertGreaterThan($expected, $actual, $message = null) {
493
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
494
  }
495
 
@@ -501,10 +501,10 @@ trait FunctionalTesterActions
501
  *
502
  * @param $expected
503
  * @param $actual
504
- * @param string $message
505
  * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
506
  */
507
- public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
508
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
509
  }
510
 
@@ -516,10 +516,10 @@ trait FunctionalTesterActions
516
  *
517
  * @param $expected
518
  * @param $actual
519
- * @param string $message
520
  * @see \Codeception\Module\Asserts::assertLessThan()
521
  */
522
- public function assertLessThan($expected, $actual, $message = null) {
523
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
524
  }
525
 
@@ -531,10 +531,10 @@ trait FunctionalTesterActions
531
  *
532
  * @param $expected
533
  * @param $actual
534
- * @param string $message
535
  * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
536
  */
537
- public function assertLessThanOrEqual($expected, $actual, $message = null) {
538
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
539
  }
540
 
@@ -546,10 +546,10 @@ trait FunctionalTesterActions
546
  *
547
  * @param $needle
548
  * @param $haystack
549
- * @param string $message
550
  * @see \Codeception\Module\Asserts::assertContains()
551
  */
552
- public function assertContains($needle, $haystack, $message = null) {
553
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
554
  }
555
 
@@ -561,10 +561,10 @@ trait FunctionalTesterActions
561
  *
562
  * @param $needle
563
  * @param $haystack
564
- * @param string $message
565
  * @see \Codeception\Module\Asserts::assertNotContains()
566
  */
567
- public function assertNotContains($needle, $haystack, $message = null) {
568
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
569
  }
570
 
@@ -576,10 +576,10 @@ trait FunctionalTesterActions
576
  *
577
  * @param string $pattern
578
  * @param string $string
579
- * @param string $message
580
  * @see \Codeception\Module\Asserts::assertRegExp()
581
  */
582
- public function assertRegExp($pattern, $string, $message = null) {
583
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
584
  }
585
 
@@ -591,10 +591,10 @@ trait FunctionalTesterActions
591
  *
592
  * @param string $pattern
593
  * @param string $string
594
- * @param string $message
595
  * @see \Codeception\Module\Asserts::assertNotRegExp()
596
  */
597
- public function assertNotRegExp($pattern, $string, $message = null) {
598
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
599
  }
600
 
@@ -605,10 +605,10 @@ trait FunctionalTesterActions
605
  * Checks that variable is empty.
606
  *
607
  * @param $actual
608
- * @param string $message
609
  * @see \Codeception\Module\Asserts::assertEmpty()
610
  */
611
- public function assertEmpty($actual, $message = null) {
612
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
613
  }
614
 
@@ -619,10 +619,10 @@ trait FunctionalTesterActions
619
  * Checks that variable is not empty.
620
  *
621
  * @param $actual
622
- * @param string $message
623
  * @see \Codeception\Module\Asserts::assertNotEmpty()
624
  */
625
- public function assertNotEmpty($actual, $message = null) {
626
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
627
  }
628
 
@@ -633,10 +633,10 @@ trait FunctionalTesterActions
633
  * Checks that variable is NULL
634
  *
635
  * @param $actual
636
- * @param string $message
637
  * @see \Codeception\Module\Asserts::assertNull()
638
  */
639
- public function assertNull($actual, $message = null) {
640
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
641
  }
642
 
@@ -647,10 +647,10 @@ trait FunctionalTesterActions
647
  * Checks that variable is not NULL
648
  *
649
  * @param $actual
650
- * @param string $message
651
  * @see \Codeception\Module\Asserts::assertNotNull()
652
  */
653
- public function assertNotNull($actual, $message = null) {
654
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
655
  }
656
 
@@ -661,10 +661,10 @@ trait FunctionalTesterActions
661
  * Checks that condition is positive.
662
  *
663
  * @param $condition
664
- * @param string $message
665
  * @see \Codeception\Module\Asserts::assertTrue()
666
  */
667
- public function assertTrue($condition, $message = null) {
668
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
669
  }
670
 
@@ -675,10 +675,10 @@ trait FunctionalTesterActions
675
  * Checks that condition is negative.
676
  *
677
  * @param $condition
678
- * @param string $message
679
  * @see \Codeception\Module\Asserts::assertFalse()
680
  */
681
- public function assertFalse($condition, $message = null) {
682
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
683
  }
684
 
@@ -689,10 +689,10 @@ trait FunctionalTesterActions
689
  * Checks if file exists
690
  *
691
  * @param string $filename
692
- * @param string $message
693
  * @see \Codeception\Module\Asserts::assertFileExists()
694
  */
695
- public function assertFileExists($filename, $message = null) {
696
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
697
  }
698
 
@@ -703,10 +703,10 @@ trait FunctionalTesterActions
703
  * Checks if file doesn't exist
704
  *
705
  * @param string $filename
706
- * @param string $message
707
  * @see \Codeception\Module\Asserts::assertFileNotExists()
708
  */
709
- public function assertFileNotExists($filename, $message = null) {
710
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
711
  }
712
 
@@ -856,7 +856,7 @@ trait FunctionalTesterActions
856
  * @param $callback
857
  * @see \Codeception\Module\Asserts::expectException()
858
  */
859
- public function expectException($exception, $callback) {
860
  return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
861
  }
862
  }
172
  * Conditional Assertion: Test won't be stopped on fail
173
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
174
  */
175
+ public function canSeeNumberNewLines(int $number) {
176
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
177
  }
178
  /**
192
  * @param int $number New lines
193
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
194
  */
195
+ public function seeNumberNewLines(int $number) {
196
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
197
  }
198
 
330
  * ```
331
  *
332
  * @param $filename
333
+ * @param string|null $path
334
  * Conditional Assertion: Test won't be stopped on fail
335
  * @see \Codeception\Module\Filesystem::seeFileFound()
336
  */
337
+ public function canSeeFileFound($filename, string $path = null) {
338
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
339
  }
340
  /**
350
  * ```
351
  *
352
  * @param $filename
353
+ * @param string|null $path
354
  * @see \Codeception\Module\Filesystem::seeFileFound()
355
  */
356
+ public function seeFileFound($filename, string $path = null) {
357
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
358
  }
359
 
364
  * Checks if file does not exist in path
365
  *
366
  * @param $filename
367
+ * @param string|null $path
368
  * Conditional Assertion: Test won't be stopped on fail
369
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
370
  */
371
+ public function cantSeeFileFound($filename, string $path = null) {
372
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
373
  }
374
  /**
377
  * Checks if file does not exist in path
378
  *
379
  * @param $filename
380
+ * @param string|null $path
381
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
382
  */
383
+ public function dontSeeFileFound($filename, string $path = null) {
384
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
385
  }
386
 
425
  *
426
  * @param $expected
427
  * @param $actual
428
+ * @param string|null $message
429
  * @see \Codeception\Module\Asserts::assertEquals()
430
  */
431
+ public function assertEquals($expected, $actual, string $message = null) {
432
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
433
  }
434
 
440
  *
441
  * @param $expected
442
  * @param $actual
443
+ * @param string|null $message
444
  * @see \Codeception\Module\Asserts::assertNotEquals()
445
  */
446
+ public function assertNotEquals($expected, $actual, string $message = null) {
447
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
448
  }
449
 
455
  *
456
  * @param $expected
457
  * @param $actual
458
+ * @param string|null $message
459
  * @return mixed|void
460
  * @see \Codeception\Module\Asserts::assertSame()
461
  */
462
+ public function assertSame($expected, $actual, string $message = null) {
463
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
464
  }
465
 
471
  *
472
  * @param $expected
473
  * @param $actual
474
+ * @param string|null $message
475
  * @see \Codeception\Module\Asserts::assertNotSame()
476
  */
477
+ public function assertNotSame($expected, $actual, string $message = null) {
478
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
479
  }
480
 
486
  *
487
  * @param $expected
488
  * @param $actual
489
+ * @param string|null $message
490
  * @see \Codeception\Module\Asserts::assertGreaterThan()
491
  */
492
+ public function assertGreaterThan($expected, $actual, string $message = null) {
493
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
494
  }
495
 
501
  *
502
  * @param $expected
503
  * @param $actual
504
+ * @param string|null $message
505
  * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
506
  */
507
+ public function assertGreaterThanOrEqual($expected, $actual, string $message = null) {
508
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
509
  }
510
 
516
  *
517
  * @param $expected
518
  * @param $actual
519
+ * @param string|null $message
520
  * @see \Codeception\Module\Asserts::assertLessThan()
521
  */
522
+ public function assertLessThan($expected, $actual, string $message = null) {
523
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
524
  }
525
 
531
  *
532
  * @param $expected
533
  * @param $actual
534
+ * @param string|null $message
535
  * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
536
  */
537
+ public function assertLessThanOrEqual($expected, $actual, string $message = null) {
538
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
539
  }
540
 
546
  *
547
  * @param $needle
548
  * @param $haystack
549
+ * @param string|null $message
550
  * @see \Codeception\Module\Asserts::assertContains()
551
  */
552
+ public function assertContains($needle, $haystack, string $message = null) {
553
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
554
  }
555
 
561
  *
562
  * @param $needle
563
  * @param $haystack
564
+ * @param string|null $message
565
  * @see \Codeception\Module\Asserts::assertNotContains()
566
  */
567
+ public function assertNotContains($needle, $haystack, string $message = null) {
568
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
569
  }
570
 
576
  *
577
  * @param string $pattern
578
  * @param string $string
579
+ * @param string|null $message
580
  * @see \Codeception\Module\Asserts::assertRegExp()
581
  */
582
+ public function assertRegExp(string $pattern, string $string, string $message = null) {
583
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
584
  }
585
 
591
  *
592
  * @param string $pattern
593
  * @param string $string
594
+ * @param string|null $message
595
  * @see \Codeception\Module\Asserts::assertNotRegExp()
596
  */
597
+ public function assertNotRegExp(string $pattern, string $string, string $message = null) {
598
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
599
  }
600
 
605
  * Checks that variable is empty.
606
  *
607
  * @param $actual
608
+ * @param string|null $message
609
  * @see \Codeception\Module\Asserts::assertEmpty()
610
  */
611
+ public function assertEmpty($actual, string $message = null) {
612
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
613
  }
614
 
619
  * Checks that variable is not empty.
620
  *
621
  * @param $actual
622
+ * @param string|null $message
623
  * @see \Codeception\Module\Asserts::assertNotEmpty()
624
  */
625
+ public function assertNotEmpty($actual, string $message = null) {
626
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
627
  }
628
 
633
  * Checks that variable is NULL
634
  *
635
  * @param $actual
636
+ * @param string|null $message
637
  * @see \Codeception\Module\Asserts::assertNull()
638
  */
639
+ public function assertNull($actual, string $message = null) {
640
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
641
  }
642
 
647
  * Checks that variable is not NULL
648
  *
649
  * @param $actual
650
+ * @param string|null $message
651
  * @see \Codeception\Module\Asserts::assertNotNull()
652
  */
653
+ public function assertNotNull($actual, string $message = null) {
654
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
655
  }
656
 
661
  * Checks that condition is positive.
662
  *
663
  * @param $condition
664
+ * @param string|null $message
665
  * @see \Codeception\Module\Asserts::assertTrue()
666
  */
667
+ public function assertTrue($condition, string $message = null) {
668
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
669
  }
670
 
675
  * Checks that condition is negative.
676
  *
677
  * @param $condition
678
+ * @param string|null $message
679
  * @see \Codeception\Module\Asserts::assertFalse()
680
  */
681
+ public function assertFalse($condition, string $message = null) {
682
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
683
  }
684
 
689
  * Checks if file exists
690
  *
691
  * @param string $filename
692
+ * @param string|null $message
693
  * @see \Codeception\Module\Asserts::assertFileExists()
694
  */
695
+ public function assertFileExists(string $filename, string $message = null) {
696
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
697
  }
698
 
703
  * Checks if file doesn't exist
704
  *
705
  * @param string $filename
706
+ * @param string|null $message
707
  * @see \Codeception\Module\Asserts::assertFileNotExists()
708
  */
709
+ public function assertFileNotExists(string $filename, string $message = null) {
710
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
711
  }
712
 
856
  * @param $callback
857
  * @see \Codeception\Module\Asserts::expectException()
858
  */
859
+ public function expectException(string $exception, $callback) {
860
  return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
861
  }
862
  }
tests/_support/_generated/UnitTesterActions.php CHANGED
@@ -24,10 +24,10 @@ trait UnitTesterActions
24
  *
25
  * @param $expected
26
  * @param $actual
27
- * @param string $message
28
  * @see \Codeception\Module\Asserts::assertEquals()
29
  */
30
- public function assertEquals($expected, $actual, $message = null) {
31
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
32
  }
33
 
@@ -39,10 +39,10 @@ trait UnitTesterActions
39
  *
40
  * @param $expected
41
  * @param $actual
42
- * @param string $message
43
  * @see \Codeception\Module\Asserts::assertNotEquals()
44
  */
45
- public function assertNotEquals($expected, $actual, $message = null) {
46
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
47
  }
48
 
@@ -54,11 +54,11 @@ trait UnitTesterActions
54
  *
55
  * @param $expected
56
  * @param $actual
57
- * @param string $message
58
  * @return mixed|void
59
  * @see \Codeception\Module\Asserts::assertSame()
60
  */
61
- public function assertSame($expected, $actual, $message = null) {
62
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
63
  }
64
 
@@ -70,10 +70,10 @@ trait UnitTesterActions
70
  *
71
  * @param $expected
72
  * @param $actual
73
- * @param string $message
74
  * @see \Codeception\Module\Asserts::assertNotSame()
75
  */
76
- public function assertNotSame($expected, $actual, $message = null) {
77
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
78
  }
79
 
@@ -85,10 +85,10 @@ trait UnitTesterActions
85
  *
86
  * @param $expected
87
  * @param $actual
88
- * @param string $message
89
  * @see \Codeception\Module\Asserts::assertGreaterThan()
90
  */
91
- public function assertGreaterThan($expected, $actual, $message = null) {
92
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
93
  }
94
 
@@ -100,10 +100,10 @@ trait UnitTesterActions
100
  *
101
  * @param $expected
102
  * @param $actual
103
- * @param string $message
104
  * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
105
  */
106
- public function assertGreaterThanOrEqual($expected, $actual, $message = null) {
107
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
108
  }
109
 
@@ -115,10 +115,10 @@ trait UnitTesterActions
115
  *
116
  * @param $expected
117
  * @param $actual
118
- * @param string $message
119
  * @see \Codeception\Module\Asserts::assertLessThan()
120
  */
121
- public function assertLessThan($expected, $actual, $message = null) {
122
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
123
  }
124
 
@@ -130,10 +130,10 @@ trait UnitTesterActions
130
  *
131
  * @param $expected
132
  * @param $actual
133
- * @param string $message
134
  * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
135
  */
136
- public function assertLessThanOrEqual($expected, $actual, $message = null) {
137
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
138
  }
139
 
@@ -145,10 +145,10 @@ trait UnitTesterActions
145
  *
146
  * @param $needle
147
  * @param $haystack
148
- * @param string $message
149
  * @see \Codeception\Module\Asserts::assertContains()
150
  */
151
- public function assertContains($needle, $haystack, $message = null) {
152
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
153
  }
154
 
@@ -160,10 +160,10 @@ trait UnitTesterActions
160
  *
161
  * @param $needle
162
  * @param $haystack
163
- * @param string $message
164
  * @see \Codeception\Module\Asserts::assertNotContains()
165
  */
166
- public function assertNotContains($needle, $haystack, $message = null) {
167
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
168
  }
169
 
@@ -175,10 +175,10 @@ trait UnitTesterActions
175
  *
176
  * @param string $pattern
177
  * @param string $string
178
- * @param string $message
179
  * @see \Codeception\Module\Asserts::assertRegExp()
180
  */
181
- public function assertRegExp($pattern, $string, $message = null) {
182
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
183
  }
184
 
@@ -190,10 +190,10 @@ trait UnitTesterActions
190
  *
191
  * @param string $pattern
192
  * @param string $string
193
- * @param string $message
194
  * @see \Codeception\Module\Asserts::assertNotRegExp()
195
  */
196
- public function assertNotRegExp($pattern, $string, $message = null) {
197
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
198
  }
199
 
@@ -204,10 +204,10 @@ trait UnitTesterActions
204
  * Checks that variable is empty.
205
  *
206
  * @param $actual
207
- * @param string $message
208
  * @see \Codeception\Module\Asserts::assertEmpty()
209
  */
210
- public function assertEmpty($actual, $message = null) {
211
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
212
  }
213
 
@@ -218,10 +218,10 @@ trait UnitTesterActions
218
  * Checks that variable is not empty.
219
  *
220
  * @param $actual
221
- * @param string $message
222
  * @see \Codeception\Module\Asserts::assertNotEmpty()
223
  */
224
- public function assertNotEmpty($actual, $message = null) {
225
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
226
  }
227
 
@@ -232,10 +232,10 @@ trait UnitTesterActions
232
  * Checks that variable is NULL
233
  *
234
  * @param $actual
235
- * @param string $message
236
  * @see \Codeception\Module\Asserts::assertNull()
237
  */
238
- public function assertNull($actual, $message = null) {
239
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
240
  }
241
 
@@ -246,10 +246,10 @@ trait UnitTesterActions
246
  * Checks that variable is not NULL
247
  *
248
  * @param $actual
249
- * @param string $message
250
  * @see \Codeception\Module\Asserts::assertNotNull()
251
  */
252
- public function assertNotNull($actual, $message = null) {
253
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
254
  }
255
 
@@ -260,10 +260,10 @@ trait UnitTesterActions
260
  * Checks that condition is positive.
261
  *
262
  * @param $condition
263
- * @param string $message
264
  * @see \Codeception\Module\Asserts::assertTrue()
265
  */
266
- public function assertTrue($condition, $message = null) {
267
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
268
  }
269
 
@@ -274,10 +274,10 @@ trait UnitTesterActions
274
  * Checks that condition is negative.
275
  *
276
  * @param $condition
277
- * @param string $message
278
  * @see \Codeception\Module\Asserts::assertFalse()
279
  */
280
- public function assertFalse($condition, $message = null) {
281
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
282
  }
283
 
@@ -288,10 +288,10 @@ trait UnitTesterActions
288
  * Checks if file exists
289
  *
290
  * @param string $filename
291
- * @param string $message
292
  * @see \Codeception\Module\Asserts::assertFileExists()
293
  */
294
- public function assertFileExists($filename, $message = null) {
295
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
296
  }
297
 
@@ -302,10 +302,10 @@ trait UnitTesterActions
302
  * Checks if file doesn't exist
303
  *
304
  * @param string $filename
305
- * @param string $message
306
  * @see \Codeception\Module\Asserts::assertFileNotExists()
307
  */
308
- public function assertFileNotExists($filename, $message = null) {
309
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
310
  }
311
 
@@ -455,7 +455,7 @@ trait UnitTesterActions
455
  * @param $callback
456
  * @see \Codeception\Module\Asserts::expectException()
457
  */
458
- public function expectException($exception, $callback) {
459
  return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
460
  }
461
 
@@ -615,7 +615,7 @@ trait UnitTesterActions
615
  * Conditional Assertion: Test won't be stopped on fail
616
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
617
  */
618
- public function canSeeNumberNewLines($number) {
619
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
620
  }
621
  /**
@@ -635,7 +635,7 @@ trait UnitTesterActions
635
  * @param int $number New lines
636
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
637
  */
638
- public function seeNumberNewLines($number) {
639
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
640
  }
641
 
@@ -773,11 +773,11 @@ trait UnitTesterActions
773
  * ```
774
  *
775
  * @param $filename
776
- * @param string $path
777
  * Conditional Assertion: Test won't be stopped on fail
778
  * @see \Codeception\Module\Filesystem::seeFileFound()
779
  */
780
- public function canSeeFileFound($filename, $path = null) {
781
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
782
  }
783
  /**
@@ -793,10 +793,10 @@ trait UnitTesterActions
793
  * ```
794
  *
795
  * @param $filename
796
- * @param string $path
797
  * @see \Codeception\Module\Filesystem::seeFileFound()
798
  */
799
- public function seeFileFound($filename, $path = null) {
800
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
801
  }
802
 
@@ -807,11 +807,11 @@ trait UnitTesterActions
807
  * Checks if file does not exist in path
808
  *
809
  * @param $filename
810
- * @param string $path
811
  * Conditional Assertion: Test won't be stopped on fail
812
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
813
  */
814
- public function cantSeeFileFound($filename, $path = null) {
815
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
816
  }
817
  /**
@@ -820,10 +820,10 @@ trait UnitTesterActions
820
  * Checks if file does not exist in path
821
  *
822
  * @param $filename
823
- * @param string $path
824
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
825
  */
826
- public function dontSeeFileFound($filename, $path = null) {
827
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
828
  }
829
 
24
  *
25
  * @param $expected
26
  * @param $actual
27
+ * @param string|null $message
28
  * @see \Codeception\Module\Asserts::assertEquals()
29
  */
30
+ public function assertEquals($expected, $actual, string $message = null) {
31
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
32
  }
33
 
39
  *
40
  * @param $expected
41
  * @param $actual
42
+ * @param string|null $message
43
  * @see \Codeception\Module\Asserts::assertNotEquals()
44
  */
45
+ public function assertNotEquals($expected, $actual, string $message = null) {
46
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
47
  }
48
 
54
  *
55
  * @param $expected
56
  * @param $actual
57
+ * @param string|null $message
58
  * @return mixed|void
59
  * @see \Codeception\Module\Asserts::assertSame()
60
  */
61
+ public function assertSame($expected, $actual, string $message = null) {
62
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args()));
63
  }
64
 
70
  *
71
  * @param $expected
72
  * @param $actual
73
+ * @param string|null $message
74
  * @see \Codeception\Module\Asserts::assertNotSame()
75
  */
76
+ public function assertNotSame($expected, $actual, string $message = null) {
77
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args()));
78
  }
79
 
85
  *
86
  * @param $expected
87
  * @param $actual
88
+ * @param string|null $message
89
  * @see \Codeception\Module\Asserts::assertGreaterThan()
90
  */
91
+ public function assertGreaterThan($expected, $actual, string $message = null) {
92
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));
93
  }
94
 
100
  *
101
  * @param $expected
102
  * @param $actual
103
+ * @param string|null $message
104
  * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
105
  */
106
+ public function assertGreaterThanOrEqual($expected, $actual, string $message = null) {
107
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));
108
  }
109
 
115
  *
116
  * @param $expected
117
  * @param $actual
118
+ * @param string|null $message
119
  * @see \Codeception\Module\Asserts::assertLessThan()
120
  */
121
+ public function assertLessThan($expected, $actual, string $message = null) {
122
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));
123
  }
124
 
130
  *
131
  * @param $expected
132
  * @param $actual
133
+ * @param string|null $message
134
  * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
135
  */
136
+ public function assertLessThanOrEqual($expected, $actual, string $message = null) {
137
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));
138
  }
139
 
145
  *
146
  * @param $needle
147
  * @param $haystack
148
+ * @param string|null $message
149
  * @see \Codeception\Module\Asserts::assertContains()
150
  */
151
+ public function assertContains($needle, $haystack, string $message = null) {
152
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));
153
  }
154
 
160
  *
161
  * @param $needle
162
  * @param $haystack
163
+ * @param string|null $message
164
  * @see \Codeception\Module\Asserts::assertNotContains()
165
  */
166
+ public function assertNotContains($needle, $haystack, string $message = null) {
167
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));
168
  }
169
 
175
  *
176
  * @param string $pattern
177
  * @param string $string
178
+ * @param string|null $message
179
  * @see \Codeception\Module\Asserts::assertRegExp()
180
  */
181
+ public function assertRegExp(string $pattern, string $string, string $message = null) {
182
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args()));
183
  }
184
 
190
  *
191
  * @param string $pattern
192
  * @param string $string
193
+ * @param string|null $message
194
  * @see \Codeception\Module\Asserts::assertNotRegExp()
195
  */
196
+ public function assertNotRegExp(string $pattern, string $string, string $message = null) {
197
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args()));
198
  }
199
 
204
  * Checks that variable is empty.
205
  *
206
  * @param $actual
207
+ * @param string|null $message
208
  * @see \Codeception\Module\Asserts::assertEmpty()
209
  */
210
+ public function assertEmpty($actual, string $message = null) {
211
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));
212
  }
213
 
218
  * Checks that variable is not empty.
219
  *
220
  * @param $actual
221
+ * @param string|null $message
222
  * @see \Codeception\Module\Asserts::assertNotEmpty()
223
  */
224
+ public function assertNotEmpty($actual, string $message = null) {
225
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));
226
  }
227
 
232
  * Checks that variable is NULL
233
  *
234
  * @param $actual
235
+ * @param string|null $message
236
  * @see \Codeception\Module\Asserts::assertNull()
237
  */
238
+ public function assertNull($actual, string $message = null) {
239
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
240
  }
241
 
246
  * Checks that variable is not NULL
247
  *
248
  * @param $actual
249
+ * @param string|null $message
250
  * @see \Codeception\Module\Asserts::assertNotNull()
251
  */
252
+ public function assertNotNull($actual, string $message = null) {
253
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));
254
  }
255
 
260
  * Checks that condition is positive.
261
  *
262
  * @param $condition
263
+ * @param string|null $message
264
  * @see \Codeception\Module\Asserts::assertTrue()
265
  */
266
+ public function assertTrue($condition, string $message = null) {
267
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));
268
  }
269
 
274
  * Checks that condition is negative.
275
  *
276
  * @param $condition
277
+ * @param string|null $message
278
  * @see \Codeception\Module\Asserts::assertFalse()
279
  */
280
+ public function assertFalse($condition, string $message = null) {
281
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));
282
  }
283
 
288
  * Checks if file exists
289
  *
290
  * @param string $filename
291
+ * @param string|null $message
292
  * @see \Codeception\Module\Asserts::assertFileExists()
293
  */
294
+ public function assertFileExists(string $filename, string $message = null) {
295
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args()));
296
  }
297
 
302
  * Checks if file doesn't exist
303
  *
304
  * @param string $filename
305
+ * @param string|null $message
306
  * @see \Codeception\Module\Asserts::assertFileNotExists()
307
  */
308
+ public function assertFileNotExists(string $filename, string $message = null) {
309
  return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args()));
310
  }
311
 
455
  * @param $callback
456
  * @see \Codeception\Module\Asserts::expectException()
457
  */
458
+ public function expectException(string $exception, $callback) {
459
  return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
460
  }
461
 
615
  * Conditional Assertion: Test won't be stopped on fail
616
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
617
  */
618
+ public function canSeeNumberNewLines(int $number) {
619
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
620
  }
621
  /**
635
  * @param int $number New lines
636
  * @see \Codeception\Module\Filesystem::seeNumberNewLines()
637
  */
638
+ public function seeNumberNewLines(int $number) {
639
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
640
  }
641
 
773
  * ```
774
  *
775
  * @param $filename
776
+ * @param string|null $path
777
  * Conditional Assertion: Test won't be stopped on fail
778
  * @see \Codeception\Module\Filesystem::seeFileFound()
779
  */
780
+ public function canSeeFileFound($filename, string $path = null) {
781
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
782
  }
783
  /**
793
  * ```
794
  *
795
  * @param $filename
796
+ * @param string|null $path
797
  * @see \Codeception\Module\Filesystem::seeFileFound()
798
  */
799
+ public function seeFileFound($filename, string $path = null) {
800
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
801
  }
802
 
807
  * Checks if file does not exist in path
808
  *
809
  * @param $filename
810
+ * @param string|null $path
811
  * Conditional Assertion: Test won't be stopped on fail
812
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
813
  */
814
+ public function cantSeeFileFound($filename, string $path = null) {
815
  return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
816
  }
817
  /**
820
  * Checks if file does not exist in path
821
  *
822
  * @param $filename
823
+ * @param string|null $path
824
  * @see \Codeception\Module\Filesystem::dontSeeFileFound()
825
  */
826
+ public function dontSeeFileFound($filename, string $path = null) {
827
  return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
828
  }
829