diff --git a/composer.json b/composer.json index 0287158..bbc3fb7 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,8 @@ }, "autoload-dev": { "psr-4": { - "cgsmith\\user\\tests\\": "tests/" + "cgsmith\\user\\tests\\": "tests/", + "tests\\": "tests/" } }, "extra": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..ef140ee --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1371 @@ +parameters: + ignoreErrors: + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/Bootstrap.php + + - + message: "#^Method cgsmith\\\\user\\\\Bootstrap\\:\\:bootstrapWeb\\(\\) has parameter \\$app with generic class yii\\\\web\\\\Application but does not specify its types\\: TUserIdentity$#" + count: 1 + path: src/Bootstrap.php + + - + message: "#^Method cgsmith\\\\user\\\\Bootstrap\\:\\:getUrlRules\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bootstrap.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 5 + path: src/Module.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Call to static method createObject\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Method cgsmith\\\\user\\\\Module\\:\\:bootstrapWeb\\(\\) has parameter \\$app with generic class yii\\\\web\\\\Application but does not specify its types\\: TUserIdentity$#" + count: 1 + path: src/Module.php + + - + message: "#^Method cgsmith\\\\user\\\\Module\\:\\:configureUserComponent\\(\\) has parameter \\$app with generic class yii\\\\web\\\\Application but does not specify its types\\: TUserIdentity$#" + count: 1 + path: src/Module.php + + - + message: "#^Method cgsmith\\\\user\\\\Module\\:\\:createModel\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Method cgsmith\\\\user\\\\Module\\:\\:getMailerSender\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Method cgsmith\\\\user\\\\Module\\:\\:getUrlRules\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$admins type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$avatarExtensions type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$captchaForms type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$defaultModelMap type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$formFieldConfig type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$gdprExemptRoutes type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$mailer type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Property cgsmith\\\\user\\\\Module\\:\\:\\$modelMap type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Template type T of method cgsmith\\\\user\\\\Module\\:\\:createModel\\(\\) is not referenced in a parameter\\.$#" + count: 1 + path: src/Module.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/commands/MigrateFromDektriumController.php + + - + message: "#^Class cgsmith\\\\user\\\\commands\\\\MigrateFromDektriumController extends generic class yii\\\\console\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/commands/MigrateFromDektriumController.php + + - + message: "#^Method cgsmith\\\\user\\\\commands\\\\MigrateFromDektriumController\\:\\:checkDektriumTables\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/commands/MigrateFromDektriumController.php + + - + message: "#^Class cgsmith\\\\user\\\\commands\\\\UserController extends generic class yii\\\\console\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/commands/UserController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 7 + path: src/components/BackendUser.php + + - + message: "#^Class cgsmith\\\\user\\\\components\\\\BackendUser extends generic class yii\\\\web\\\\User but does not specify its types\\: T$#" + count: 1 + path: src/components/BackendUser.php + + - + message: "#^Method cgsmith\\\\user\\\\components\\\\BackendUser\\:\\:getReturnUrl\\(\\) has parameter \\$defaultUrl with no value type specified in iterable type array\\.$#" + count: 1 + path: src/components/BackendUser.php + + - + message: "#^PHPDoc type string of property cgsmith\\\\user\\\\components\\\\BackendUser\\:\\:\\$identityCookie is not covariant with PHPDoc type array of overridden property yii\\\\web\\\\User\\\\:\\:\\$identityCookie\\.$#" + count: 1 + path: src/components/BackendUser.php + + - + message: "#^Property cgsmith\\\\user\\\\components\\\\BackendUser\\:\\:\\$identityCookie \\(string\\) does not accept default value of type array\\\\.$#" + count: 1 + path: src/components/BackendUser.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 32 + path: src/controllers/AdminController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 9 + path: src/controllers/AdminController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 21 + path: src/controllers/AdminController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\AdminController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/AdminController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 13 + path: src/controllers/GdprController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/controllers/GdprController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/controllers/GdprController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\GdprController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/GdprController.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$gdpr_deleted_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/controllers/GdprController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 13 + path: src/controllers/RbacController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 8 + path: src/controllers/RbacController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 11 + path: src/controllers/RbacController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\RbacController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/RbacController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 6 + path: src/controllers/RecoveryController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 2 + path: src/controllers/RecoveryController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/controllers/RecoveryController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\RecoveryController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/RecoveryController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 11 + path: src/controllers/RegistrationController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 3 + path: src/controllers/RegistrationController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/controllers/RegistrationController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\RegistrationController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/RegistrationController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 7 + path: src/controllers/SecurityController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 3 + path: src/controllers/SecurityController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\SecurityController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/SecurityController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 24 + path: src/controllers/SettingsController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 6 + path: src/controllers/SettingsController.php + + - + message: "#^Call to static method error\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/controllers/SettingsController.php + + - + message: "#^Call to static method getAlias\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/controllers/SettingsController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 14 + path: src/controllers/SettingsController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\SettingsController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/SettingsController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 5 + path: src/controllers/SocialController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 4 + path: src/controllers/SocialController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 3 + path: src/controllers/SocialController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\SocialController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/SocialController.php + + - + message: "#^Class yii\\\\authclient\\\\AuthAction not found\\.$#" + count: 1 + path: src/controllers/SocialController.php + + - + message: "#^Method cgsmith\\\\user\\\\controllers\\\\SocialController\\:\\:actionNetworks\\(\\) should return string but returns yii\\\\web\\\\Response\\.$#" + count: 1 + path: src/controllers/SocialController.php + + - + message: "#^Method cgsmith\\\\user\\\\controllers\\\\SocialController\\:\\:onAuthSuccess\\(\\) has parameter \\$client with no type specified\\.$#" + count: 1 + path: src/controllers/SocialController.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 17 + path: src/controllers/TwoFactorController.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 7 + path: src/controllers/TwoFactorController.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/controllers/TwoFactorController.php + + - + message: "#^Class cgsmith\\\\user\\\\controllers\\\\TwoFactorController extends generic class yii\\\\web\\\\Controller but does not specify its types\\: T$#" + count: 1 + path: src/controllers/TwoFactorController.php + + - + message: "#^Property cgsmith\\\\user\\\\events\\\\SocialAuthEvent\\:\\:\\$client has unknown class yii\\\\authclient\\\\ClientInterface as its type\\.$#" + count: 1 + path: src/events/SocialAuthEvent.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 5 + path: src/filters/BackendAccessControl.php + + - + message: "#^Class cgsmith\\\\user\\\\filters\\\\BackendAccessControl extends generic class yii\\\\filters\\\\AccessControl but does not specify its types\\: T$#" + count: 1 + path: src/filters/BackendAccessControl.php + + - + message: "#^PHPDoc type string\\|yii\\\\web\\\\User\\|null of property cgsmith\\\\user\\\\filters\\\\BackendAccessControl\\:\\:\\$user is not covariant with PHPDoc type array\\|string\\|yii\\\\web\\\\User\\\\|false of overridden property yii\\\\filters\\\\AccessControl\\\\:\\:\\$user\\.$#" + count: 1 + path: src/filters/BackendAccessControl.php + + - + message: "#^Property cgsmith\\\\user\\\\filters\\\\BackendAccessControl\\:\\:\\$user with generic class yii\\\\web\\\\User does not specify its types\\: T$#" + count: 1 + path: src/filters/BackendAccessControl.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 6 + path: src/filters/GdprConsentFilter.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/filters/GdprConsentFilter.php + + - + message: "#^Class cgsmith\\\\user\\\\filters\\\\GdprConsentFilter extends generic class yii\\\\base\\\\ActionFilter but does not specify its types\\: T$#" + count: 1 + path: src/filters/GdprConsentFilter.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 2 + path: src/helpers/Password.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/helpers/Password.php + + - + message: "#^Method cgsmith\\\\user\\\\helpers\\\\Password\\:\\:checkStrength\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/helpers/Password.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 2 + path: src/models/AssignmentForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/models/AssignmentForm.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\AssignmentForm\\:\\:\\$roles type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/AssignmentForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/GdprConsentForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 3 + path: src/models/GdprConsentForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 2 + path: src/models/LoginForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/models/LoginForm.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\LoginForm\\:\\:getCaptchaRule\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/LoginForm.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 3 + path: src/models/PermissionForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/models/PermissionForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/Profile.php + + - + message: "#^Call to static method getAlias\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/models/Profile.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 10 + path: src/models/Profile.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\Profile\\:\\:getTimezoneList\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/Profile.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\Profile\\:\\:getUser\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/Profile.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/RecoveryForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/models/RecoveryForm.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\RecoveryForm\\:\\:getCaptchaRule\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/RecoveryForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/RecoveryResetForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 3 + path: src/models/RecoveryResetForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/RegistrationForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 9 + path: src/models/RegistrationForm.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\RegistrationForm\\:\\:getCaptchaRule\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/RegistrationForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/models/ResendForm.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 3 + path: src/models/RoleForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 6 + path: src/models/RoleForm.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\RoleForm\\:\\:\\$childRoles type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/RoleForm.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\RoleForm\\:\\:\\$permissions type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/RoleForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/Session.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 9 + path: src/models/Session.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\Session\\:\\:getUser\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/Session.php + + - + message: "#^Negated boolean expression is always true\\.$#" + count: 1 + path: src/models/Session.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/models/SettingsForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 11 + path: src/models/SettingsForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/models/SocialAccount.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\SocialAccount has PHPDoc tag @property\\-read for property \\$decodedData with no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/SocialAccount.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\SocialAccount\\:\\:getDecodedData\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/SocialAccount.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\SocialAccount\\:\\:getUser\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/SocialAccount.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 4 + path: src/models/Token.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/models/Token.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\Token has PHPDoc tag @property for property \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/Token.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\Token\\:\\:findByToken\\(\\) should return static\\(cgsmith\\\\user\\\\models\\\\Token\\)\\|null but returns cgsmith\\\\user\\\\models\\\\Token\\|null\\.$#" + count: 1 + path: src/models/Token.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\Token\\:\\:getUser\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/Token.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\Token\\:\\:\\$created_at \\(string\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/models/Token.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\Token\\:\\:\\$data \\(array\\|null\\) does not accept string\\|false\\.$#" + count: 1 + path: src/models/Token.php + + - + message: "#^Unsafe usage of new static\\(\\)\\.$#" + count: 3 + path: src/models/Token.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/models/TwoFactor.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\TwoFactor has PHPDoc tag @property for property \\$backup_codes with no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/TwoFactor.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\TwoFactor\\:\\:getUser\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/TwoFactor.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\TwoFactor\\:\\:\\$backup_codes \\(array\\|null\\) does not accept string\\|false\\.$#" + count: 1 + path: src/models/TwoFactor.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/models/TwoFactorForm.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 3 + path: src/models/TwoFactorSetupForm.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 9 + path: src/models/User.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 14 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:afterSave\\(\\) has parameter \\$changedAttributes with no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:findByEmail\\(\\) should return static\\(cgsmith\\\\user\\\\models\\\\User\\)\\|null but returns cgsmith\\\\user\\\\models\\\\User\\|null\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:findByEmailOrUsername\\(\\) should return static\\(cgsmith\\\\user\\\\models\\\\User\\)\\|null but returns cgsmith\\\\user\\\\models\\\\User\\|null\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:findByUsername\\(\\) should return static\\(cgsmith\\\\user\\\\models\\\\User\\)\\|null but returns cgsmith\\\\user\\\\models\\\\User\\|null\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:findIdentity\\(\\) should return static\\(cgsmith\\\\user\\\\models\\\\User\\)\\|null but returns cgsmith\\\\user\\\\models\\\\User\\|null\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:getProfile\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:getSessions\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:getSocialAccounts\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:getTokens\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\User\\:\\:getTwoFactor\\(\\) return type with generic class yii\\\\db\\\\ActiveQuery does not specify its types\\: T$#" + count: 1 + path: src/models/User.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$blocked_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$email_confirmed_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$last_login_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/models/User.php + + - + message: "#^Method cgsmith\\\\user\\\\models\\\\UserSearch\\:\\:search\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#" + count: 1 + path: src/models/UserSearch.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\query\\\\ProfileQuery extends generic class yii\\\\db\\\\ActiveQuery but does not specify its types\\: T$#" + count: 1 + path: src/models/query/ProfileQuery.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\query\\\\SessionQuery extends generic class yii\\\\db\\\\ActiveQuery but does not specify its types\\: T$#" + count: 1 + path: src/models/query/SessionQuery.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\query\\\\SocialAccountQuery extends generic class yii\\\\db\\\\ActiveQuery but does not specify its types\\: T$#" + count: 1 + path: src/models/query/SocialAccountQuery.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\query\\\\TokenQuery extends generic class yii\\\\db\\\\ActiveQuery but does not specify its types\\: T$#" + count: 1 + path: src/models/query/TokenQuery.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\query\\\\TwoFactorQuery extends generic class yii\\\\db\\\\ActiveQuery but does not specify its types\\: T$#" + count: 1 + path: src/models/query/TwoFactorQuery.php + + - + message: "#^Class cgsmith\\\\user\\\\models\\\\query\\\\UserQuery extends generic class yii\\\\db\\\\ActiveQuery but does not specify its types\\: T$#" + count: 1 + path: src/models/query/UserQuery.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 4 + path: src/services/CaptchaService.php + + - + message: "#^Call to static method warning\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/services/CaptchaService.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$gdpr_consent_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/services/GdprService.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$gdpr_marketing_consent_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 2 + path: src/services/GdprService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 6 + path: src/services/MailerService.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/services/MailerService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\MailerService\\:\\:sendMessage\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/MailerService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/services/RbacService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\RbacService\\:\\:updateUserRoles\\(\\) has parameter \\$roleNames with no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/RbacService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/services/RecoveryService.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 2 + path: src/services/RecoveryService.php + + - + message: "#^Call to static method error\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/services/RecoveryService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 2 + path: src/services/RegistrationService.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 2 + path: src/services/RegistrationService.php + + - + message: "#^Call to static method error\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/services/RegistrationService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 6 + path: src/services/SessionService.php + + - + message: "#^Call to static method error\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/services/SessionService.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\Session\\:\\:\\$created_at \\(string\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/services/SessionService.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\Session\\:\\:\\$last_activity_at \\(string\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/services/SessionService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 10 + path: src/services/SocialAuthService.php + + - + message: "#^Call to method getId\\(\\) on an unknown class yii\\\\authclient\\\\ClientInterface\\.$#" + count: 3 + path: src/services/SocialAuthService.php + + - + message: "#^Call to method getUserAttributes\\(\\) on an unknown class yii\\\\authclient\\\\ClientInterface\\.$#" + count: 2 + path: src/services/SocialAuthService.php + + - + message: "#^Call to static method error\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:connect\\(\\) has parameter \\$attributes with no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:getAuthClient\\(\\) has invalid return type yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:getAuthClients\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:register\\(\\) has parameter \\$attributes with no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Parameter \\$client of method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:connect\\(\\) has invalid type yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Parameter \\$client of method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:handleCallback\\(\\) has invalid type yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Parameter \\$client of method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:login\\(\\) has invalid type yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Parameter \\$client of method cgsmith\\\\user\\\\services\\\\SocialAuthService\\:\\:register\\(\\) has invalid type yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\User\\:\\:\\$email_confirmed_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\|null\\.$#" + count: 1 + path: src/services/SocialAuthService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 8 + path: src/services/TwoFactorService.php + + - + message: "#^Call to method writeString\\(\\) on an unknown class BaconQrCode\\\\Writer\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Instantiated class BaconQrCode\\\\Renderer\\\\Image\\\\SvgImageBackEnd not found\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Instantiated class BaconQrCode\\\\Renderer\\\\RendererStyle\\\\RendererStyle not found\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Instantiated class BaconQrCode\\\\Writer not found\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\TwoFactorService\\:\\:generateBackupCodes\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\TwoFactorService\\:\\:regenerateBackupCodes\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Property cgsmith\\\\user\\\\models\\\\TwoFactor\\:\\:\\$enabled_at \\(string\\|null\\) does not accept yii\\\\db\\\\Expression\\.$#" + count: 1 + path: src/services/TwoFactorService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 10 + path: src/services/UserService.php + + - + message: "#^Call to static method error\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/services/UserService.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/services/UserService.php + + - + message: "#^Method cgsmith\\\\user\\\\services\\\\UserService\\:\\:update\\(\\) has parameter \\$attributes with no value type specified in iterable type array\\.$#" + count: 1 + path: src/services/UserService.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/validators/HCaptchaValidator.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/validators/HCaptchaValidator.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/validators/HCaptchaValidator.php + + - + message: "#^Method cgsmith\\\\user\\\\validators\\\\HCaptchaValidator\\:\\:validateValue\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/validators/HCaptchaValidator.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/validators/ReCaptchaValidator.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/validators/ReCaptchaValidator.php + + - + message: "#^Method cgsmith\\\\user\\\\validators\\\\ReCaptchaValidator\\:\\:validateValue\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/validators/ReCaptchaValidator.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/_alert.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/views/admin/_account.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/admin/_assignments.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 6 + path: src/views/admin/_assignments.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/views/admin/_form.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 12 + path: src/views/admin/_info.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/views/admin/_menu.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 1 + path: src/views/admin/_profile.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/admin/create.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 2 + path: src/views/admin/create.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 4 + path: src/views/admin/index.php + + - + message: "#^Anonymous function has an unused use \\$module\\.$#" + count: 1 + path: src/views/admin/index.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 22 + path: src/views/admin/index.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/admin/update.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 13 + path: src/views/admin/update.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/views/gdpr/consent.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 11 + path: src/views/gdpr/delete.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/views/gdpr/index.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/views/mail/confirmation-text.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 6 + path: src/views/mail/confirmation.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/mail/generated_password-text.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/views/mail/generated_password-text.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/mail/generated_password.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/views/mail/generated_password.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 3 + path: src/views/mail/layouts/html.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/views/mail/recovery-text.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 6 + path: src/views/mail/recovery.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/mail/welcome-text.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 6 + path: src/views/mail/welcome-text.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/mail/welcome.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/views/mail/welcome.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 9 + path: src/views/rbac/index.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 8 + path: src/views/rbac/permission-form.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/rbac/permissions.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 11 + path: src/views/rbac/permissions.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 10 + path: src/views/rbac/role-form.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/rbac/roles.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 11 + path: src/views/rbac/roles.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/views/recovery/request.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/views/recovery/reset.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/views/registration/_gdpr_consent.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/views/registration/register.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/views/registration/resend.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/views/security/login.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 3 + path: src/views/settings/_menu.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 3 + path: src/views/settings/_menu.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 4 + path: src/views/settings/account.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 7 + path: src/views/settings/profile.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 2 + path: src/views/settings/sessions.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 12 + path: src/views/settings/sessions.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/views/social/networks.php + + - + message: "#^Call to method getId\\(\\) on an unknown class yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/views/social/networks.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 10 + path: src/views/social/networks.php + + - + message: "#^Call to static method widget\\(\\) on an unknown class yii\\\\authclient\\\\widgets\\\\AuthChoice\\.$#" + count: 1 + path: src/views/social/networks.php + + - + message: "#^PHPDoc tag @var for variable \\$availableClients contains unknown class yii\\\\authclient\\\\ClientInterface\\.$#" + count: 1 + path: src/views/social/networks.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 13 + path: src/views/two-factor/backup-codes.php + + - + message: "#^PHPDoc tag @var for variable \\$backupCodes has no value type specified in iterable type array\\.$#" + count: 1 + path: src/views/two-factor/backup-codes.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 16 + path: src/views/two-factor/index.php + + - + message: "#^Call to static method t\\(\\) on an unknown class Yii\\.$#" + count: 5 + path: src/views/two-factor/verify.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 6 + path: src/widgets/Captcha.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 2 + path: src/widgets/Captcha.php + + - + message: "#^Property cgsmith\\\\user\\\\widgets\\\\Captcha\\:\\:\\$form has no type specified\\.$#" + count: 1 + path: src/widgets/Captcha.php + + - + message: "#^Property cgsmith\\\\user\\\\widgets\\\\Captcha\\:\\:\\$model has no type specified\\.$#" + count: 1 + path: src/widgets/Captcha.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/widgets/Login.php + + - + message: "#^Access to static property \\$app on an unknown class Yii\\.$#" + count: 1 + path: src/widgets/SocialConnect.php + + - + message: "#^Access to static property \\$container on an unknown class Yii\\.$#" + count: 1 + path: src/widgets/SocialConnect.php + + - + message: "#^Call to static method widget\\(\\) on an unknown class yii\\\\authclient\\\\widgets\\\\AuthChoice\\.$#" + count: 1 + path: src/widgets/SocialConnect.php + + - + message: "#^Property cgsmith\\\\user\\\\widgets\\\\SocialConnect\\:\\:\\$options type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/widgets/SocialConnect.php diff --git a/phpstan.neon b/phpstan.neon index ac1006a..b80e266 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,8 +12,6 @@ parameters: treatPhpDocTypesAsCertain: false reportUnmatchedIgnoredErrors: false - yii2: - config_path: null - includes: + - phpstan-baseline.neon - vendor/phpstan/phpstan/conf/bleedingEdge.neon diff --git a/src/Module.php b/src/Module.php index 10dfc8b..0c03039 100644 --- a/src/Module.php +++ b/src/Module.php @@ -341,6 +341,7 @@ class Module extends BaseModule implements BootstrapInterface 'RegistrationForm' => 'cgsmith\user\models\RegistrationForm', 'RecoveryForm' => 'cgsmith\user\models\RecoveryForm', 'RecoveryResetForm' => 'cgsmith\user\models\RecoveryResetForm', + 'ResendForm' => 'cgsmith\user\models\ResendForm', 'SettingsForm' => 'cgsmith\user\models\SettingsForm', 'UserSearch' => 'cgsmith\user\models\UserSearch', ]; diff --git a/src/controllers/RegistrationController.php b/src/controllers/RegistrationController.php index df0fc8b..2488acf 100644 --- a/src/controllers/RegistrationController.php +++ b/src/controllers/RegistrationController.php @@ -130,24 +130,7 @@ class RegistrationController extends Controller throw new NotFoundHttpException(); } - $model = new class extends \yii\base\Model { - public ?string $email = null; - - public function rules(): array - { - return [ - ['email', 'required'], - ['email', 'email'], - ]; - } - - public function attributeLabels(): array - { - return [ - 'email' => Yii::t('user', 'Email'), - ]; - } - }; + $model = $module->createModel('ResendForm'); if ($model->load(Yii::$app->request->post()) && $model->validate()) { $user = User::findByEmail($model->email); diff --git a/src/models/ResendForm.php b/src/models/ResendForm.php new file mode 100644 index 0000000..d959d8f --- /dev/null +++ b/src/models/ResendForm.php @@ -0,0 +1,38 @@ + Yii::t('user', 'Email'), + ]; + } +} diff --git a/src/services/CaptchaService.php b/src/services/CaptchaService.php index 8e9619e..2276f31 100644 --- a/src/services/CaptchaService.php +++ b/src/services/CaptchaService.php @@ -93,7 +93,7 @@ class CaptchaService $data['remoteip'] = Yii::$app->request->userIP; } - $ch = curl_init('https://hcaptcha.com/siteverify'); + $ch = curl_init('https://api.hcaptcha.com/siteverify'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); diff --git a/src/validators/HCaptchaValidator.php b/src/validators/HCaptchaValidator.php index e0a468f..dde75e7 100644 --- a/src/validators/HCaptchaValidator.php +++ b/src/validators/HCaptchaValidator.php @@ -13,13 +13,17 @@ use yii\validators\Validator; */ class HCaptchaValidator extends Validator { - public bool $skipOnEmpty = false; + public $skipOnEmpty = false; /** * {@inheritdoc} */ protected function validateValue($value): ?array { + if (empty($value)) { + $value = Yii::$app->request->post('h-captcha-response'); + } + if (empty($value)) { return [Yii::t('user', 'Please complete the CAPTCHA verification.'), []]; } diff --git a/src/validators/ReCaptchaValidator.php b/src/validators/ReCaptchaValidator.php index 6ca026e..035ca37 100644 --- a/src/validators/ReCaptchaValidator.php +++ b/src/validators/ReCaptchaValidator.php @@ -13,7 +13,8 @@ use yii\validators\Validator; */ class ReCaptchaValidator extends Validator { - public bool $skipOnEmpty = false; + /** @var bool */ + public $skipOnEmpty = false; /** * {@inheritdoc} diff --git a/tests/UnitBootstrap.php b/tests/UnitBootstrap.php index ba5339e..a0e4874 100644 --- a/tests/UnitBootstrap.php +++ b/tests/UnitBootstrap.php @@ -46,4 +46,61 @@ $config = [ ], ]; -new \yii\web\Application($config); +$app = new \yii\web\Application($config); + +$db = $app->db; +$db->createCommand('CREATE TABLE IF NOT EXISTS {{%user}} ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + email VARCHAR(255) NOT NULL, + username VARCHAR(255), + password_hash VARCHAR(255) NOT NULL DEFAULT \'\', + auth_key VARCHAR(32) NOT NULL DEFAULT \'\', + status VARCHAR(20) NOT NULL DEFAULT \'pending\', + email_confirmed_at DATETIME, + blocked_at DATETIME, + last_login_at DATETIME, + last_login_ip VARCHAR(45), + registration_ip VARCHAR(45), + gdpr_consent_at DATETIME, + gdpr_consent_version VARCHAR(20), + gdpr_marketing_consent_at DATETIME, + gdpr_deleted_at DATETIME, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP +)')->execute(); + +$db->createCommand('CREATE TABLE IF NOT EXISTS {{%user_token}} ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + user_id INTEGER NOT NULL, + type VARCHAR(20) NOT NULL, + token VARCHAR(64) NOT NULL, + data TEXT, + expires_at DATETIME NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP +)')->execute(); + +$db->createCommand('CREATE TABLE IF NOT EXISTS {{%user_profile}} ( + user_id INTEGER PRIMARY KEY, + name VARCHAR(255), + bio TEXT, + location VARCHAR(255), + website VARCHAR(255), + timezone VARCHAR(40), + avatar_path VARCHAR(255), + gravatar_email VARCHAR(255), + use_gravatar BOOLEAN NOT NULL DEFAULT 1, + public_email VARCHAR(255), + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP +)')->execute(); + +$db->createCommand('CREATE TABLE IF NOT EXISTS {{%user_session}} ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + user_id INTEGER NOT NULL, + session_id VARCHAR(128) NOT NULL, + ip VARCHAR(45), + user_agent TEXT, + device_name VARCHAR(255), + last_activity_at DATETIME NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP +)')->execute(); diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php new file mode 100644 index 0000000..09dadf9 --- /dev/null +++ b/tests/_support/FunctionalTester.php @@ -0,0 +1,28 @@ +haveFixtures([ + * 'posts' => PostsFixture::class, + * 'user' => [ + * 'class' => UserFixture::class, + * 'dataFile' => '@tests/_data/models/user.php', + * ], + * ]); + * ``` + * + * Note: if you need to load fixtures before a test (probably before the + * cleanup transaction is started; `cleanup` option is `true` by default), + * you can specify the fixtures in the `_fixtures()` method of a test case + * + * ```php + * [ + * 'class' => UserFixture::class, + * 'dataFile' => codecept_data_dir() . 'user.php' + * ] + * ]; + * } + * ``` + * instead of calling `haveFixtures` in Cest `_before` + * + * @param $fixtures + * @part fixtures + * @see \Codeception\Module\Yii2::haveFixtures() + */ + public function haveFixtures($fixtures): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('haveFixtures', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Returns all loaded fixtures. + * Array of fixture instances + * + * @part fixtures + * @return array + * @see \Codeception\Module\Yii2::grabFixtures() + */ + public function grabFixtures() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFixtures', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Gets a fixture by name. + * Returns a Fixture instance. If a fixture is an instance of + * `\yii\test\BaseActiveFixture` a second parameter can be used to return a + * specific model: + * + * ```php + * haveFixtures(['users' => UserFixture::class]); + * + * $users = $I->grabFixture('users'); + * + * // get first user by key, if a fixture is an instance of ActiveFixture + * $user = $I->grabFixture('users', 'user1'); + * ``` + * + * @param $name + * @return mixed + * @throws \Codeception\Exception\ModuleException if the fixture is not found + * @part fixtures + * @see \Codeception\Module\Yii2::grabFixture() + */ + public function grabFixture($name, $index = NULL) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFixture', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Inserts a record into the database. + * + * ``` php + * haveRecord('app\models\User', array('name' => 'Davert')); + * ?> + * ``` + * @template T of \yii\db\ActiveRecord + * @param class-string $model + * @param array $attributes + * @return mixed + * @part orm + * @see \Codeception\Module\Yii2::haveRecord() + */ + public function haveRecord(string $model, $attributes = []): mixed { + return $this->getScenario()->runStep(new \Codeception\Step\Action('haveRecord', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a record exists in the database. + * + * ``` php + * $I->seeRecord('app\models\User', array('name' => 'davert')); + * ``` + * + * @param class-string<\yii\db\ActiveRecord> $model + * @param array $attributes + * @part orm + * @see \Codeception\Module\Yii2::seeRecord() + */ + public function seeRecord(string $model, array $attributes = []): void { + $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks that a record exists in the database. + * + * ``` php + * $I->seeRecord('app\models\User', array('name' => 'davert')); + * ``` + * + * @param class-string<\yii\db\ActiveRecord> $model + * @param array $attributes + * @part orm + * @see \Codeception\Module\Yii2::seeRecord() + */ + public function canSeeRecord(string $model, array $attributes = []): void { + $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a record does not exist in the database. + * + * ``` php + * $I->dontSeeRecord('app\models\User', array('name' => 'davert')); + * ``` + * + * @param class-string<\yii\db\ActiveRecord> $model + * @param array $attributes + * @part orm + * @see \Codeception\Module\Yii2::dontSeeRecord() + */ + public function dontSeeRecord(string $model, array $attributes = []): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeRecord', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks that a record does not exist in the database. + * + * ``` php + * $I->dontSeeRecord('app\models\User', array('name' => 'davert')); + * ``` + * + * @param class-string<\yii\db\ActiveRecord> $model + * @param array $attributes + * @part orm + * @see \Codeception\Module\Yii2::dontSeeRecord() + */ + public function cantSeeRecord(string $model, array $attributes = []): void { + $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Retrieves a record from the database + * + * ``` php + * $category = $I->grabRecord('app\models\User', array('name' => 'davert')); + * ``` + * + * @param class-string<\yii\db\ActiveRecord> $model + * @param array $attributes + * @part orm + * @see \Codeception\Module\Yii2::grabRecord() + */ + public function grabRecord(string $model, array $attributes = []): \yii\db\ActiveRecord|array|null { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Handles and checks throwables (Exceptions/Errors) called inside the callback function. + * Either throwable class name or throwable instance should be provided. + * + * ```php + * expectThrowable(MyThrowable::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectThrowable(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * If you want to check message or throwable code, you can pass them with throwable instance: + * ```php + * expectThrowable(new MyError("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * @see \Codeception\Module\Asserts::expectThrowable() + */ + public function expectThrowable(\Throwable|string $throwable, callable $callback): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() + */ + public function assertFileNotExists(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() + */ + public function assertGreaterOrEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() + */ + public function assertIsEmpty($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() + */ + public function assertLessOrEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() + */ + public function assertNotRegExp(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertRegExp() + */ + public function assertRegExp(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param mixed $value + * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() + */ + public function assertThatItsNot($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() + */ + public function assertArrayHasKey($key, $array, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() + */ + public function assertArrayNotHasKey($key, $array, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() + */ + public function assertClassHasAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified static attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() + */ + public function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() + */ + public function assertClassNotHasAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified static attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() + */ + public function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains a needle. + * + * @param mixed $needle + * @see \Codeception\Module\AbstractAsserts::assertContains() + */ + public function assertContains($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param mixed $needle + * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() + */ + public function assertContainsEquals($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only values of a given type. + * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() + */ + public function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only instances of a given class name. + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() + */ + public function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertCount() + */ + public function assertCount(int $expectedCount, $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory does not exist. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() + */ + public function assertDirectoryDoesNotExist(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() + */ + public function assertDirectoryExists(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() + */ + public function assertDirectoryIsNotReadable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() + */ + public function assertDirectoryIsNotWritable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is readable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() + */ + public function assertDirectoryIsReadable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() + */ + public function assertDirectoryIsWritable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() + */ + public function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param mixed $actual + * + * @phpstan-assert empty $actual + * @see \Codeception\Module\AbstractAsserts::assertEmpty() + */ + public function assertEmpty($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEquals() + */ + public function assertEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (canonicalizing). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() + */ + public function assertEqualsCanonicalizing($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (ignoring case). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() + */ + public function assertEqualsIgnoringCase($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (with delta). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() + */ + public function assertEqualsWithDelta($expected, $actual, float $delta, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is false. + * + * @param mixed $condition + * + * @phpstan-assert false $condition + * @see \Codeception\Module\AbstractAsserts::assertFalse() + */ + public function assertFalse($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() + */ + public function assertFileDoesNotExist(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file. + * @see \Codeception\Module\AbstractAsserts::assertFileEquals() + */ + public function assertFileEquals(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() + */ + public function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() + */ + public function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists. + * @see \Codeception\Module\AbstractAsserts::assertFileExists() + */ + public function assertFileExists(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() + */ + public function assertFileIsNotReadable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() + */ + public function assertFileIsNotWritable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is readable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() + */ + public function assertFileIsReadable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() + */ + public function assertFileIsWritable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file. + * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() + */ + public function assertFileNotEquals(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() + */ + public function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() + */ + public function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is finite. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertFinite() + */ + public function assertFinite($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() + */ + public function assertGreaterThan($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() + */ + public function assertGreaterThanOrEqual($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is infinite. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertInfinite() + */ + public function assertInfinite($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of a given type. + * + * @template ExpectedType of object + * + * @param mixed $actual + * @param class-string $expected + * + * @phpstan-assert =ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() + */ + public function assertInstanceOf(string $expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type array. + * + * @param mixed $actual + * + * @phpstan-assert array $actual + * @see \Codeception\Module\AbstractAsserts::assertIsArray() + */ + public function assertIsArray($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type bool. + * + * @param mixed $actual + * + * @phpstan-assert bool $actual + * @see \Codeception\Module\AbstractAsserts::assertIsBool() + */ + public function assertIsBool($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type callable. + * + * @param mixed $actual + * + * @phpstan-assert callable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsCallable() + */ + public function assertIsCallable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource and is closed. + * + * @param mixed $actual + * + * @phpstan-assert resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() + */ + public function assertIsClosedResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type float. + * + * @param mixed $actual + * + * @phpstan-assert float $actual + * @see \Codeception\Module\AbstractAsserts::assertIsFloat() + */ + public function assertIsFloat($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type int. + * + * @param mixed $actual + * + * @phpstan-assert int $actual + * @see \Codeception\Module\AbstractAsserts::assertIsInt() + */ + public function assertIsInt($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type iterable. + * + * @param mixed $actual + * + * @phpstan-assert iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsIterable() + */ + public function assertIsIterable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type array. + * + * @param mixed $actual + * + * @phpstan-assert !array $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() + */ + public function assertIsNotArray($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type bool. + * + * @param mixed $actual + * + * @phpstan-assert !bool $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() + */ + public function assertIsNotBool($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type callable. + * + * @param mixed $actual + * + * @phpstan-assert !callable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() + */ + public function assertIsNotCallable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param mixed $actual + * + * @phpstan-assert !resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() + */ + public function assertIsNotClosedResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type float. + * + * @param mixed $actual + * + * @phpstan-assert !float $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() + */ + public function assertIsNotFloat($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type int. + * + * @param mixed $actual + * + * @phpstan-assert !int $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() + */ + public function assertIsNotInt($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type iterable. + * + * @param mixed $actual + * + * @phpstan-assert !iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() + */ + public function assertIsNotIterable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type numeric. + * + * @param mixed $actual + * + * @phpstan-assert !numeric $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() + */ + public function assertIsNotNumeric($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type object. + * + * @param mixed $actual + * + * @phpstan-assert !object $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() + */ + public function assertIsNotObject($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() + */ + public function assertIsNotReadable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param mixed $actual + * + * @phpstan-assert !resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() + */ + public function assertIsNotResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type scalar. + * + * @param mixed $actual + * + * @psalm-assert !scalar $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() + */ + public function assertIsNotScalar($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type string. + * + * @param mixed $actual + * + * @phpstan-assert !string $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotString() + */ + public function assertIsNotString($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() + */ + public function assertIsNotWritable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type numeric. + * + * @param mixed $actual + * + * @phpstan-assert numeric $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() + */ + public function assertIsNumeric($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type object. + * + * @param mixed $actual + * + * @phpstan-assert object $actual + * @see \Codeception\Module\AbstractAsserts::assertIsObject() + */ + public function assertIsObject($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir is readable. + * @see \Codeception\Module\AbstractAsserts::assertIsReadable() + */ + public function assertIsReadable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource. + * + * @param mixed $actual + * + * @phpstan-assert resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsResource() + */ + public function assertIsResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type scalar. + * + * @param mixed $actual + * + * @phpstan-assert scalar $actual + * @see \Codeception\Module\AbstractAsserts::assertIsScalar() + */ + public function assertIsScalar($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type string. + * + * @param mixed $actual + * + * @phpstan-assert string $actual + * @see \Codeception\Module\AbstractAsserts::assertIsString() + */ + public function assertIsString($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertIsWritable() + */ + public function assertIsWritable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string is a valid JSON string. + * @see \Codeception\Module\AbstractAsserts::assertJson() + */ + public function assertJson(string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() + */ + public function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() + */ + public function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() + */ + public function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() + */ + public function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() + */ + public function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() + */ + public function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessThan() + */ + public function assertLessThan($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() + */ + public function assertLessThanOrEqual($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() + */ + public function assertMatchesRegularExpression(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is nan. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNan() + */ + public function assertNan($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain a needle. + * + * @param mixed $needle + * @see \Codeception\Module\AbstractAsserts::assertNotContains() + */ + public function assertNotContains($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() + */ + public function assertNotContainsEquals($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain only values of a given type. + * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() + */ + public function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertNotCount() + */ + public function assertNotCount(int $expectedCount, $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not empty. + * + * @param mixed $actual + * + * @phpstan-assert !empty $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() + */ + public function assertNotEmpty($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEquals() + */ + public function assertNotEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (canonicalizing). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() + */ + public function assertNotEqualsCanonicalizing($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (ignoring case). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() + */ + public function assertNotEqualsIgnoringCase($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (with delta). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() + */ + public function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not false. + * + * @param mixed $condition + * + * @phpstan-assert !false $condition + * @see \Codeception\Module\AbstractAsserts::assertNotFalse() + */ + public function assertNotFalse($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of a given type. + * + * @template ExpectedType of object + * + * @param mixed $actual + * @param class-string $expected + * + * @phpstan-assert !ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() + */ + public function assertNotInstanceOf(string $expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not null. + * + * @param mixed $actual + * + * @phpstan-assert !null $actual + * @see \Codeception\Module\AbstractAsserts::assertNotNull() + */ + public function assertNotNull($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables do not have the same type and value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotSame() + */ + public function assertNotSame($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() + */ + public function assertNotSameSize($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not true. + * + * @param mixed $condition + * + * @phpstan-assert !true $condition + * @see \Codeception\Module\AbstractAsserts::assertNotTrue() + */ + public function assertNotTrue($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is null. + * + * @param mixed $actual + * + * @phpstan-assert null $actual + * @see \Codeception\Module\AbstractAsserts::assertNull() + */ + public function assertNull($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object has a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() + */ + public function assertObjectHasAttribute(string $attributeName, object $object, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object does not have a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() + */ + public function assertObjectNotHasAttribute(string $attributeName, object $object, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables have the same type and value. + * Used on objects, it asserts that two variables reference + * the same object. + * + * @template ExpectedType + * + * @param ExpectedType $expected + * @param mixed $actual + * + * @phpstan-assert =ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertSame() + */ + public function assertSame($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertSameSize() + */ + public function assertSameSize($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() + */ + public function assertStringContainsString(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() + */ + public function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends not with a given suffix. + * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() + */ + public function assertStringEndsNotWith(string $suffix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends with a given suffix. + * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() + */ + public function assertStringEndsWith(string $suffix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file. + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() + */ + public function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() + */ + public function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() + */ + public function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() + */ + public function assertStringMatchesFormat(string $format, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format file. + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() + */ + public function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() + */ + public function assertStringNotContainsString(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() + */ + public function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file. + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() + */ + public function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() + */ + public function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() + */ + public function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() + */ + public function assertStringNotMatchesFormat(string $format, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() + */ + public function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts not with a given prefix. + * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() + */ + public function assertStringStartsNotWith(string $prefix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts with a given prefix. + * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() + */ + public function assertStringStartsWith(string $prefix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param mixed $value + * @see \Codeception\Module\AbstractAsserts::assertThat() + */ + public function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is true. + * + * @param mixed $condition + * + * @phpstan-assert true $condition + * @see \Codeception\Module\AbstractAsserts::assertTrue() + */ + public function assertTrue($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() + */ + public function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are not equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() + */ + public function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() + */ + public function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() + */ + public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() + */ + public function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() + */ + public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fails a test with the given message. + * @see \Codeception\Module\AbstractAsserts::fail() + */ + public function fail(string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as incomplete. + * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() + */ + public function markTestIncomplete(string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as skipped. + * @see \Codeception\Module\AbstractAsserts::markTestSkipped() + */ + public function markTestSkipped(string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); + } +} diff --git a/tests/_support/_generated/UnitTesterActions.php b/tests/_support/_generated/UnitTesterActions.php new file mode 100644 index 0000000..402c40e --- /dev/null +++ b/tests/_support/_generated/UnitTesterActions.php @@ -0,0 +1,1780 @@ +expectThrowable(MyThrowable::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectThrowable(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * If you want to check message or throwable code, you can pass them with throwable instance: + * ```php + * expectThrowable(new MyError("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * @see \Codeception\Module\Asserts::expectThrowable() + */ + public function expectThrowable(\Throwable|string $throwable, callable $callback): void { + $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() + */ + public function assertFileNotExists(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() + */ + public function assertGreaterOrEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() + */ + public function assertIsEmpty($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() + */ + public function assertLessOrEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() + */ + public function assertNotRegExp(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertRegExp() + */ + public function assertRegExp(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param mixed $value + * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() + */ + public function assertThatItsNot($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() + */ + public function assertArrayHasKey($key, $array, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|\ArrayAccess $array + * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() + */ + public function assertArrayNotHasKey($key, $array, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() + */ + public function assertClassHasAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified static attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() + */ + public function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() + */ + public function assertClassNotHasAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified static attribute. + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() + */ + public function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains a needle. + * + * @param mixed $needle + * @see \Codeception\Module\AbstractAsserts::assertContains() + */ + public function assertContains($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param mixed $needle + * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() + */ + public function assertContainsEquals($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only values of a given type. + * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() + */ + public function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only instances of a given class name. + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() + */ + public function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertCount() + */ + public function assertCount(int $expectedCount, $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory does not exist. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() + */ + public function assertDirectoryDoesNotExist(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() + */ + public function assertDirectoryExists(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() + */ + public function assertDirectoryIsNotReadable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() + */ + public function assertDirectoryIsNotWritable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is readable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() + */ + public function assertDirectoryIsReadable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() + */ + public function assertDirectoryIsWritable(string $directory, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() + */ + public function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param mixed $actual + * + * @phpstan-assert empty $actual + * @see \Codeception\Module\AbstractAsserts::assertEmpty() + */ + public function assertEmpty($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEquals() + */ + public function assertEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (canonicalizing). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() + */ + public function assertEqualsCanonicalizing($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (ignoring case). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() + */ + public function assertEqualsIgnoringCase($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (with delta). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() + */ + public function assertEqualsWithDelta($expected, $actual, float $delta, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is false. + * + * @param mixed $condition + * + * @phpstan-assert false $condition + * @see \Codeception\Module\AbstractAsserts::assertFalse() + */ + public function assertFalse($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() + */ + public function assertFileDoesNotExist(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file. + * @see \Codeception\Module\AbstractAsserts::assertFileEquals() + */ + public function assertFileEquals(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() + */ + public function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() + */ + public function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists. + * @see \Codeception\Module\AbstractAsserts::assertFileExists() + */ + public function assertFileExists(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() + */ + public function assertFileIsNotReadable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() + */ + public function assertFileIsNotWritable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is readable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() + */ + public function assertFileIsReadable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() + */ + public function assertFileIsWritable(string $file, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file. + * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() + */ + public function assertFileNotEquals(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() + */ + public function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() + */ + public function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is finite. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertFinite() + */ + public function assertFinite($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() + */ + public function assertGreaterThan($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() + */ + public function assertGreaterThanOrEqual($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is infinite. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertInfinite() + */ + public function assertInfinite($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of a given type. + * + * @template ExpectedType of object + * + * @param mixed $actual + * @param class-string $expected + * + * @phpstan-assert =ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() + */ + public function assertInstanceOf(string $expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type array. + * + * @param mixed $actual + * + * @phpstan-assert array $actual + * @see \Codeception\Module\AbstractAsserts::assertIsArray() + */ + public function assertIsArray($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type bool. + * + * @param mixed $actual + * + * @phpstan-assert bool $actual + * @see \Codeception\Module\AbstractAsserts::assertIsBool() + */ + public function assertIsBool($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type callable. + * + * @param mixed $actual + * + * @phpstan-assert callable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsCallable() + */ + public function assertIsCallable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource and is closed. + * + * @param mixed $actual + * + * @phpstan-assert resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() + */ + public function assertIsClosedResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type float. + * + * @param mixed $actual + * + * @phpstan-assert float $actual + * @see \Codeception\Module\AbstractAsserts::assertIsFloat() + */ + public function assertIsFloat($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type int. + * + * @param mixed $actual + * + * @phpstan-assert int $actual + * @see \Codeception\Module\AbstractAsserts::assertIsInt() + */ + public function assertIsInt($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type iterable. + * + * @param mixed $actual + * + * @phpstan-assert iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsIterable() + */ + public function assertIsIterable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type array. + * + * @param mixed $actual + * + * @phpstan-assert !array $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() + */ + public function assertIsNotArray($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type bool. + * + * @param mixed $actual + * + * @phpstan-assert !bool $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() + */ + public function assertIsNotBool($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type callable. + * + * @param mixed $actual + * + * @phpstan-assert !callable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() + */ + public function assertIsNotCallable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param mixed $actual + * + * @phpstan-assert !resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() + */ + public function assertIsNotClosedResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type float. + * + * @param mixed $actual + * + * @phpstan-assert !float $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() + */ + public function assertIsNotFloat($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type int. + * + * @param mixed $actual + * + * @phpstan-assert !int $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() + */ + public function assertIsNotInt($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type iterable. + * + * @param mixed $actual + * + * @phpstan-assert !iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() + */ + public function assertIsNotIterable($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type numeric. + * + * @param mixed $actual + * + * @phpstan-assert !numeric $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() + */ + public function assertIsNotNumeric($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type object. + * + * @param mixed $actual + * + * @phpstan-assert !object $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() + */ + public function assertIsNotObject($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not readable. + * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() + */ + public function assertIsNotReadable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param mixed $actual + * + * @phpstan-assert !resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() + */ + public function assertIsNotResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type scalar. + * + * @param mixed $actual + * + * @psalm-assert !scalar $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() + */ + public function assertIsNotScalar($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type string. + * + * @param mixed $actual + * + * @phpstan-assert !string $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNotString() + */ + public function assertIsNotString($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not writable. + * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() + */ + public function assertIsNotWritable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type numeric. + * + * @param mixed $actual + * + * @phpstan-assert numeric $actual + * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() + */ + public function assertIsNumeric($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type object. + * + * @param mixed $actual + * + * @phpstan-assert object $actual + * @see \Codeception\Module\AbstractAsserts::assertIsObject() + */ + public function assertIsObject($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir is readable. + * @see \Codeception\Module\AbstractAsserts::assertIsReadable() + */ + public function assertIsReadable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource. + * + * @param mixed $actual + * + * @phpstan-assert resource $actual + * @see \Codeception\Module\AbstractAsserts::assertIsResource() + */ + public function assertIsResource($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type scalar. + * + * @param mixed $actual + * + * @phpstan-assert scalar $actual + * @see \Codeception\Module\AbstractAsserts::assertIsScalar() + */ + public function assertIsScalar($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type string. + * + * @param mixed $actual + * + * @phpstan-assert string $actual + * @see \Codeception\Module\AbstractAsserts::assertIsString() + */ + public function assertIsString($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is writable. + * @see \Codeception\Module\AbstractAsserts::assertIsWritable() + */ + public function assertIsWritable(string $filename, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string is a valid JSON string. + * @see \Codeception\Module\AbstractAsserts::assertJson() + */ + public function assertJson(string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() + */ + public function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() + */ + public function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() + */ + public function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() + */ + public function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() + */ + public function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are not equal. + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() + */ + public function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessThan() + */ + public function assertLessThan($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() + */ + public function assertLessThanOrEqual($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() + */ + public function assertMatchesRegularExpression(string $pattern, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is nan. + * + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNan() + */ + public function assertNan($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain a needle. + * + * @param mixed $needle + * @see \Codeception\Module\AbstractAsserts::assertNotContains() + */ + public function assertNotContains($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() + */ + public function assertNotContainsEquals($needle, iterable $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain only values of a given type. + * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() + */ + public function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param \Countable|iterable $haystack + * @see \Codeception\Module\AbstractAsserts::assertNotCount() + */ + public function assertNotCount(int $expectedCount, $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not empty. + * + * @param mixed $actual + * + * @phpstan-assert !empty $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() + */ + public function assertNotEmpty($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEquals() + */ + public function assertNotEquals($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (canonicalizing). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() + */ + public function assertNotEqualsCanonicalizing($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (ignoring case). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() + */ + public function assertNotEqualsIgnoringCase($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (with delta). + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() + */ + public function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not false. + * + * @param mixed $condition + * + * @phpstan-assert !false $condition + * @see \Codeception\Module\AbstractAsserts::assertNotFalse() + */ + public function assertNotFalse($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of a given type. + * + * @template ExpectedType of object + * + * @param mixed $actual + * @param class-string $expected + * + * @phpstan-assert !ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() + */ + public function assertNotInstanceOf(string $expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not null. + * + * @param mixed $actual + * + * @phpstan-assert !null $actual + * @see \Codeception\Module\AbstractAsserts::assertNotNull() + */ + public function assertNotNull($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables do not have the same type and value. + * + * @param mixed $expected + * @param mixed $actual + * @see \Codeception\Module\AbstractAsserts::assertNotSame() + */ + public function assertNotSame($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() + */ + public function assertNotSameSize($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not true. + * + * @param mixed $condition + * + * @phpstan-assert !true $condition + * @see \Codeception\Module\AbstractAsserts::assertNotTrue() + */ + public function assertNotTrue($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is null. + * + * @param mixed $actual + * + * @phpstan-assert null $actual + * @see \Codeception\Module\AbstractAsserts::assertNull() + */ + public function assertNull($actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object has a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() + */ + public function assertObjectHasAttribute(string $attributeName, object $object, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object does not have a specified attribute. + * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() + */ + public function assertObjectNotHasAttribute(string $attributeName, object $object, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables have the same type and value. + * Used on objects, it asserts that two variables reference + * the same object. + * + * @template ExpectedType + * + * @param ExpectedType $expected + * @param mixed $actual + * + * @phpstan-assert =ExpectedType $actual + * @see \Codeception\Module\AbstractAsserts::assertSame() + */ + public function assertSame($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. + * + * @param \Countable|iterable $expected + * @param \Countable|iterable $actual + * @see \Codeception\Module\AbstractAsserts::assertSameSize() + */ + public function assertSameSize($expected, $actual, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() + */ + public function assertStringContainsString(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() + */ + public function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends not with a given suffix. + * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() + */ + public function assertStringEndsNotWith(string $suffix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends with a given suffix. + * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() + */ + public function assertStringEndsWith(string $suffix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file. + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() + */ + public function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() + */ + public function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() + */ + public function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() + */ + public function assertStringMatchesFormat(string $format, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format file. + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() + */ + public function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() + */ + public function assertStringNotContainsString(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() + */ + public function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file. + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() + */ + public function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() + */ + public function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() + */ + public function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() + */ + public function assertStringNotMatchesFormat(string $format, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() + */ + public function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts not with a given prefix. + * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() + */ + public function assertStringStartsNotWith(string $prefix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts with a given prefix. + * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() + */ + public function assertStringStartsWith(string $prefix, string $string, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param mixed $value + * @see \Codeception\Module\AbstractAsserts::assertThat() + */ + public function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is true. + * + * @param mixed $condition + * + * @phpstan-assert true $condition + * @see \Codeception\Module\AbstractAsserts::assertTrue() + */ + public function assertTrue($condition, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() + */ + public function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are not equal. + * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() + */ + public function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() + */ + public function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() + */ + public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() + */ + public function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param \DOMDocument|string $expectedXml + * @param \DOMDocument|string $actualXml + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() + */ + public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fails a test with the given message. + * @see \Codeception\Module\AbstractAsserts::fail() + */ + public function fail(string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as incomplete. + * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() + */ + public function markTestIncomplete(string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as skipped. + * @see \Codeception\Module\AbstractAsserts::markTestSkipped() + */ + public function markTestSkipped(string $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); + } +} diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml index 7802f80..142b431 100644 --- a/tests/functional.suite.yml +++ b/tests/functional.suite.yml @@ -3,6 +3,6 @@ modules: enabled: - Yii2: part: [orm, fixtures] - configFile: 'FunctionalConfig.php' + configFile: 'tests/FunctionalConfig.php' - Asserts - \tests\_support\Helper\Functional diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml index 76067f8..c612eea 100644 --- a/tests/unit.suite.yml +++ b/tests/unit.suite.yml @@ -3,4 +3,4 @@ modules: enabled: - Asserts - \tests\_support\Helper\Unit -bootstrap: UnitBootstrap.php +bootstrap: ../UnitBootstrap.php diff --git a/tests/unit/models/LoginFormTest.php b/tests/unit/models/LoginFormTest.php new file mode 100644 index 0000000..5af4e9a --- /dev/null +++ b/tests/unit/models/LoginFormTest.php @@ -0,0 +1,64 @@ +form = new LoginForm(); + } + + public function testLoginAndPasswordAreRequired(): void + { + $rules = $this->form->rules(); + + $requiredRule = null; + foreach ($rules as $rule) { + if ($rule[1] === 'required') { + $requiredRule = $rule[0]; + break; + } + } + + $this->assertNotNull($requiredRule); + $this->assertContains('login', $requiredRule); + $this->assertContains('password', $requiredRule); + } + + public function testRememberMeIsBoolean(): void + { + $rules = $this->form->rules(); + + $hasBooleanRule = false; + foreach ($rules as $rule) { + if ($rule[1] === 'boolean' && in_array('rememberMe', (array) $rule[0])) { + $hasBooleanRule = true; + break; + } + } + + $this->assertTrue($hasBooleanRule); + } + + public function testRulesArrayStructure(): void + { + $rules = $this->form->rules(); + + $this->assertIsArray($rules); + $this->assertNotEmpty($rules); + + foreach ($rules as $rule) { + $this->assertIsArray($rule); + $this->assertArrayHasKey(0, $rule); + $this->assertArrayHasKey(1, $rule); + } + } +} diff --git a/tests/unit/models/ProfileTest.php b/tests/unit/models/ProfileTest.php new file mode 100644 index 0000000..39d1cd1 --- /dev/null +++ b/tests/unit/models/ProfileTest.php @@ -0,0 +1,62 @@ +profile = new Profile(); + } + + public function testGravatarUrlGeneratesCorrectHash(): void + { + $url = $this->profile->getGravatarUrl('test@example.com'); + $expected = 'https://www.gravatar.com/avatar/' . md5('test@example.com') . '?s=200&d=identicon'; + $this->assertEquals($expected, $url); + } + + public function testGravatarUrlHandlesCaseAndWhitespace(): void + { + $url1 = $this->profile->getGravatarUrl(' Test@Example.COM '); + $url2 = $this->profile->getGravatarUrl('test@example.com'); + $this->assertEquals($url1, $url2); + } + + public function testGravatarUrlRespectsCustomSize(): void + { + $url = $this->profile->getGravatarUrl('test@example.com', 80); + $this->assertStringContainsString('s=80', $url); + } + + public function testTimezoneListIsNotEmpty(): void + { + $list = Profile::getTimezoneList(); + $this->assertNotEmpty($list); + } + + public function testTimezoneListKeysAreValidIdentifiers(): void + { + $list = Profile::getTimezoneList(); + $validIdentifiers = \DateTimeZone::listIdentifiers(); + + foreach (array_keys($list) as $key) { + $this->assertContains($key, $validIdentifiers); + } + } + + public function testTimezoneListValuesReplaceUnderscores(): void + { + $list = Profile::getTimezoneList(); + + $this->assertEquals('America/New York', $list['America/New_York']); + $this->assertEquals('Europe/London', $list['Europe/London']); + } +} diff --git a/tests/unit/models/SessionTest.php b/tests/unit/models/SessionTest.php new file mode 100644 index 0000000..7c933f5 --- /dev/null +++ b/tests/unit/models/SessionTest.php @@ -0,0 +1,68 @@ +assertEquals('Unknown Device', $result); + } + + public function testWindowsChrome(): void + { + $ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'; + $this->assertEquals('Chrome on Windows', Session::parseDeviceName($ua)); + } + + public function testMacOsSafari(): void + { + $ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15'; + $this->assertEquals('Safari on macOS', Session::parseDeviceName($ua)); + } + + public function testLinuxFirefox(): void + { + $ua = 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0'; + $this->assertEquals('Firefox on Linux', Session::parseDeviceName($ua)); + } + + public function testAndroidChromeDetectedAsLinux(): void + { + // Android UAs contain "linux" which is checked before "android" in parseDeviceName + $ua = 'Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36'; + $this->assertEquals('Chrome on Linux', Session::parseDeviceName($ua)); + } + + public function testIosSafariDetectedAsMacOs(): void + { + // iPhone UAs contain "mac os" (in "like Mac OS X") which is checked before "iphone" + $ua = 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1'; + $this->assertEquals('Safari on macOS', Session::parseDeviceName($ua)); + } + + public function testEdgeTakesPriorityOverChrome(): void + { + $ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0'; + $this->assertEquals('Edge on Windows', Session::parseDeviceName($ua)); + } + + public function testOperaDetectedAsChrome(): void + { + // Opera UAs contain "chrome" which is checked before "opr/" in parseDeviceName + $ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0'; + $this->assertEquals('Chrome on Windows', Session::parseDeviceName($ua)); + } + + public function testUnknownBrowserAndOs(): void + { + $ua = 'SomeCustomBot/1.0'; + $this->assertEquals('Unknown Browser on Unknown OS', Session::parseDeviceName($ua)); + } +} diff --git a/tests/unit/models/TokenTest.php b/tests/unit/models/TokenTest.php new file mode 100644 index 0000000..1838d87 --- /dev/null +++ b/tests/unit/models/TokenTest.php @@ -0,0 +1,90 @@ +assertEquals('confirmation', Token::TYPE_CONFIRMATION); + $this->assertEquals('recovery', Token::TYPE_RECOVERY); + $this->assertEquals('email_change', Token::TYPE_EMAIL_CHANGE); + } + + public function testIsExpiredReturnsTrueForPastDate(): void + { + $token = new Token(); + $token->expires_at = date('Y-m-d H:i:s', time() - 3600); + + $this->assertTrue($token->getIsExpired()); + } + + public function testIsExpiredReturnsFalseForFutureDate(): void + { + $token = new Token(); + $token->expires_at = date('Y-m-d H:i:s', time() + 3600); + + $this->assertFalse($token->getIsExpired()); + } + + public function testValidationRulesContainRequiredFields(): void + { + $token = new Token(); + $rules = $token->rules(); + + $requiredRule = null; + foreach ($rules as $rule) { + if ($rule[1] === 'required') { + $requiredRule = $rule[0]; + break; + } + } + + $this->assertNotNull($requiredRule); + $this->assertContains('user_id', $requiredRule); + $this->assertContains('type', $requiredRule); + $this->assertContains('token', $requiredRule); + $this->assertContains('expires_at', $requiredRule); + } + + public function testValidationRulesContainTypeRange(): void + { + $token = new Token(); + $rules = $token->rules(); + + $inRule = null; + foreach ($rules as $rule) { + if ($rule[1] === 'in' && in_array('type', (array) $rule[0])) { + $inRule = $rule; + break; + } + } + + $this->assertNotNull($inRule); + $this->assertContains(Token::TYPE_CONFIRMATION, $inRule['range']); + $this->assertContains(Token::TYPE_RECOVERY, $inRule['range']); + $this->assertContains(Token::TYPE_EMAIL_CHANGE, $inRule['range']); + } + + public function testValidationRulesContainTokenMaxLength(): void + { + $token = new Token(); + $rules = $token->rules(); + + $stringRule = null; + foreach ($rules as $rule) { + if ($rule[1] === 'string' && in_array('token', (array) $rule[0]) && isset($rule['max'])) { + $stringRule = $rule; + break; + } + } + + $this->assertNotNull($stringRule); + $this->assertEquals(64, $stringRule['max']); + } +} diff --git a/tests/unit/models/UserTest.php b/tests/unit/models/UserTest.php new file mode 100644 index 0000000..f1f66f7 --- /dev/null +++ b/tests/unit/models/UserTest.php @@ -0,0 +1,108 @@ +assertEquals('pending', User::STATUS_PENDING); + $this->assertEquals('active', User::STATUS_ACTIVE); + $this->assertEquals('blocked', User::STATUS_BLOCKED); + } + + public function testIsBlockedReturnsTrueWhenStatusBlocked(): void + { + $user = new User(); + $user->status = User::STATUS_BLOCKED; + + $this->assertTrue($user->getIsBlocked()); + } + + public function testIsBlockedReturnsTrueWhenBlockedAtIsSet(): void + { + $user = new User(); + $user->status = User::STATUS_ACTIVE; + $user->blocked_at = '2025-01-01 00:00:00'; + + $this->assertTrue($user->getIsBlocked()); + } + + public function testIsBlockedReturnsFalseForActiveUser(): void + { + $user = new User(); + $user->status = User::STATUS_ACTIVE; + $user->blocked_at = null; + + $this->assertFalse($user->getIsBlocked()); + } + + public function testIsConfirmedReturnsTrueWhenEmailConfirmed(): void + { + $user = new User(); + $user->email_confirmed_at = '2025-01-01 00:00:00'; + + $this->assertTrue($user->getIsConfirmed()); + } + + public function testIsConfirmedReturnsFalseWhenEmailNotConfirmed(): void + { + $user = new User(); + $user->email_confirmed_at = null; + + $this->assertFalse($user->getIsConfirmed()); + } + + public function testValidationRulesRequireEmail(): void + { + $user = new User(); + $rules = $user->rules(); + + $hasEmailRequired = false; + foreach ($rules as $rule) { + if ($rule[1] === 'required' && in_array('email', (array) $rule[0])) { + $hasEmailRequired = true; + break; + } + } + + $this->assertTrue($hasEmailRequired); + } + + public function testValidationRulesContainEmailFormat(): void + { + $user = new User(); + $rules = $user->rules(); + + $hasEmailValidator = false; + foreach ($rules as $rule) { + if ($rule[1] === 'email' && in_array('email', (array) $rule[0])) { + $hasEmailValidator = true; + break; + } + } + + $this->assertTrue($hasEmailValidator); + } + + public function testValidationRulesContainUsernamePattern(): void + { + $user = new User(); + $rules = $user->rules(); + + $hasPattern = false; + foreach ($rules as $rule) { + if ($rule[1] === 'match' && in_array('username', (array) $rule[0])) { + $hasPattern = true; + break; + } + } + + $this->assertTrue($hasPattern); + } +} diff --git a/tests/unit/services/GdprServiceTest.php b/tests/unit/services/GdprServiceTest.php new file mode 100644 index 0000000..ce31c0b --- /dev/null +++ b/tests/unit/services/GdprServiceTest.php @@ -0,0 +1,134 @@ +module = new Module('user'); + $this->service = new GdprService($this->module); + } + + public function testHasValidConsentReturnsTrueWhenGdprDisabled(): void + { + $this->module->enableGdprConsent = false; + $user = new User(); + + $this->assertTrue($this->service->hasValidConsent($user)); + } + + public function testHasValidConsentReturnsFalseWhenConsentAtNull(): void + { + $this->module->enableGdprConsent = true; + $user = new User(); + $user->gdpr_consent_at = null; + + $this->assertFalse($this->service->hasValidConsent($user)); + } + + public function testHasValidConsentReturnsTrueWhenVersionMatches(): void + { + $this->module->enableGdprConsent = true; + $this->module->gdprConsentVersion = '2.0'; + $user = new User(); + $user->gdpr_consent_at = '2025-01-01 00:00:00'; + $user->gdpr_consent_version = '2.0'; + + $this->assertTrue($this->service->hasValidConsent($user)); + } + + public function testHasValidConsentReturnsFalseWhenVersionMismatches(): void + { + $this->module->enableGdprConsent = true; + $this->module->gdprConsentVersion = '2.0'; + $user = new User(); + $user->gdpr_consent_at = '2025-01-01 00:00:00'; + $user->gdpr_consent_version = '1.0'; + + $this->assertFalse($this->service->hasValidConsent($user)); + } + + public function testHasValidConsentReturnsTrueWhenNoVersionConfigured(): void + { + $this->module->enableGdprConsent = true; + $this->module->gdprConsentVersion = null; + $user = new User(); + $user->gdpr_consent_at = '2025-01-01 00:00:00'; + + $this->assertTrue($this->service->hasValidConsent($user)); + } + + public function testNeedsConsentUpdateReturnsFalseWhenDisabled(): void + { + $this->module->enableGdprConsent = false; + $user = new User(); + + $this->assertFalse($this->service->needsConsentUpdate($user)); + } + + public function testNeedsConsentUpdateReturnsTrueWhenConsentInvalid(): void + { + $this->module->enableGdprConsent = true; + $this->module->gdprConsentVersion = '2.0'; + $user = new User(); + $user->gdpr_consent_at = '2025-01-01 00:00:00'; + $user->gdpr_consent_version = '1.0'; + + $this->assertTrue($this->service->needsConsentUpdate($user)); + } + + public function testIsRouteExemptForBuiltInRoutes(): void + { + $this->assertTrue($this->service->isRouteExempt('user/security/login')); + $this->assertTrue($this->service->isRouteExempt('user/security/logout')); + $this->assertTrue($this->service->isRouteExempt('user/gdpr/consent')); + $this->assertTrue($this->service->isRouteExempt('user/gdpr/index')); + $this->assertTrue($this->service->isRouteExempt('user/gdpr/export')); + $this->assertTrue($this->service->isRouteExempt('user/gdpr/delete')); + } + + public function testIsRouteExemptForCustomRoutes(): void + { + $this->module->gdprExemptRoutes = ['site/privacy', 'site/terms']; + + $this->assertTrue($this->service->isRouteExempt('site/privacy')); + $this->assertTrue($this->service->isRouteExempt('site/terms')); + } + + public function testIsRouteExemptWildcardMatching(): void + { + $this->module->gdprExemptRoutes = ['api/*']; + + $this->assertTrue($this->service->isRouteExempt('api/users')); + $this->assertTrue($this->service->isRouteExempt('api/products')); + } + + public function testIsRouteExemptReturnsFalseForNonExemptRoute(): void + { + $this->module->gdprExemptRoutes = []; + + $this->assertFalse($this->service->isRouteExempt('site/index')); + $this->assertFalse($this->service->isRouteExempt('user/settings/account')); + } + + public function testHasMarketingConsentChecksField(): void + { + $user = new User(); + $user->gdpr_marketing_consent_at = null; + $this->assertFalse($this->service->hasMarketingConsent($user)); + + $user->gdpr_marketing_consent_at = '2025-01-01 00:00:00'; + $this->assertTrue($this->service->hasMarketingConsent($user)); + } +}