| Total Complexity | 281 |
| Total Lines | 4583 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Complex classes like AcceptanceTesterActions often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use AcceptanceTesterActions, and based on these observations, apply Extract Interface, too.
| 1 | <?php //[STAMP] 897548b0570888d252ba7d45ce6add9b |
||
| 8 | trait AcceptanceTesterActions |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @return \Codeception\Scenario |
||
| 12 | */ |
||
| 13 | abstract protected function getScenario(); |
||
| 14 | |||
| 15 | |||
| 16 | /** |
||
| 17 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 18 | * |
||
| 19 | * Enters a directory In local filesystem. |
||
| 20 | * Project root directory is used by default |
||
| 21 | * @see \Codeception\Module\Filesystem::amInPath() |
||
| 22 | */ |
||
| 23 | public function amInPath(string $path): void { |
||
| 24 | $this->getScenario()->runStep(new \Codeception\Step\Condition('amInPath', func_get_args())); |
||
| 25 | } |
||
| 26 | |||
| 27 | |||
| 28 | /** |
||
| 29 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 30 | * |
||
| 31 | * Opens a file and stores it's content. |
||
| 32 | * |
||
| 33 | * Usage: |
||
| 34 | * |
||
| 35 | * ``` php |
||
| 36 | * <?php |
||
| 37 | * $I->openFile('composer.json'); |
||
| 38 | * $I->seeInThisFile('codeception/codeception'); |
||
| 39 | * ``` |
||
| 40 | * @see \Codeception\Module\Filesystem::openFile() |
||
| 41 | */ |
||
| 42 | public function openFile(string $filename): void { |
||
| 43 | $this->getScenario()->runStep(new \Codeception\Step\Action('openFile', func_get_args())); |
||
| 44 | } |
||
| 45 | |||
| 46 | |||
| 47 | /** |
||
| 48 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 49 | * |
||
| 50 | * Deletes a file |
||
| 51 | * |
||
| 52 | * ``` php |
||
| 53 | * <?php |
||
| 54 | * $I->deleteFile('composer.lock'); |
||
| 55 | * ``` |
||
| 56 | * @see \Codeception\Module\Filesystem::deleteFile() |
||
| 57 | */ |
||
| 58 | public function deleteFile(string $filename): void { |
||
| 59 | $this->getScenario()->runStep(new \Codeception\Step\Action('deleteFile', func_get_args())); |
||
| 60 | } |
||
| 61 | |||
| 62 | |||
| 63 | /** |
||
| 64 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 65 | * |
||
| 66 | * Deletes directory with all subdirectories |
||
| 67 | * |
||
| 68 | * ``` php |
||
| 69 | * <?php |
||
| 70 | * $I->deleteDir('vendor'); |
||
| 71 | * ``` |
||
| 72 | * @see \Codeception\Module\Filesystem::deleteDir() |
||
| 73 | */ |
||
| 74 | public function deleteDir(string $dirname): void { |
||
| 75 | $this->getScenario()->runStep(new \Codeception\Step\Action('deleteDir', func_get_args())); |
||
| 76 | } |
||
| 77 | |||
| 78 | |||
| 79 | /** |
||
| 80 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 81 | * |
||
| 82 | * Copies directory with all contents |
||
| 83 | * |
||
| 84 | * ``` php |
||
| 85 | * <?php |
||
| 86 | * $I->copyDir('vendor','old_vendor'); |
||
| 87 | * ``` |
||
| 88 | * @see \Codeception\Module\Filesystem::copyDir() |
||
| 89 | */ |
||
| 90 | public function copyDir(string $src, string $dst): void { |
||
| 91 | $this->getScenario()->runStep(new \Codeception\Step\Action('copyDir', func_get_args())); |
||
| 92 | } |
||
| 93 | |||
| 94 | |||
| 95 | /** |
||
| 96 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 97 | * |
||
| 98 | * Checks If opened file has `text` in it. |
||
| 99 | * |
||
| 100 | * Usage: |
||
| 101 | * |
||
| 102 | * ``` php |
||
| 103 | * <?php |
||
| 104 | * $I->openFile('composer.json'); |
||
| 105 | * $I->seeInThisFile('codeception/codeception'); |
||
| 106 | * ``` |
||
| 107 | * @see \Codeception\Module\Filesystem::seeInThisFile() |
||
| 108 | */ |
||
| 109 | public function seeInThisFile(string $text): void { |
||
| 110 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args())); |
||
| 111 | } |
||
| 112 | /** |
||
| 113 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 114 | * |
||
| 115 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 116 | * Checks If opened file has `text` in it. |
||
| 117 | * |
||
| 118 | * Usage: |
||
| 119 | * |
||
| 120 | * ``` php |
||
| 121 | * <?php |
||
| 122 | * $I->openFile('composer.json'); |
||
| 123 | * $I->seeInThisFile('codeception/codeception'); |
||
| 124 | * ``` |
||
| 125 | * @see \Codeception\Module\Filesystem::seeInThisFile() |
||
| 126 | */ |
||
| 127 | public function canSeeInThisFile(string $text): void { |
||
| 128 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args())); |
||
| 129 | } |
||
| 130 | |||
| 131 | |||
| 132 | /** |
||
| 133 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 134 | * |
||
| 135 | * Checks If opened file has the `number` of new lines. |
||
| 136 | * |
||
| 137 | * Usage: |
||
| 138 | * |
||
| 139 | * ``` php |
||
| 140 | * <?php |
||
| 141 | * $I->openFile('composer.json'); |
||
| 142 | * $I->seeNumberNewLines(5); |
||
| 143 | * ``` |
||
| 144 | * |
||
| 145 | * @param int $number New lines |
||
| 146 | * @see \Codeception\Module\Filesystem::seeNumberNewLines() |
||
| 147 | */ |
||
| 148 | public function seeNumberNewLines(int $number): void { |
||
| 149 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args())); |
||
| 150 | } |
||
| 151 | /** |
||
| 152 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 153 | * |
||
| 154 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 155 | * Checks If opened file has the `number` of new lines. |
||
| 156 | * |
||
| 157 | * Usage: |
||
| 158 | * |
||
| 159 | * ``` php |
||
| 160 | * <?php |
||
| 161 | * $I->openFile('composer.json'); |
||
| 162 | * $I->seeNumberNewLines(5); |
||
| 163 | * ``` |
||
| 164 | * |
||
| 165 | * @param int $number New lines |
||
| 166 | * @see \Codeception\Module\Filesystem::seeNumberNewLines() |
||
| 167 | */ |
||
| 168 | public function canSeeNumberNewLines(int $number): void { |
||
| 169 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args())); |
||
| 170 | } |
||
| 171 | |||
| 172 | |||
| 173 | /** |
||
| 174 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 175 | * |
||
| 176 | * Checks that contents of currently opened file matches $regex |
||
| 177 | * @see \Codeception\Module\Filesystem::seeThisFileMatches() |
||
| 178 | */ |
||
| 179 | public function seeThisFileMatches(string $regex): void { |
||
| 180 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeThisFileMatches', func_get_args())); |
||
| 181 | } |
||
| 182 | /** |
||
| 183 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 184 | * |
||
| 185 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 186 | * Checks that contents of currently opened file matches $regex |
||
| 187 | * @see \Codeception\Module\Filesystem::seeThisFileMatches() |
||
| 188 | */ |
||
| 189 | public function canSeeThisFileMatches(string $regex): void { |
||
| 190 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeThisFileMatches', func_get_args())); |
||
| 191 | } |
||
| 192 | |||
| 193 | |||
| 194 | /** |
||
| 195 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 196 | * |
||
| 197 | * Checks the strict matching of file contents. |
||
| 198 | * Unlike `seeInThisFile` will fail if file has something more than expected lines. |
||
| 199 | * Better to use with HEREDOC strings. |
||
| 200 | * Matching is done after removing "\r" chars from file content. |
||
| 201 | * |
||
| 202 | * ``` php |
||
| 203 | * <?php |
||
| 204 | * $I->openFile('process.pid'); |
||
| 205 | * $I->seeFileContentsEqual('3192'); |
||
| 206 | * ``` |
||
| 207 | * @see \Codeception\Module\Filesystem::seeFileContentsEqual() |
||
| 208 | */ |
||
| 209 | public function seeFileContentsEqual(string $text): void { |
||
| 210 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args())); |
||
| 211 | } |
||
| 212 | /** |
||
| 213 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 214 | * |
||
| 215 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 216 | * Checks the strict matching of file contents. |
||
| 217 | * Unlike `seeInThisFile` will fail if file has something more than expected lines. |
||
| 218 | * Better to use with HEREDOC strings. |
||
| 219 | * Matching is done after removing "\r" chars from file content. |
||
| 220 | * |
||
| 221 | * ``` php |
||
| 222 | * <?php |
||
| 223 | * $I->openFile('process.pid'); |
||
| 224 | * $I->seeFileContentsEqual('3192'); |
||
| 225 | * ``` |
||
| 226 | * @see \Codeception\Module\Filesystem::seeFileContentsEqual() |
||
| 227 | */ |
||
| 228 | public function canSeeFileContentsEqual(string $text): void { |
||
| 229 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args())); |
||
| 230 | } |
||
| 231 | |||
| 232 | |||
| 233 | /** |
||
| 234 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 235 | * |
||
| 236 | * Checks If opened file doesn't contain `text` in it |
||
| 237 | * |
||
| 238 | * ``` php |
||
| 239 | * <?php |
||
| 240 | * $I->openFile('composer.json'); |
||
| 241 | * $I->dontSeeInThisFile('codeception/codeception'); |
||
| 242 | * ``` |
||
| 243 | * @see \Codeception\Module\Filesystem::dontSeeInThisFile() |
||
| 244 | */ |
||
| 245 | public function dontSeeInThisFile(string $text): void { |
||
| 246 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInThisFile', func_get_args())); |
||
| 247 | } |
||
| 248 | /** |
||
| 249 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 250 | * |
||
| 251 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 252 | * Checks If opened file doesn't contain `text` in it |
||
| 253 | * |
||
| 254 | * ``` php |
||
| 255 | * <?php |
||
| 256 | * $I->openFile('composer.json'); |
||
| 257 | * $I->dontSeeInThisFile('codeception/codeception'); |
||
| 258 | * ``` |
||
| 259 | * @see \Codeception\Module\Filesystem::dontSeeInThisFile() |
||
| 260 | */ |
||
| 261 | public function cantSeeInThisFile(string $text): void { |
||
| 262 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args())); |
||
| 263 | } |
||
| 264 | |||
| 265 | |||
| 266 | /** |
||
| 267 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 268 | * |
||
| 269 | * Deletes a file |
||
| 270 | * @see \Codeception\Module\Filesystem::deleteThisFile() |
||
| 271 | */ |
||
| 272 | public function deleteThisFile(): void { |
||
| 273 | $this->getScenario()->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args())); |
||
| 274 | } |
||
| 275 | |||
| 276 | |||
| 277 | /** |
||
| 278 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 279 | * |
||
| 280 | * Checks if file exists in path. |
||
| 281 | * Opens a file when it's exists |
||
| 282 | * |
||
| 283 | * ``` php |
||
| 284 | * <?php |
||
| 285 | * $I->seeFileFound('UserModel.php','app/models'); |
||
| 286 | * ``` |
||
| 287 | * @see \Codeception\Module\Filesystem::seeFileFound() |
||
| 288 | */ |
||
| 289 | public function seeFileFound(string $filename, string $path = ""): void { |
||
| 290 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args())); |
||
| 291 | } |
||
| 292 | /** |
||
| 293 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 294 | * |
||
| 295 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 296 | * Checks if file exists in path. |
||
| 297 | * Opens a file when it's exists |
||
| 298 | * |
||
| 299 | * ``` php |
||
| 300 | * <?php |
||
| 301 | * $I->seeFileFound('UserModel.php','app/models'); |
||
| 302 | * ``` |
||
| 303 | * @see \Codeception\Module\Filesystem::seeFileFound() |
||
| 304 | */ |
||
| 305 | public function canSeeFileFound(string $filename, string $path = ""): void { |
||
| 306 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args())); |
||
| 307 | } |
||
| 308 | |||
| 309 | |||
| 310 | /** |
||
| 311 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 312 | * |
||
| 313 | * Checks if file does not exist in path |
||
| 314 | * @see \Codeception\Module\Filesystem::dontSeeFileFound() |
||
| 315 | */ |
||
| 316 | public function dontSeeFileFound(string $filename, string $path = ""): void { |
||
| 317 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeFileFound', func_get_args())); |
||
| 318 | } |
||
| 319 | /** |
||
| 320 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 321 | * |
||
| 322 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 323 | * Checks if file does not exist in path |
||
| 324 | * @see \Codeception\Module\Filesystem::dontSeeFileFound() |
||
| 325 | */ |
||
| 326 | public function cantSeeFileFound(string $filename, string $path = ""): void { |
||
| 327 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args())); |
||
| 328 | } |
||
| 329 | |||
| 330 | |||
| 331 | /** |
||
| 332 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 333 | * |
||
| 334 | * Erases directory contents |
||
| 335 | * |
||
| 336 | * ``` php |
||
| 337 | * <?php |
||
| 338 | * $I->cleanDir('logs'); |
||
| 339 | * ``` |
||
| 340 | * @see \Codeception\Module\Filesystem::cleanDir() |
||
| 341 | */ |
||
| 342 | public function cleanDir(string $dirname): void { |
||
| 343 | $this->getScenario()->runStep(new \Codeception\Step\Action('cleanDir', func_get_args())); |
||
| 344 | } |
||
| 345 | |||
| 346 | |||
| 347 | /** |
||
| 348 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 349 | * |
||
| 350 | * Saves contents to file |
||
| 351 | * @see \Codeception\Module\Filesystem::writeToFile() |
||
| 352 | */ |
||
| 353 | public function writeToFile(string $filename, string $contents): void { |
||
| 354 | $this->getScenario()->runStep(new \Codeception\Step\Action('writeToFile', func_get_args())); |
||
| 355 | } |
||
| 356 | |||
| 357 | |||
| 358 | /** |
||
| 359 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 360 | * |
||
| 361 | * Authenticates a user on a site without submitting a login form. |
||
| 362 | * Use it for fast pragmatic authorization in functional tests. |
||
| 363 | * |
||
| 364 | * ```php |
||
| 365 | * <?php |
||
| 366 | * // User is found by id |
||
| 367 | * $I->amLoggedInAs(1); |
||
| 368 | * |
||
| 369 | * // User object is passed as parameter |
||
| 370 | * $admin = \app\models\User::findByUsername('admin'); |
||
| 371 | * $I->amLoggedInAs($admin); |
||
| 372 | * ``` |
||
| 373 | * Requires the `user` component to be enabled and configured. |
||
| 374 | * |
||
| 375 | * @param $user |
||
| 376 | * @throws \Codeception\Exception\ModuleException |
||
| 377 | * @see \Codeception\Module\Yii2::amLoggedInAs() |
||
| 378 | */ |
||
| 379 | public function amLoggedInAs($user) { |
||
| 380 | return $this->getScenario()->runStep(new \Codeception\Step\Condition('amLoggedInAs', func_get_args())); |
||
| 381 | } |
||
| 382 | |||
| 383 | |||
| 384 | /** |
||
| 385 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 386 | * |
||
| 387 | * Creates and loads fixtures from a config. |
||
| 388 | * The signature is the same as for the `fixtures()` method of `yii\test\FixtureTrait` |
||
| 389 | * |
||
| 390 | * ```php |
||
| 391 | * <?php |
||
| 392 | * $I->haveFixtures([ |
||
| 393 | * 'posts' => PostsFixture::class, |
||
| 394 | * 'user' => [ |
||
| 395 | * 'class' => UserFixture::class, |
||
| 396 | * 'dataFile' => '@tests/_data/models/user.php', |
||
| 397 | * ], |
||
| 398 | * ]); |
||
| 399 | * ``` |
||
| 400 | * |
||
| 401 | * Note: if you need to load fixtures before a test (probably before the |
||
| 402 | * cleanup transaction is started; `cleanup` option is `true` by default), |
||
| 403 | * you can specify the fixtures in the `_fixtures()` method of a test case |
||
| 404 | * |
||
| 405 | * ```php |
||
| 406 | * <?php |
||
| 407 | * // inside Cest file or Codeception\TestCase\Unit |
||
| 408 | * public function _fixtures(){ |
||
| 409 | * return [ |
||
| 410 | * 'user' => [ |
||
| 411 | * 'class' => UserFixture::class, |
||
| 412 | * 'dataFile' => codecept_data_dir() . 'user.php' |
||
| 413 | * ] |
||
| 414 | * ]; |
||
| 415 | * } |
||
| 416 | * ``` |
||
| 417 | * instead of calling `haveFixtures` in Cest `_before` |
||
| 418 | * |
||
| 419 | * @param $fixtures |
||
| 420 | * @part fixtures |
||
| 421 | * @see \Codeception\Module\Yii2::haveFixtures() |
||
| 422 | */ |
||
| 423 | public function haveFixtures($fixtures) { |
||
| 424 | return $this->getScenario()->runStep(new \Codeception\Step\Action('haveFixtures', func_get_args())); |
||
| 425 | } |
||
| 426 | |||
| 427 | |||
| 428 | /** |
||
| 429 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 430 | * |
||
| 431 | * Returns all loaded fixtures. |
||
| 432 | * Array of fixture instances |
||
| 433 | * |
||
| 434 | * @part fixtures |
||
| 435 | * @return array |
||
| 436 | * @see \Codeception\Module\Yii2::grabFixtures() |
||
| 437 | */ |
||
| 438 | public function grabFixtures() { |
||
| 439 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFixtures', func_get_args())); |
||
| 440 | } |
||
| 441 | |||
| 442 | |||
| 443 | /** |
||
| 444 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 445 | * |
||
| 446 | * Gets a fixture by name. |
||
| 447 | * Returns a Fixture instance. If a fixture is an instance of |
||
| 448 | * `\yii\test\BaseActiveFixture` a second parameter can be used to return a |
||
| 449 | * specific model: |
||
| 450 | * |
||
| 451 | * ```php |
||
| 452 | * <?php |
||
| 453 | * $I->haveFixtures(['users' => UserFixture::class]); |
||
| 454 | * |
||
| 455 | * $users = $I->grabFixture('users'); |
||
| 456 | * |
||
| 457 | * // get first user by key, if a fixture is an instance of ActiveFixture |
||
| 458 | * $user = $I->grabFixture('users', 'user1'); |
||
| 459 | * ``` |
||
| 460 | * |
||
| 461 | * @param $name |
||
| 462 | * @return mixed |
||
| 463 | * @throws \Codeception\Exception\ModuleException if the fixture is not found |
||
| 464 | * @part fixtures |
||
| 465 | * @see \Codeception\Module\Yii2::grabFixture() |
||
| 466 | */ |
||
| 467 | public function grabFixture($name, $index = NULL) { |
||
| 468 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFixture', func_get_args())); |
||
| 469 | } |
||
| 470 | |||
| 471 | |||
| 472 | /** |
||
| 473 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 474 | * |
||
| 475 | * Inserts a record into the database. |
||
| 476 | * |
||
| 477 | * ``` php |
||
| 478 | * <?php |
||
| 479 | * $user_id = $I->haveRecord('app\models\User', array('name' => 'Davert')); |
||
| 480 | * ?> |
||
| 481 | * ``` |
||
| 482 | * |
||
| 483 | * @param $model |
||
| 484 | * @param array $attributes |
||
| 485 | * @return mixed |
||
| 486 | * @part orm |
||
| 487 | * @see \Codeception\Module\Yii2::haveRecord() |
||
| 488 | */ |
||
| 489 | public function haveRecord($model, $attributes = []) { |
||
| 490 | return $this->getScenario()->runStep(new \Codeception\Step\Action('haveRecord', func_get_args())); |
||
| 491 | } |
||
| 492 | |||
| 493 | |||
| 494 | /** |
||
| 495 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 496 | * |
||
| 497 | * Checks that a record exists in the database. |
||
| 498 | * |
||
| 499 | * ``` php |
||
| 500 | * $I->seeRecord('app\models\User', array('name' => 'davert')); |
||
| 501 | * ``` |
||
| 502 | * |
||
| 503 | * @param $model |
||
| 504 | * @param array $attributes |
||
| 505 | * @part orm |
||
| 506 | * @see \Codeception\Module\Yii2::seeRecord() |
||
| 507 | */ |
||
| 508 | public function seeRecord(string $model, array $attributes = []): void { |
||
| 509 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args())); |
||
| 510 | } |
||
| 511 | /** |
||
| 512 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 513 | * |
||
| 514 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 515 | * Checks that a record exists in the database. |
||
| 516 | * |
||
| 517 | * ``` php |
||
| 518 | * $I->seeRecord('app\models\User', array('name' => 'davert')); |
||
| 519 | * ``` |
||
| 520 | * |
||
| 521 | * @param $model |
||
| 522 | * @param array $attributes |
||
| 523 | * @part orm |
||
| 524 | * @see \Codeception\Module\Yii2::seeRecord() |
||
| 525 | */ |
||
| 526 | public function canSeeRecord(string $model, array $attributes = []): void { |
||
| 527 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args())); |
||
| 528 | } |
||
| 529 | |||
| 530 | |||
| 531 | /** |
||
| 532 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 533 | * |
||
| 534 | * Checks that a record does not exist in the database. |
||
| 535 | * |
||
| 536 | * ``` php |
||
| 537 | * $I->dontSeeRecord('app\models\User', array('name' => 'davert')); |
||
| 538 | * ``` |
||
| 539 | * |
||
| 540 | * @param $model |
||
| 541 | * @param array $attributes |
||
| 542 | * @part orm |
||
| 543 | * @see \Codeception\Module\Yii2::dontSeeRecord() |
||
| 544 | */ |
||
| 545 | public function dontSeeRecord(string $model, array $attributes = []): void { |
||
| 546 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeRecord', func_get_args())); |
||
| 547 | } |
||
| 548 | /** |
||
| 549 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 550 | * |
||
| 551 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 552 | * Checks that a record does not exist in the database. |
||
| 553 | * |
||
| 554 | * ``` php |
||
| 555 | * $I->dontSeeRecord('app\models\User', array('name' => 'davert')); |
||
| 556 | * ``` |
||
| 557 | * |
||
| 558 | * @param $model |
||
| 559 | * @param array $attributes |
||
| 560 | * @part orm |
||
| 561 | * @see \Codeception\Module\Yii2::dontSeeRecord() |
||
| 562 | */ |
||
| 563 | public function cantSeeRecord(string $model, array $attributes = []): void { |
||
| 564 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args())); |
||
| 565 | } |
||
| 566 | |||
| 567 | |||
| 568 | /** |
||
| 569 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 570 | * |
||
| 571 | * Retrieves a record from the database |
||
| 572 | * |
||
| 573 | * ``` php |
||
| 574 | * $category = $I->grabRecord('app\models\User', array('name' => 'davert')); |
||
| 575 | * ``` |
||
| 576 | * |
||
| 577 | * @param $model |
||
| 578 | * @param array $attributes |
||
| 579 | * @return mixed |
||
| 580 | * @part orm |
||
| 581 | * @see \Codeception\Module\Yii2::grabRecord() |
||
| 582 | */ |
||
| 583 | public function grabRecord(string $model, array $attributes = []): mixed { |
||
| 584 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args())); |
||
| 585 | } |
||
| 586 | |||
| 587 | |||
| 588 | /** |
||
| 589 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 590 | * |
||
| 591 | * Similar to `amOnPage` but accepts a route as first argument and params as second |
||
| 592 | * |
||
| 593 | * ``` |
||
| 594 | * $I->amOnRoute('site/view', ['page' => 'about']); |
||
| 595 | * ``` |
||
| 596 | * |
||
| 597 | * @param string $route A route |
||
| 598 | * @param array $params Additional route parameters |
||
| 599 | * @see \Codeception\Module\Yii2::amOnRoute() |
||
| 600 | */ |
||
| 601 | public function amOnRoute(string $route, array $params = []): void { |
||
| 602 | $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args())); |
||
| 603 | } |
||
| 604 | |||
| 605 | |||
| 606 | /** |
||
| 607 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 608 | * |
||
| 609 | * Opens the page for the given relative URI or route. |
||
| 610 | * |
||
| 611 | * ``` php |
||
| 612 | * <?php |
||
| 613 | * // opens front page |
||
| 614 | * $I->amOnPage('/'); |
||
| 615 | * // opens /register page |
||
| 616 | * $I->amOnPage('/register'); |
||
| 617 | * ``` |
||
| 618 | * |
||
| 619 | * @param string $page the page URI |
||
| 620 | * @see \Codeception\Module\Yii2::amOnPage() |
||
| 621 | */ |
||
| 622 | public function amOnPage(string $page): void { |
||
| 623 | $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); |
||
| 624 | } |
||
| 625 | |||
| 626 | |||
| 627 | /** |
||
| 628 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 629 | * |
||
| 630 | * Gets a component from the Yii container. Throws an exception if the |
||
| 631 | * component is not available |
||
| 632 | * |
||
| 633 | * ```php |
||
| 634 | * <?php |
||
| 635 | * $mailer = $I->grabComponent('mailer'); |
||
| 636 | * ``` |
||
| 637 | * |
||
| 638 | * @param $component |
||
| 639 | * @return mixed |
||
| 640 | * @throws \Codeception\Exception\ModuleException |
||
| 641 | * @deprecated in your tests you can use \Yii::$app directly. |
||
| 642 | * @see \Codeception\Module\Yii2::grabComponent() |
||
| 643 | */ |
||
| 644 | public function grabComponent(mixed $component) { |
||
| 645 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabComponent', func_get_args())); |
||
| 646 | } |
||
| 647 | |||
| 648 | |||
| 649 | /** |
||
| 650 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 651 | * |
||
| 652 | * Checks that an email is sent. |
||
| 653 | * |
||
| 654 | * ```php |
||
| 655 | * <?php |
||
| 656 | * // check that at least 1 email was sent |
||
| 657 | * $I->seeEmailIsSent(); |
||
| 658 | * |
||
| 659 | * // check that only 3 emails were sent |
||
| 660 | * $I->seeEmailIsSent(3); |
||
| 661 | * ``` |
||
| 662 | * |
||
| 663 | * @param int $num |
||
| 664 | * @throws \Codeception\Exception\ModuleException |
||
| 665 | * @part email |
||
| 666 | * @see \Codeception\Module\Yii2::seeEmailIsSent() |
||
| 667 | */ |
||
| 668 | public function seeEmailIsSent(?int $num = NULL): void { |
||
| 669 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeEmailIsSent', func_get_args())); |
||
| 670 | } |
||
| 671 | /** |
||
| 672 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 673 | * |
||
| 674 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 675 | * Checks that an email is sent. |
||
| 676 | * |
||
| 677 | * ```php |
||
| 678 | * <?php |
||
| 679 | * // check that at least 1 email was sent |
||
| 680 | * $I->seeEmailIsSent(); |
||
| 681 | * |
||
| 682 | * // check that only 3 emails were sent |
||
| 683 | * $I->seeEmailIsSent(3); |
||
| 684 | * ``` |
||
| 685 | * |
||
| 686 | * @param int $num |
||
| 687 | * @throws \Codeception\Exception\ModuleException |
||
| 688 | * @part email |
||
| 689 | * @see \Codeception\Module\Yii2::seeEmailIsSent() |
||
| 690 | */ |
||
| 691 | public function canSeeEmailIsSent(?int $num = NULL): void { |
||
| 692 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeEmailIsSent', func_get_args())); |
||
| 693 | } |
||
| 694 | |||
| 695 | |||
| 696 | /** |
||
| 697 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 698 | * |
||
| 699 | * Checks that no email was sent |
||
| 700 | * |
||
| 701 | * @part email |
||
| 702 | * @see \Codeception\Module\Yii2::dontSeeEmailIsSent() |
||
| 703 | */ |
||
| 704 | public function dontSeeEmailIsSent(): void { |
||
| 705 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeEmailIsSent', func_get_args())); |
||
| 706 | } |
||
| 707 | /** |
||
| 708 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 709 | * |
||
| 710 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 711 | * Checks that no email was sent |
||
| 712 | * |
||
| 713 | * @part email |
||
| 714 | * @see \Codeception\Module\Yii2::dontSeeEmailIsSent() |
||
| 715 | */ |
||
| 716 | public function cantSeeEmailIsSent(): void { |
||
| 717 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeEmailIsSent', func_get_args())); |
||
| 718 | } |
||
| 719 | |||
| 720 | |||
| 721 | /** |
||
| 722 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 723 | * |
||
| 724 | * Returns array of all sent email messages. |
||
| 725 | * Each message implements the `yii\mail\MessageInterface` interface. |
||
| 726 | * Useful to perform additional checks using the `Asserts` module: |
||
| 727 | * |
||
| 728 | * ```php |
||
| 729 | * <?php |
||
| 730 | * $I->seeEmailIsSent(); |
||
| 731 | * $messages = $I->grabSentEmails(); |
||
| 732 | * $I->assertEquals('admin@site,com', $messages[0]->getTo()); |
||
| 733 | * ``` |
||
| 734 | * |
||
| 735 | * @part email |
||
| 736 | * @return array |
||
| 737 | * @throws \Codeception\Exception\ModuleException |
||
| 738 | * @see \Codeception\Module\Yii2::grabSentEmails() |
||
| 739 | */ |
||
| 740 | public function grabSentEmails(): array { |
||
| 741 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabSentEmails', func_get_args())); |
||
| 742 | } |
||
| 743 | |||
| 744 | |||
| 745 | /** |
||
| 746 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 747 | * |
||
| 748 | * Returns the last sent email: |
||
| 749 | * |
||
| 750 | * ```php |
||
| 751 | * <?php |
||
| 752 | * $I->seeEmailIsSent(); |
||
| 753 | * $message = $I->grabLastSentEmail(); |
||
| 754 | * $I->assertEquals('admin@site,com', $message->getTo()); |
||
| 755 | * ``` |
||
| 756 | * @part email |
||
| 757 | * @see \Codeception\Module\Yii2::grabLastSentEmail() |
||
| 758 | */ |
||
| 759 | public function grabLastSentEmail(): object { |
||
| 760 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastSentEmail', func_get_args())); |
||
| 761 | } |
||
| 762 | |||
| 763 | |||
| 764 | /** |
||
| 765 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 766 | * |
||
| 767 | * Returns a list of regex patterns for recognized domain names |
||
| 768 | * |
||
| 769 | * @return array |
||
| 770 | * @see \Codeception\Module\Yii2::getInternalDomains() |
||
| 771 | */ |
||
| 772 | public function getInternalDomains(): array { |
||
| 773 | return $this->getScenario()->runStep(new \Codeception\Step\Action('getInternalDomains', func_get_args())); |
||
| 774 | } |
||
| 775 | |||
| 776 | |||
| 777 | /** |
||
| 778 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 779 | * |
||
| 780 | * Sets a cookie and, if validation is enabled, signs it. |
||
| 781 | * @param string $name The name of the cookie |
||
| 782 | * @param string $val The value of the cookie |
||
| 783 | * @param array $params Additional cookie params like `domain`, `path`, `expires` and `secure`. |
||
| 784 | * @see \Codeception\Module\Yii2::setCookie() |
||
| 785 | */ |
||
| 786 | public function setCookie($name, $val, $params = []) { |
||
| 787 | return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); |
||
| 788 | } |
||
| 789 | |||
| 790 | |||
| 791 | /** |
||
| 792 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 793 | * |
||
| 794 | * Creates the CSRF Cookie. |
||
| 795 | * @param string $val The value of the CSRF token |
||
| 796 | * @return string[] Returns an array containing the name of the CSRF param and the masked CSRF token. |
||
| 797 | * @see \Codeception\Module\Yii2::createAndSetCsrfCookie() |
||
| 798 | */ |
||
| 799 | public function createAndSetCsrfCookie(string $val): array { |
||
| 800 | return $this->getScenario()->runStep(new \Codeception\Step\Action('createAndSetCsrfCookie', func_get_args())); |
||
| 801 | } |
||
| 802 | |||
| 803 | |||
| 804 | /** |
||
| 805 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 806 | * |
||
| 807 | * Authenticates user for HTTP_AUTH |
||
| 808 | * @see \Codeception\Lib\InnerBrowser::amHttpAuthenticated() |
||
| 809 | */ |
||
| 810 | public function amHttpAuthenticated(string $username, string $password): void { |
||
| 811 | $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); |
||
| 812 | } |
||
| 813 | |||
| 814 | |||
| 815 | /** |
||
| 816 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 817 | * |
||
| 818 | * Sets the HTTP header to the passed value - which is used on |
||
| 819 | * subsequent HTTP requests through PhpBrowser. |
||
| 820 | * |
||
| 821 | * Example: |
||
| 822 | * ```php |
||
| 823 | * <?php |
||
| 824 | * $I->haveHttpHeader('X-Requested-With', 'Codeception'); |
||
| 825 | * $I->amOnPage('test-headers.php'); |
||
| 826 | * ``` |
||
| 827 | * |
||
| 828 | * To use special chars in Header Key use HTML Character Entities: |
||
| 829 | * Example: |
||
| 830 | * Header with underscore - 'Client_Id' |
||
| 831 | * should be represented as - 'Client_Id' or 'Client_Id' |
||
| 832 | * |
||
| 833 | * ```php |
||
| 834 | * <?php |
||
| 835 | * $I->haveHttpHeader('Client_Id', 'Codeception'); |
||
| 836 | * ``` |
||
| 837 | * |
||
| 838 | * @param string $name the name of the request header |
||
| 839 | * @param string $value the value to set it to for subsequent |
||
| 840 | * requests |
||
| 841 | * @see \Codeception\Lib\InnerBrowser::haveHttpHeader() |
||
| 842 | */ |
||
| 843 | public function haveHttpHeader(string $name, string $value): void { |
||
| 844 | $this->getScenario()->runStep(new \Codeception\Step\Action('haveHttpHeader', func_get_args())); |
||
| 845 | } |
||
| 846 | |||
| 847 | |||
| 848 | /** |
||
| 849 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 850 | * |
||
| 851 | * Deletes the header with the passed name. Subsequent requests |
||
| 852 | * will not have the deleted header in its request. |
||
| 853 | * |
||
| 854 | * Example: |
||
| 855 | * ```php |
||
| 856 | * <?php |
||
| 857 | * $I->haveHttpHeader('X-Requested-With', 'Codeception'); |
||
| 858 | * $I->amOnPage('test-headers.php'); |
||
| 859 | * // ... |
||
| 860 | * $I->deleteHeader('X-Requested-With'); |
||
| 861 | * $I->amOnPage('some-other-page.php'); |
||
| 862 | * ``` |
||
| 863 | * |
||
| 864 | * @param string $name the name of the header to delete. |
||
| 865 | * @see \Codeception\Lib\InnerBrowser::deleteHeader() |
||
| 866 | */ |
||
| 867 | public function deleteHeader(string $name): void { |
||
| 868 | $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args())); |
||
| 869 | } |
||
| 870 | |||
| 871 | |||
| 872 | /** |
||
| 873 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 874 | * |
||
| 875 | * Perform a click on a link or a button, given by a locator. |
||
| 876 | * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. |
||
| 877 | * For buttons, the "value" attribute, "name" attribute, and inner text are searched. |
||
| 878 | * For links, the link text is searched. |
||
| 879 | * For images, the "alt" attribute and inner text of any parent links are searched. |
||
| 880 | * |
||
| 881 | * The second parameter is a context (CSS or XPath locator) to narrow the search. |
||
| 882 | * |
||
| 883 | * Note that if the locator matches a button of type `submit`, the form will be submitted. |
||
| 884 | * |
||
| 885 | * ``` php |
||
| 886 | * <?php |
||
| 887 | * // simple link |
||
| 888 | * $I->click('Logout'); |
||
| 889 | * // button of form |
||
| 890 | * $I->click('Submit'); |
||
| 891 | * // CSS button |
||
| 892 | * $I->click('#form input[type=submit]'); |
||
| 893 | * // XPath |
||
| 894 | * $I->click('//form/*[@type="submit"]'); |
||
| 895 | * // link in context |
||
| 896 | * $I->click('Logout', '#nav'); |
||
| 897 | * // using strict locator |
||
| 898 | * $I->click(['link' => 'Login']); |
||
| 899 | * ``` |
||
| 900 | * @param string|array $link |
||
| 901 | * @see \Codeception\Lib\InnerBrowser::click() |
||
| 902 | */ |
||
| 903 | public function click($link, $context = NULL): void { |
||
| 904 | $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); |
||
| 905 | } |
||
| 906 | |||
| 907 | |||
| 908 | /** |
||
| 909 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 910 | * |
||
| 911 | * Checks that the current page contains the given string (case insensitive). |
||
| 912 | * |
||
| 913 | * You can specify a specific HTML element (via CSS or XPath) as the second |
||
| 914 | * parameter to only search within that element. |
||
| 915 | * |
||
| 916 | * ``` php |
||
| 917 | * <?php |
||
| 918 | * $I->see('Logout'); // I can suppose user is logged in |
||
| 919 | * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page |
||
| 920 | * $I->see('Sign Up', '//body/h1'); // with XPath |
||
| 921 | * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator |
||
| 922 | * ``` |
||
| 923 | * |
||
| 924 | * Note that the search is done after stripping all HTML tags from the body, |
||
| 925 | * so `$I->see('strong')` will return true for strings like: |
||
| 926 | * |
||
| 927 | * - `<p>I am Stronger than thou</p>` |
||
| 928 | * - `<script>document.createElement('strong');</script>` |
||
| 929 | * |
||
| 930 | * But will *not* be true for strings like: |
||
| 931 | * |
||
| 932 | * - `<strong>Home</strong>` |
||
| 933 | * - `<div class="strong">Home</strong>` |
||
| 934 | * - `<!-- strong -->` |
||
| 935 | * |
||
| 936 | * For checking the raw source code, use `seeInSource()`. |
||
| 937 | * |
||
| 938 | * @param array|string $selector optional |
||
| 939 | * @see \Codeception\Lib\InnerBrowser::see() |
||
| 940 | */ |
||
| 941 | public function see(string $text, $selector = NULL): void { |
||
| 942 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); |
||
| 943 | } |
||
| 944 | /** |
||
| 945 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 946 | * |
||
| 947 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 948 | * Checks that the current page contains the given string (case insensitive). |
||
| 949 | * |
||
| 950 | * You can specify a specific HTML element (via CSS or XPath) as the second |
||
| 951 | * parameter to only search within that element. |
||
| 952 | * |
||
| 953 | * ``` php |
||
| 954 | * <?php |
||
| 955 | * $I->see('Logout'); // I can suppose user is logged in |
||
| 956 | * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page |
||
| 957 | * $I->see('Sign Up', '//body/h1'); // with XPath |
||
| 958 | * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator |
||
| 959 | * ``` |
||
| 960 | * |
||
| 961 | * Note that the search is done after stripping all HTML tags from the body, |
||
| 962 | * so `$I->see('strong')` will return true for strings like: |
||
| 963 | * |
||
| 964 | * - `<p>I am Stronger than thou</p>` |
||
| 965 | * - `<script>document.createElement('strong');</script>` |
||
| 966 | * |
||
| 967 | * But will *not* be true for strings like: |
||
| 968 | * |
||
| 969 | * - `<strong>Home</strong>` |
||
| 970 | * - `<div class="strong">Home</strong>` |
||
| 971 | * - `<!-- strong -->` |
||
| 972 | * |
||
| 973 | * For checking the raw source code, use `seeInSource()`. |
||
| 974 | * |
||
| 975 | * @param array|string $selector optional |
||
| 976 | * @see \Codeception\Lib\InnerBrowser::see() |
||
| 977 | */ |
||
| 978 | public function canSee(string $text, $selector = NULL): void { |
||
| 979 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); |
||
| 980 | } |
||
| 981 | |||
| 982 | |||
| 983 | /** |
||
| 984 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 985 | * |
||
| 986 | * Checks that the current page doesn't contain the text specified (case insensitive). |
||
| 987 | * Give a locator as the second parameter to match a specific region. |
||
| 988 | * |
||
| 989 | * ```php |
||
| 990 | * <?php |
||
| 991 | * $I->dontSee('Login'); // I can suppose user is already logged in |
||
| 992 | * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page |
||
| 993 | * $I->dontSee('Sign Up','//body/h1'); // with XPath |
||
| 994 | * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator |
||
| 995 | * ``` |
||
| 996 | * |
||
| 997 | * Note that the search is done after stripping all HTML tags from the body, |
||
| 998 | * so `$I->dontSee('strong')` will fail on strings like: |
||
| 999 | * |
||
| 1000 | * - `<p>I am Stronger than thou</p>` |
||
| 1001 | * - `<script>document.createElement('strong');</script>` |
||
| 1002 | * |
||
| 1003 | * But will ignore strings like: |
||
| 1004 | * |
||
| 1005 | * - `<strong>Home</strong>` |
||
| 1006 | * - `<div class="strong">Home</strong>` |
||
| 1007 | * - `<!-- strong -->` |
||
| 1008 | * |
||
| 1009 | * For checking the raw source code, use `seeInSource()`. |
||
| 1010 | * |
||
| 1011 | * @param array|string $selector optional |
||
| 1012 | * @see \Codeception\Lib\InnerBrowser::dontSee() |
||
| 1013 | */ |
||
| 1014 | public function dontSee(string $text, $selector = NULL): void { |
||
| 1015 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSee', func_get_args())); |
||
| 1016 | } |
||
| 1017 | /** |
||
| 1018 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1019 | * |
||
| 1020 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1021 | * Checks that the current page doesn't contain the text specified (case insensitive). |
||
| 1022 | * Give a locator as the second parameter to match a specific region. |
||
| 1023 | * |
||
| 1024 | * ```php |
||
| 1025 | * <?php |
||
| 1026 | * $I->dontSee('Login'); // I can suppose user is already logged in |
||
| 1027 | * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page |
||
| 1028 | * $I->dontSee('Sign Up','//body/h1'); // with XPath |
||
| 1029 | * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator |
||
| 1030 | * ``` |
||
| 1031 | * |
||
| 1032 | * Note that the search is done after stripping all HTML tags from the body, |
||
| 1033 | * so `$I->dontSee('strong')` will fail on strings like: |
||
| 1034 | * |
||
| 1035 | * - `<p>I am Stronger than thou</p>` |
||
| 1036 | * - `<script>document.createElement('strong');</script>` |
||
| 1037 | * |
||
| 1038 | * But will ignore strings like: |
||
| 1039 | * |
||
| 1040 | * - `<strong>Home</strong>` |
||
| 1041 | * - `<div class="strong">Home</strong>` |
||
| 1042 | * - `<!-- strong -->` |
||
| 1043 | * |
||
| 1044 | * For checking the raw source code, use `seeInSource()`. |
||
| 1045 | * |
||
| 1046 | * @param array|string $selector optional |
||
| 1047 | * @see \Codeception\Lib\InnerBrowser::dontSee() |
||
| 1048 | */ |
||
| 1049 | public function cantSee(string $text, $selector = NULL): void { |
||
| 1050 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); |
||
| 1051 | } |
||
| 1052 | |||
| 1053 | |||
| 1054 | /** |
||
| 1055 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1056 | * |
||
| 1057 | * Checks that the current page contains the given string in its |
||
| 1058 | * raw source code. |
||
| 1059 | * |
||
| 1060 | * ``` php |
||
| 1061 | * <?php |
||
| 1062 | * $I->seeInSource('<h1>Green eggs & ham</h1>'); |
||
| 1063 | * ``` |
||
| 1064 | * @see \Codeception\Lib\InnerBrowser::seeInSource() |
||
| 1065 | */ |
||
| 1066 | public function seeInSource(string $raw): void { |
||
| 1067 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); |
||
| 1068 | } |
||
| 1069 | /** |
||
| 1070 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1071 | * |
||
| 1072 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1073 | * Checks that the current page contains the given string in its |
||
| 1074 | * raw source code. |
||
| 1075 | * |
||
| 1076 | * ``` php |
||
| 1077 | * <?php |
||
| 1078 | * $I->seeInSource('<h1>Green eggs & ham</h1>'); |
||
| 1079 | * ``` |
||
| 1080 | * @see \Codeception\Lib\InnerBrowser::seeInSource() |
||
| 1081 | */ |
||
| 1082 | public function canSeeInSource(string $raw): void { |
||
| 1083 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); |
||
| 1084 | } |
||
| 1085 | |||
| 1086 | |||
| 1087 | /** |
||
| 1088 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1089 | * |
||
| 1090 | * Checks that the current page contains the given string in its |
||
| 1091 | * raw source code. |
||
| 1092 | * |
||
| 1093 | * ```php |
||
| 1094 | * <?php |
||
| 1095 | * $I->dontSeeInSource('<h1>Green eggs & ham</h1>'); |
||
| 1096 | * ``` |
||
| 1097 | * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() |
||
| 1098 | */ |
||
| 1099 | public function dontSeeInSource(string $raw): void { |
||
| 1100 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInSource', func_get_args())); |
||
| 1101 | } |
||
| 1102 | /** |
||
| 1103 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1104 | * |
||
| 1105 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1106 | * Checks that the current page contains the given string in its |
||
| 1107 | * raw source code. |
||
| 1108 | * |
||
| 1109 | * ```php |
||
| 1110 | * <?php |
||
| 1111 | * $I->dontSeeInSource('<h1>Green eggs & ham</h1>'); |
||
| 1112 | * ``` |
||
| 1113 | * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() |
||
| 1114 | */ |
||
| 1115 | public function cantSeeInSource(string $raw): void { |
||
| 1116 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); |
||
| 1117 | } |
||
| 1118 | |||
| 1119 | |||
| 1120 | /** |
||
| 1121 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1122 | * |
||
| 1123 | * Checks that there's a link with the specified text. |
||
| 1124 | * Give a full URL as the second parameter to match links with that exact URL. |
||
| 1125 | * |
||
| 1126 | * ``` php |
||
| 1127 | * <?php |
||
| 1128 | * $I->seeLink('Logout'); // matches <a href="#">Logout</a> |
||
| 1129 | * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a> |
||
| 1130 | * ``` |
||
| 1131 | * @see \Codeception\Lib\InnerBrowser::seeLink() |
||
| 1132 | */ |
||
| 1133 | public function seeLink(string $text, ?string $url = NULL): void { |
||
| 1134 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); |
||
| 1135 | } |
||
| 1136 | /** |
||
| 1137 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1138 | * |
||
| 1139 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1140 | * Checks that there's a link with the specified text. |
||
| 1141 | * Give a full URL as the second parameter to match links with that exact URL. |
||
| 1142 | * |
||
| 1143 | * ``` php |
||
| 1144 | * <?php |
||
| 1145 | * $I->seeLink('Logout'); // matches <a href="#">Logout</a> |
||
| 1146 | * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a> |
||
| 1147 | * ``` |
||
| 1148 | * @see \Codeception\Lib\InnerBrowser::seeLink() |
||
| 1149 | */ |
||
| 1150 | public function canSeeLink(string $text, ?string $url = NULL): void { |
||
| 1151 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); |
||
| 1152 | } |
||
| 1153 | |||
| 1154 | |||
| 1155 | /** |
||
| 1156 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1157 | * |
||
| 1158 | * Checks that the page doesn't contain a link with the given string. |
||
| 1159 | * If the second parameter is given, only links with a matching "href" attribute will be checked. |
||
| 1160 | * |
||
| 1161 | * ``` php |
||
| 1162 | * <?php |
||
| 1163 | * $I->dontSeeLink('Logout'); // I suppose user is not logged in |
||
| 1164 | * $I->dontSeeLink('Checkout now', '/store/cart.php'); |
||
| 1165 | * ``` |
||
| 1166 | * @see \Codeception\Lib\InnerBrowser::dontSeeLink() |
||
| 1167 | */ |
||
| 1168 | public function dontSeeLink(string $text, string $url = ""): void { |
||
| 1169 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeLink', func_get_args())); |
||
| 1170 | } |
||
| 1171 | /** |
||
| 1172 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1173 | * |
||
| 1174 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1175 | * Checks that the page doesn't contain a link with the given string. |
||
| 1176 | * If the second parameter is given, only links with a matching "href" attribute will be checked. |
||
| 1177 | * |
||
| 1178 | * ``` php |
||
| 1179 | * <?php |
||
| 1180 | * $I->dontSeeLink('Logout'); // I suppose user is not logged in |
||
| 1181 | * $I->dontSeeLink('Checkout now', '/store/cart.php'); |
||
| 1182 | * ``` |
||
| 1183 | * @see \Codeception\Lib\InnerBrowser::dontSeeLink() |
||
| 1184 | */ |
||
| 1185 | public function cantSeeLink(string $text, string $url = ""): void { |
||
| 1186 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); |
||
| 1187 | } |
||
| 1188 | |||
| 1189 | |||
| 1190 | /** |
||
| 1191 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1192 | * |
||
| 1193 | * Checks that current URI contains the given string. |
||
| 1194 | * |
||
| 1195 | * ``` php |
||
| 1196 | * <?php |
||
| 1197 | * // to match: /home/dashboard |
||
| 1198 | * $I->seeInCurrentUrl('home'); |
||
| 1199 | * // to match: /users/1 |
||
| 1200 | * $I->seeInCurrentUrl('/users/'); |
||
| 1201 | * ``` |
||
| 1202 | * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() |
||
| 1203 | */ |
||
| 1204 | public function seeInCurrentUrl(string $uri): void { |
||
| 1205 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); |
||
| 1206 | } |
||
| 1207 | /** |
||
| 1208 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1209 | * |
||
| 1210 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1211 | * Checks that current URI contains the given string. |
||
| 1212 | * |
||
| 1213 | * ``` php |
||
| 1214 | * <?php |
||
| 1215 | * // to match: /home/dashboard |
||
| 1216 | * $I->seeInCurrentUrl('home'); |
||
| 1217 | * // to match: /users/1 |
||
| 1218 | * $I->seeInCurrentUrl('/users/'); |
||
| 1219 | * ``` |
||
| 1220 | * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() |
||
| 1221 | */ |
||
| 1222 | public function canSeeInCurrentUrl(string $uri): void { |
||
| 1223 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); |
||
| 1224 | } |
||
| 1225 | |||
| 1226 | |||
| 1227 | /** |
||
| 1228 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1229 | * |
||
| 1230 | * Checks that the current URI doesn't contain the given string. |
||
| 1231 | * |
||
| 1232 | * ``` php |
||
| 1233 | * <?php |
||
| 1234 | * $I->dontSeeInCurrentUrl('/users/'); |
||
| 1235 | * ``` |
||
| 1236 | * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() |
||
| 1237 | */ |
||
| 1238 | public function dontSeeInCurrentUrl(string $uri): void { |
||
| 1239 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInCurrentUrl', func_get_args())); |
||
| 1240 | } |
||
| 1241 | /** |
||
| 1242 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1243 | * |
||
| 1244 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1245 | * Checks that the current URI doesn't contain the given string. |
||
| 1246 | * |
||
| 1247 | * ``` php |
||
| 1248 | * <?php |
||
| 1249 | * $I->dontSeeInCurrentUrl('/users/'); |
||
| 1250 | * ``` |
||
| 1251 | * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() |
||
| 1252 | */ |
||
| 1253 | public function cantSeeInCurrentUrl(string $uri): void { |
||
| 1254 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); |
||
| 1255 | } |
||
| 1256 | |||
| 1257 | |||
| 1258 | /** |
||
| 1259 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1260 | * |
||
| 1261 | * Checks that the current URL is equal to the given string. |
||
| 1262 | * Unlike `seeInCurrentUrl`, this only matches the full URL. |
||
| 1263 | * |
||
| 1264 | * ``` php |
||
| 1265 | * <?php |
||
| 1266 | * // to match root url |
||
| 1267 | * $I->seeCurrentUrlEquals('/'); |
||
| 1268 | * ``` |
||
| 1269 | * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() |
||
| 1270 | */ |
||
| 1271 | public function seeCurrentUrlEquals(string $uri): void { |
||
| 1272 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); |
||
| 1273 | } |
||
| 1274 | /** |
||
| 1275 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1276 | * |
||
| 1277 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1278 | * Checks that the current URL is equal to the given string. |
||
| 1279 | * Unlike `seeInCurrentUrl`, this only matches the full URL. |
||
| 1280 | * |
||
| 1281 | * ``` php |
||
| 1282 | * <?php |
||
| 1283 | * // to match root url |
||
| 1284 | * $I->seeCurrentUrlEquals('/'); |
||
| 1285 | * ``` |
||
| 1286 | * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() |
||
| 1287 | */ |
||
| 1288 | public function canSeeCurrentUrlEquals(string $uri): void { |
||
| 1289 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); |
||
| 1290 | } |
||
| 1291 | |||
| 1292 | |||
| 1293 | /** |
||
| 1294 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1295 | * |
||
| 1296 | * Checks that the current URL doesn't equal the given string. |
||
| 1297 | * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. |
||
| 1298 | * |
||
| 1299 | * ``` php |
||
| 1300 | * <?php |
||
| 1301 | * // current url is not root |
||
| 1302 | * $I->dontSeeCurrentUrlEquals('/'); |
||
| 1303 | * ``` |
||
| 1304 | * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() |
||
| 1305 | */ |
||
| 1306 | public function dontSeeCurrentUrlEquals(string $uri): void { |
||
| 1307 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCurrentUrlEquals', func_get_args())); |
||
| 1308 | } |
||
| 1309 | /** |
||
| 1310 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1311 | * |
||
| 1312 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1313 | * Checks that the current URL doesn't equal the given string. |
||
| 1314 | * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. |
||
| 1315 | * |
||
| 1316 | * ``` php |
||
| 1317 | * <?php |
||
| 1318 | * // current url is not root |
||
| 1319 | * $I->dontSeeCurrentUrlEquals('/'); |
||
| 1320 | * ``` |
||
| 1321 | * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() |
||
| 1322 | */ |
||
| 1323 | public function cantSeeCurrentUrlEquals(string $uri): void { |
||
| 1324 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); |
||
| 1325 | } |
||
| 1326 | |||
| 1327 | |||
| 1328 | /** |
||
| 1329 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1330 | * |
||
| 1331 | * Checks that the current URL matches the given regular expression. |
||
| 1332 | * |
||
| 1333 | * ``` php |
||
| 1334 | * <?php |
||
| 1335 | * // to match root url |
||
| 1336 | * $I->seeCurrentUrlMatches('~^/users/(\d+)~'); |
||
| 1337 | * ``` |
||
| 1338 | * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() |
||
| 1339 | */ |
||
| 1340 | public function seeCurrentUrlMatches(string $uri): void { |
||
| 1341 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); |
||
| 1342 | } |
||
| 1343 | /** |
||
| 1344 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1345 | * |
||
| 1346 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1347 | * Checks that the current URL matches the given regular expression. |
||
| 1348 | * |
||
| 1349 | * ``` php |
||
| 1350 | * <?php |
||
| 1351 | * // to match root url |
||
| 1352 | * $I->seeCurrentUrlMatches('~^/users/(\d+)~'); |
||
| 1353 | * ``` |
||
| 1354 | * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() |
||
| 1355 | */ |
||
| 1356 | public function canSeeCurrentUrlMatches(string $uri): void { |
||
| 1357 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); |
||
| 1358 | } |
||
| 1359 | |||
| 1360 | |||
| 1361 | /** |
||
| 1362 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1363 | * |
||
| 1364 | * Checks that current url doesn't match the given regular expression. |
||
| 1365 | * |
||
| 1366 | * ``` php |
||
| 1367 | * <?php |
||
| 1368 | * // to match root url |
||
| 1369 | * $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~'); |
||
| 1370 | * ``` |
||
| 1371 | * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() |
||
| 1372 | */ |
||
| 1373 | public function dontSeeCurrentUrlMatches(string $uri): void { |
||
| 1374 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCurrentUrlMatches', func_get_args())); |
||
| 1375 | } |
||
| 1376 | /** |
||
| 1377 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1378 | * |
||
| 1379 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1380 | * Checks that current url doesn't match the given regular expression. |
||
| 1381 | * |
||
| 1382 | * ``` php |
||
| 1383 | * <?php |
||
| 1384 | * // to match root url |
||
| 1385 | * $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~'); |
||
| 1386 | * ``` |
||
| 1387 | * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() |
||
| 1388 | */ |
||
| 1389 | public function cantSeeCurrentUrlMatches(string $uri): void { |
||
| 1390 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); |
||
| 1391 | } |
||
| 1392 | |||
| 1393 | |||
| 1394 | /** |
||
| 1395 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1396 | * |
||
| 1397 | * Executes the given regular expression against the current URI and returns the first capturing group. |
||
| 1398 | * If no parameters are provided, the full URI is returned. |
||
| 1399 | * |
||
| 1400 | * ``` php |
||
| 1401 | * <?php |
||
| 1402 | * $user_id = $I->grabFromCurrentUrl('~^/user/(\d+)/~'); |
||
| 1403 | * $uri = $I->grabFromCurrentUrl(); |
||
| 1404 | * ``` |
||
| 1405 | * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() |
||
| 1406 | */ |
||
| 1407 | public function grabFromCurrentUrl(?string $uri = NULL): mixed { |
||
| 1408 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); |
||
| 1409 | } |
||
| 1410 | |||
| 1411 | |||
| 1412 | /** |
||
| 1413 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1414 | * |
||
| 1415 | * Checks that the specified checkbox is checked. |
||
| 1416 | * |
||
| 1417 | * ``` php |
||
| 1418 | * <?php |
||
| 1419 | * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms |
||
| 1420 | * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. |
||
| 1421 | * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); |
||
| 1422 | * ``` |
||
| 1423 | * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() |
||
| 1424 | */ |
||
| 1425 | public function seeCheckboxIsChecked($checkbox): void { |
||
| 1426 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); |
||
| 1427 | } |
||
| 1428 | /** |
||
| 1429 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1430 | * |
||
| 1431 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1432 | * Checks that the specified checkbox is checked. |
||
| 1433 | * |
||
| 1434 | * ``` php |
||
| 1435 | * <?php |
||
| 1436 | * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms |
||
| 1437 | * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. |
||
| 1438 | * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); |
||
| 1439 | * ``` |
||
| 1440 | * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() |
||
| 1441 | */ |
||
| 1442 | public function canSeeCheckboxIsChecked($checkbox): void { |
||
| 1443 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); |
||
| 1444 | } |
||
| 1445 | |||
| 1446 | |||
| 1447 | /** |
||
| 1448 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1449 | * |
||
| 1450 | * Check that the specified checkbox is unchecked. |
||
| 1451 | * |
||
| 1452 | * ``` php |
||
| 1453 | * <?php |
||
| 1454 | * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms |
||
| 1455 | * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. |
||
| 1456 | * ``` |
||
| 1457 | * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() |
||
| 1458 | */ |
||
| 1459 | public function dontSeeCheckboxIsChecked($checkbox): void { |
||
| 1460 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCheckboxIsChecked', func_get_args())); |
||
| 1461 | } |
||
| 1462 | /** |
||
| 1463 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1464 | * |
||
| 1465 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1466 | * Check that the specified checkbox is unchecked. |
||
| 1467 | * |
||
| 1468 | * ``` php |
||
| 1469 | * <?php |
||
| 1470 | * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms |
||
| 1471 | * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. |
||
| 1472 | * ``` |
||
| 1473 | * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() |
||
| 1474 | */ |
||
| 1475 | public function cantSeeCheckboxIsChecked($checkbox): void { |
||
| 1476 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); |
||
| 1477 | } |
||
| 1478 | |||
| 1479 | |||
| 1480 | /** |
||
| 1481 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1482 | * |
||
| 1483 | * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value. |
||
| 1484 | * Fields are matched by label text, the "name" attribute, CSS, or XPath. |
||
| 1485 | * |
||
| 1486 | * ``` php |
||
| 1487 | * <?php |
||
| 1488 | * $I->seeInField('Body','Type your comment here'); |
||
| 1489 | * $I->seeInField('form textarea[name=body]','Type your comment here'); |
||
| 1490 | * $I->seeInField('form input[type=hidden]','hidden_value'); |
||
| 1491 | * $I->seeInField('#searchform input','Search'); |
||
| 1492 | * $I->seeInField('//form/*[@name=search]','Search'); |
||
| 1493 | * $I->seeInField(['name' => 'search'], 'Search'); |
||
| 1494 | * ``` |
||
| 1495 | * |
||
| 1496 | * @param string|array $field |
||
| 1497 | * @see \Codeception\Lib\InnerBrowser::seeInField() |
||
| 1498 | */ |
||
| 1499 | public function seeInField($field, $value): void { |
||
| 1500 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); |
||
| 1501 | } |
||
| 1502 | /** |
||
| 1503 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1504 | * |
||
| 1505 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1506 | * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value. |
||
| 1507 | * Fields are matched by label text, the "name" attribute, CSS, or XPath. |
||
| 1508 | * |
||
| 1509 | * ``` php |
||
| 1510 | * <?php |
||
| 1511 | * $I->seeInField('Body','Type your comment here'); |
||
| 1512 | * $I->seeInField('form textarea[name=body]','Type your comment here'); |
||
| 1513 | * $I->seeInField('form input[type=hidden]','hidden_value'); |
||
| 1514 | * $I->seeInField('#searchform input','Search'); |
||
| 1515 | * $I->seeInField('//form/*[@name=search]','Search'); |
||
| 1516 | * $I->seeInField(['name' => 'search'], 'Search'); |
||
| 1517 | * ``` |
||
| 1518 | * |
||
| 1519 | * @param string|array $field |
||
| 1520 | * @see \Codeception\Lib\InnerBrowser::seeInField() |
||
| 1521 | */ |
||
| 1522 | public function canSeeInField($field, $value): void { |
||
| 1523 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); |
||
| 1524 | } |
||
| 1525 | |||
| 1526 | |||
| 1527 | /** |
||
| 1528 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1529 | * |
||
| 1530 | * Checks that an input field or textarea doesn't contain the given value. |
||
| 1531 | * For fuzzy locators, the field is matched by label text, CSS and XPath. |
||
| 1532 | * |
||
| 1533 | * ``` php |
||
| 1534 | * <?php |
||
| 1535 | * $I->dontSeeInField('Body','Type your comment here'); |
||
| 1536 | * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); |
||
| 1537 | * $I->dontSeeInField('form input[type=hidden]','hidden_value'); |
||
| 1538 | * $I->dontSeeInField('#searchform input','Search'); |
||
| 1539 | * $I->dontSeeInField('//form/*[@name=search]','Search'); |
||
| 1540 | * $I->dontSeeInField(['name' => 'search'], 'Search'); |
||
| 1541 | * ``` |
||
| 1542 | * @param string|array $field |
||
| 1543 | * @see \Codeception\Lib\InnerBrowser::dontSeeInField() |
||
| 1544 | */ |
||
| 1545 | public function dontSeeInField($field, $value): void { |
||
| 1546 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInField', func_get_args())); |
||
| 1547 | } |
||
| 1548 | /** |
||
| 1549 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1550 | * |
||
| 1551 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1552 | * Checks that an input field or textarea doesn't contain the given value. |
||
| 1553 | * For fuzzy locators, the field is matched by label text, CSS and XPath. |
||
| 1554 | * |
||
| 1555 | * ``` php |
||
| 1556 | * <?php |
||
| 1557 | * $I->dontSeeInField('Body','Type your comment here'); |
||
| 1558 | * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); |
||
| 1559 | * $I->dontSeeInField('form input[type=hidden]','hidden_value'); |
||
| 1560 | * $I->dontSeeInField('#searchform input','Search'); |
||
| 1561 | * $I->dontSeeInField('//form/*[@name=search]','Search'); |
||
| 1562 | * $I->dontSeeInField(['name' => 'search'], 'Search'); |
||
| 1563 | * ``` |
||
| 1564 | * @param string|array $field |
||
| 1565 | * @see \Codeception\Lib\InnerBrowser::dontSeeInField() |
||
| 1566 | */ |
||
| 1567 | public function cantSeeInField($field, $value): void { |
||
| 1568 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); |
||
| 1569 | } |
||
| 1570 | |||
| 1571 | |||
| 1572 | /** |
||
| 1573 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1574 | * |
||
| 1575 | * Checks if the array of form parameters (name => value) are set on the form matched with the |
||
| 1576 | * passed selector. |
||
| 1577 | * |
||
| 1578 | * ``` php |
||
| 1579 | * <?php |
||
| 1580 | * $I->seeInFormFields('form[name=myform]', [ |
||
| 1581 | * 'input1' => 'value', |
||
| 1582 | * 'input2' => 'other value', |
||
| 1583 | * ]); |
||
| 1584 | * ``` |
||
| 1585 | * |
||
| 1586 | * For multi-select elements, or to check values of multiple elements with the same name, an |
||
| 1587 | * array may be passed: |
||
| 1588 | * |
||
| 1589 | * ``` php |
||
| 1590 | * <?php |
||
| 1591 | * $I->seeInFormFields('.form-class', [ |
||
| 1592 | * 'multiselect' => [ |
||
| 1593 | * 'value1', |
||
| 1594 | * 'value2', |
||
| 1595 | * ], |
||
| 1596 | * 'checkbox[]' => [ |
||
| 1597 | * 'a checked value', |
||
| 1598 | * 'another checked value', |
||
| 1599 | * ], |
||
| 1600 | * ]); |
||
| 1601 | * ``` |
||
| 1602 | * |
||
| 1603 | * Additionally, checkbox values can be checked with a boolean. |
||
| 1604 | * |
||
| 1605 | * ``` php |
||
| 1606 | * <?php |
||
| 1607 | * $I->seeInFormFields('#form-id', [ |
||
| 1608 | * 'checkbox1' => true, // passes if checked |
||
| 1609 | * 'checkbox2' => false, // passes if unchecked |
||
| 1610 | * ]); |
||
| 1611 | * ``` |
||
| 1612 | * |
||
| 1613 | * Pair this with submitForm for quick testing magic. |
||
| 1614 | * |
||
| 1615 | * ``` php |
||
| 1616 | * <?php |
||
| 1617 | * $form = [ |
||
| 1618 | * 'field1' => 'value', |
||
| 1619 | * 'field2' => 'another value', |
||
| 1620 | * 'checkbox1' => true, |
||
| 1621 | * // ... |
||
| 1622 | * ]; |
||
| 1623 | * $I->submitForm('//form[@id=my-form]', string $form, 'submitButton'); |
||
| 1624 | * // $I->amOnPage('/path/to/form-page') may be needed |
||
| 1625 | * $I->seeInFormFields('//form[@id=my-form]', string $form); |
||
| 1626 | * ``` |
||
| 1627 | * @see \Codeception\Lib\InnerBrowser::seeInFormFields() |
||
| 1628 | */ |
||
| 1629 | public function seeInFormFields($formSelector, array $params): void { |
||
| 1630 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); |
||
| 1631 | } |
||
| 1632 | /** |
||
| 1633 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1634 | * |
||
| 1635 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1636 | * Checks if the array of form parameters (name => value) are set on the form matched with the |
||
| 1637 | * passed selector. |
||
| 1638 | * |
||
| 1639 | * ``` php |
||
| 1640 | * <?php |
||
| 1641 | * $I->seeInFormFields('form[name=myform]', [ |
||
| 1642 | * 'input1' => 'value', |
||
| 1643 | * 'input2' => 'other value', |
||
| 1644 | * ]); |
||
| 1645 | * ``` |
||
| 1646 | * |
||
| 1647 | * For multi-select elements, or to check values of multiple elements with the same name, an |
||
| 1648 | * array may be passed: |
||
| 1649 | * |
||
| 1650 | * ``` php |
||
| 1651 | * <?php |
||
| 1652 | * $I->seeInFormFields('.form-class', [ |
||
| 1653 | * 'multiselect' => [ |
||
| 1654 | * 'value1', |
||
| 1655 | * 'value2', |
||
| 1656 | * ], |
||
| 1657 | * 'checkbox[]' => [ |
||
| 1658 | * 'a checked value', |
||
| 1659 | * 'another checked value', |
||
| 1660 | * ], |
||
| 1661 | * ]); |
||
| 1662 | * ``` |
||
| 1663 | * |
||
| 1664 | * Additionally, checkbox values can be checked with a boolean. |
||
| 1665 | * |
||
| 1666 | * ``` php |
||
| 1667 | * <?php |
||
| 1668 | * $I->seeInFormFields('#form-id', [ |
||
| 1669 | * 'checkbox1' => true, // passes if checked |
||
| 1670 | * 'checkbox2' => false, // passes if unchecked |
||
| 1671 | * ]); |
||
| 1672 | * ``` |
||
| 1673 | * |
||
| 1674 | * Pair this with submitForm for quick testing magic. |
||
| 1675 | * |
||
| 1676 | * ``` php |
||
| 1677 | * <?php |
||
| 1678 | * $form = [ |
||
| 1679 | * 'field1' => 'value', |
||
| 1680 | * 'field2' => 'another value', |
||
| 1681 | * 'checkbox1' => true, |
||
| 1682 | * // ... |
||
| 1683 | * ]; |
||
| 1684 | * $I->submitForm('//form[@id=my-form]', string $form, 'submitButton'); |
||
| 1685 | * // $I->amOnPage('/path/to/form-page') may be needed |
||
| 1686 | * $I->seeInFormFields('//form[@id=my-form]', string $form); |
||
| 1687 | * ``` |
||
| 1688 | * @see \Codeception\Lib\InnerBrowser::seeInFormFields() |
||
| 1689 | */ |
||
| 1690 | public function canSeeInFormFields($formSelector, array $params): void { |
||
| 1691 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); |
||
| 1692 | } |
||
| 1693 | |||
| 1694 | |||
| 1695 | /** |
||
| 1696 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1697 | * |
||
| 1698 | * Checks if the array of form parameters (name => value) are not set on the form matched with |
||
| 1699 | * the passed selector. |
||
| 1700 | * |
||
| 1701 | * ``` php |
||
| 1702 | * <?php |
||
| 1703 | * $I->dontSeeInFormFields('form[name=myform]', [ |
||
| 1704 | * 'input1' => 'non-existent value', |
||
| 1705 | * 'input2' => 'other non-existent value', |
||
| 1706 | * ]); |
||
| 1707 | * ``` |
||
| 1708 | * |
||
| 1709 | * To check that an element hasn't been assigned any one of many values, an array can be passed |
||
| 1710 | * as the value: |
||
| 1711 | * |
||
| 1712 | * ``` php |
||
| 1713 | * <?php |
||
| 1714 | * $I->dontSeeInFormFields('.form-class', [ |
||
| 1715 | * 'fieldName' => [ |
||
| 1716 | * 'This value shouldn\'t be set', |
||
| 1717 | * 'And this value shouldn\'t be set', |
||
| 1718 | * ], |
||
| 1719 | * ]); |
||
| 1720 | * ``` |
||
| 1721 | * |
||
| 1722 | * Additionally, checkbox values can be checked with a boolean. |
||
| 1723 | * |
||
| 1724 | * ``` php |
||
| 1725 | * <?php |
||
| 1726 | * $I->dontSeeInFormFields('#form-id', [ |
||
| 1727 | * 'checkbox1' => true, // fails if checked |
||
| 1728 | * 'checkbox2' => false, // fails if unchecked |
||
| 1729 | * ]); |
||
| 1730 | * ``` |
||
| 1731 | * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() |
||
| 1732 | */ |
||
| 1733 | public function dontSeeInFormFields($formSelector, array $params): void { |
||
| 1734 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInFormFields', func_get_args())); |
||
| 1735 | } |
||
| 1736 | /** |
||
| 1737 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1738 | * |
||
| 1739 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 1740 | * Checks if the array of form parameters (name => value) are not set on the form matched with |
||
| 1741 | * the passed selector. |
||
| 1742 | * |
||
| 1743 | * ``` php |
||
| 1744 | * <?php |
||
| 1745 | * $I->dontSeeInFormFields('form[name=myform]', [ |
||
| 1746 | * 'input1' => 'non-existent value', |
||
| 1747 | * 'input2' => 'other non-existent value', |
||
| 1748 | * ]); |
||
| 1749 | * ``` |
||
| 1750 | * |
||
| 1751 | * To check that an element hasn't been assigned any one of many values, an array can be passed |
||
| 1752 | * as the value: |
||
| 1753 | * |
||
| 1754 | * ``` php |
||
| 1755 | * <?php |
||
| 1756 | * $I->dontSeeInFormFields('.form-class', [ |
||
| 1757 | * 'fieldName' => [ |
||
| 1758 | * 'This value shouldn\'t be set', |
||
| 1759 | * 'And this value shouldn\'t be set', |
||
| 1760 | * ], |
||
| 1761 | * ]); |
||
| 1762 | * ``` |
||
| 1763 | * |
||
| 1764 | * Additionally, checkbox values can be checked with a boolean. |
||
| 1765 | * |
||
| 1766 | * ``` php |
||
| 1767 | * <?php |
||
| 1768 | * $I->dontSeeInFormFields('#form-id', [ |
||
| 1769 | * 'checkbox1' => true, // fails if checked |
||
| 1770 | * 'checkbox2' => false, // fails if unchecked |
||
| 1771 | * ]); |
||
| 1772 | * ``` |
||
| 1773 | * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() |
||
| 1774 | */ |
||
| 1775 | public function cantSeeInFormFields($formSelector, array $params): void { |
||
| 1776 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); |
||
| 1777 | } |
||
| 1778 | |||
| 1779 | |||
| 1780 | /** |
||
| 1781 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1782 | * |
||
| 1783 | * Submits the given form on the page, with the given form |
||
| 1784 | * values. Pass the form field's values as an array in the second |
||
| 1785 | * parameter. |
||
| 1786 | * |
||
| 1787 | * Although this function can be used as a short-hand version of |
||
| 1788 | * `fillField()`, `selectOption()`, `click()` etc. it has some important |
||
| 1789 | * differences: |
||
| 1790 | * |
||
| 1791 | * * Only field *names* may be used, not CSS/XPath selectors nor field labels |
||
| 1792 | * * If a field is sent to this function that does *not* exist on the page, |
||
| 1793 | * it will silently be added to the HTTP request. This is helpful for testing |
||
| 1794 | * some types of forms, but be aware that you will *not* get an exception |
||
| 1795 | * like you would if you called `fillField()` or `selectOption()` with |
||
| 1796 | * a missing field. |
||
| 1797 | * |
||
| 1798 | * Fields that are not provided will be filled by their values from the page, |
||
| 1799 | * or from any previous calls to `fillField()`, `selectOption()` etc. |
||
| 1800 | * You don't need to click the 'Submit' button afterwards. |
||
| 1801 | * This command itself triggers the request to form's action. |
||
| 1802 | * |
||
| 1803 | * You can optionally specify which button's value to include |
||
| 1804 | * in the request with the last parameter (as an alternative to |
||
| 1805 | * explicitly setting its value in the second parameter), as |
||
| 1806 | * button values are not otherwise included in the request. |
||
| 1807 | * |
||
| 1808 | * Examples: |
||
| 1809 | * |
||
| 1810 | * ``` php |
||
| 1811 | * <?php |
||
| 1812 | * $I->submitForm('#login', [ |
||
| 1813 | * 'login' => 'davert', |
||
| 1814 | * 'password' => '123456' |
||
| 1815 | * ]); |
||
| 1816 | * // or |
||
| 1817 | * $I->submitForm('#login', [ |
||
| 1818 | * 'login' => 'davert', |
||
| 1819 | * 'password' => '123456' |
||
| 1820 | * ], 'submitButtonName'); |
||
| 1821 | * |
||
| 1822 | * ``` |
||
| 1823 | * |
||
| 1824 | * For example, given this sample "Sign Up" form: |
||
| 1825 | * |
||
| 1826 | * ``` html |
||
| 1827 | * <form id="userForm"> |
||
| 1828 | * Login: |
||
| 1829 | * <input type="text" name="user[login]" /><br/> |
||
| 1830 | * Password: |
||
| 1831 | * <input type="password" name="user[password]" /><br/> |
||
| 1832 | * Do you agree to our terms? |
||
| 1833 | * <input type="checkbox" name="user[agree]" /><br/> |
||
| 1834 | * Subscribe to our newsletter? |
||
| 1835 | * <input type="checkbox" name="user[newsletter]" value="1" checked="checked" /><br/> |
||
| 1836 | * Select pricing plan: |
||
| 1837 | * <select name="plan"> |
||
| 1838 | * <option value="1">Free</option> |
||
| 1839 | * <option value="2" selected="selected">Paid</option> |
||
| 1840 | * </select> |
||
| 1841 | * <input type="submit" name="submitButton" value="Submit" /> |
||
| 1842 | * </form> |
||
| 1843 | * ``` |
||
| 1844 | * |
||
| 1845 | * You could write the following to submit it: |
||
| 1846 | * |
||
| 1847 | * ``` php |
||
| 1848 | * <?php |
||
| 1849 | * $I->submitForm( |
||
| 1850 | * '#userForm', |
||
| 1851 | * [ |
||
| 1852 | * 'user' => [ |
||
| 1853 | * 'login' => 'Davert', |
||
| 1854 | * 'password' => '123456', |
||
| 1855 | * 'agree' => true |
||
| 1856 | * ] |
||
| 1857 | * ], |
||
| 1858 | * 'submitButton' |
||
| 1859 | * ); |
||
| 1860 | * ``` |
||
| 1861 | * Note that "2" will be the submitted value for the "plan" field, as it is |
||
| 1862 | * the selected option. |
||
| 1863 | * |
||
| 1864 | * To uncheck the pre-checked checkbox "newsletter", call `$I->uncheckOption(['name' => 'user[newsletter]']);` *before*, |
||
| 1865 | * then submit the form as shown here (i.e. without the "newsletter" field in the `$params` array). |
||
| 1866 | * |
||
| 1867 | * You can also emulate a JavaScript submission by not specifying any |
||
| 1868 | * buttons in the third parameter to submitForm. |
||
| 1869 | * |
||
| 1870 | * ```php |
||
| 1871 | * <?php |
||
| 1872 | * $I->submitForm( |
||
| 1873 | * '#userForm', |
||
| 1874 | * [ |
||
| 1875 | * 'user' => [ |
||
| 1876 | * 'login' => 'Davert', |
||
| 1877 | * 'password' => '123456', |
||
| 1878 | * 'agree' => true |
||
| 1879 | * ] |
||
| 1880 | * ] |
||
| 1881 | * ); |
||
| 1882 | * ``` |
||
| 1883 | * |
||
| 1884 | * This function works well when paired with `seeInFormFields()` |
||
| 1885 | * for quickly testing CRUD interfaces and form validation logic. |
||
| 1886 | * |
||
| 1887 | * ``` php |
||
| 1888 | * <?php |
||
| 1889 | * $form = [ |
||
| 1890 | * 'field1' => 'value', |
||
| 1891 | * 'field2' => 'another value', |
||
| 1892 | * 'checkbox1' => true, |
||
| 1893 | * // ... |
||
| 1894 | * ]; |
||
| 1895 | * $I->submitForm('#my-form', $form, 'submitButton'); |
||
| 1896 | * // $I->amOnPage('/path/to/form-page') may be needed |
||
| 1897 | * $I->seeInFormFields('#my-form', $form); |
||
| 1898 | * ``` |
||
| 1899 | * |
||
| 1900 | * Parameter values can be set to arrays for multiple input fields |
||
| 1901 | * of the same name, or multi-select combo boxes. For checkboxes, |
||
| 1902 | * you can use either the string value or boolean `true`/`false` which will |
||
| 1903 | * be replaced by the checkbox's value in the DOM. |
||
| 1904 | * |
||
| 1905 | * ``` php |
||
| 1906 | * <?php |
||
| 1907 | * $I->submitForm('#my-form', [ |
||
| 1908 | * 'field1' => 'value', |
||
| 1909 | * 'checkbox' => [ |
||
| 1910 | * 'value of first checkbox', |
||
| 1911 | * 'value of second checkbox', |
||
| 1912 | * ], |
||
| 1913 | * 'otherCheckboxes' => [ |
||
| 1914 | * true, |
||
| 1915 | * false, |
||
| 1916 | * false |
||
| 1917 | * ], |
||
| 1918 | * 'multiselect' => [ |
||
| 1919 | * 'first option value', |
||
| 1920 | * 'second option value' |
||
| 1921 | * ] |
||
| 1922 | * ]); |
||
| 1923 | * ``` |
||
| 1924 | * |
||
| 1925 | * Mixing string and boolean values for a checkbox's value is not supported |
||
| 1926 | * and may produce unexpected results. |
||
| 1927 | * |
||
| 1928 | * Field names ending in `[]` must be passed without the trailing square |
||
| 1929 | * bracket characters, and must contain an array for its value. This allows |
||
| 1930 | * submitting multiple values with the same name, consider: |
||
| 1931 | * |
||
| 1932 | * ```php |
||
| 1933 | * <?php |
||
| 1934 | * // This will NOT work correctly |
||
| 1935 | * $I->submitForm('#my-form', [ |
||
| 1936 | * 'field[]' => 'value', |
||
| 1937 | * 'field[]' => 'another value', // 'field[]' is already a defined key |
||
| 1938 | * ]); |
||
| 1939 | * ``` |
||
| 1940 | * |
||
| 1941 | * The solution is to pass an array value: |
||
| 1942 | * |
||
| 1943 | * ```php |
||
| 1944 | * <?php |
||
| 1945 | * // This way both values are submitted |
||
| 1946 | * $I->submitForm('#my-form', [ |
||
| 1947 | * 'field' => [ |
||
| 1948 | * 'value', |
||
| 1949 | * 'another value', |
||
| 1950 | * ] |
||
| 1951 | * ]); |
||
| 1952 | * ``` |
||
| 1953 | * @see \Codeception\Lib\InnerBrowser::submitForm() |
||
| 1954 | */ |
||
| 1955 | public function submitForm($selector, array $params, ?string $button = NULL): void { |
||
| 1956 | $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); |
||
| 1957 | } |
||
| 1958 | |||
| 1959 | |||
| 1960 | /** |
||
| 1961 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1962 | * |
||
| 1963 | * Fills a text field or textarea with the given string. |
||
| 1964 | * |
||
| 1965 | * ``` php |
||
| 1966 | * <?php |
||
| 1967 | * $I->fillField("//input[@type='text']", "Hello World!"); |
||
| 1968 | * $I->fillField(['name' => 'email'], '[email protected]'); |
||
| 1969 | * ``` |
||
| 1970 | * @see \Codeception\Lib\InnerBrowser::fillField() |
||
| 1971 | */ |
||
| 1972 | public function fillField($field, $value): void { |
||
| 1973 | $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); |
||
| 1974 | } |
||
| 1975 | |||
| 1976 | |||
| 1977 | /** |
||
| 1978 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 1979 | * |
||
| 1980 | * Selects an option in a select tag or in radio button group. |
||
| 1981 | * |
||
| 1982 | * ``` php |
||
| 1983 | * <?php |
||
| 1984 | * $I->selectOption('form select[name=account]', 'Premium'); |
||
| 1985 | * $I->selectOption('form input[name=payment]', 'Monthly'); |
||
| 1986 | * $I->selectOption('//form/select[@name=account]', 'Monthly'); |
||
| 1987 | * ``` |
||
| 1988 | * |
||
| 1989 | * Provide an array for the second argument to select multiple options: |
||
| 1990 | * |
||
| 1991 | * ``` php |
||
| 1992 | * <?php |
||
| 1993 | * $I->selectOption('Which OS do you use?', array('Windows','Linux')); |
||
| 1994 | * ``` |
||
| 1995 | * |
||
| 1996 | * Or provide an associative array for the second argument to specifically define which selection method should be used: |
||
| 1997 | * |
||
| 1998 | * ``` php |
||
| 1999 | * <?php |
||
| 2000 | * $I->selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows' |
||
| 2001 | * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows' |
||
| 2002 | * ``` |
||
| 2003 | * @see \Codeception\Lib\InnerBrowser::selectOption() |
||
| 2004 | */ |
||
| 2005 | public function selectOption($select, $option): void { |
||
| 2006 | $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); |
||
| 2007 | } |
||
| 2008 | |||
| 2009 | |||
| 2010 | /** |
||
| 2011 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2012 | * |
||
| 2013 | * Ticks a checkbox. For radio buttons, use the `selectOption` method instead. |
||
| 2014 | * |
||
| 2015 | * ``` php |
||
| 2016 | * <?php |
||
| 2017 | * $I->checkOption('#agree'); |
||
| 2018 | * ``` |
||
| 2019 | * @see \Codeception\Lib\InnerBrowser::checkOption() |
||
| 2020 | */ |
||
| 2021 | public function checkOption($option): void { |
||
| 2022 | $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); |
||
| 2023 | } |
||
| 2024 | |||
| 2025 | |||
| 2026 | /** |
||
| 2027 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2028 | * |
||
| 2029 | * Unticks a checkbox. |
||
| 2030 | * |
||
| 2031 | * ``` php |
||
| 2032 | * <?php |
||
| 2033 | * $I->uncheckOption('#notify'); |
||
| 2034 | * ``` |
||
| 2035 | * @see \Codeception\Lib\InnerBrowser::uncheckOption() |
||
| 2036 | */ |
||
| 2037 | public function uncheckOption($option): void { |
||
| 2038 | $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); |
||
| 2039 | } |
||
| 2040 | |||
| 2041 | |||
| 2042 | /** |
||
| 2043 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2044 | * |
||
| 2045 | * Attaches a file relative to the Codeception `_data` directory to the given file upload field. |
||
| 2046 | * |
||
| 2047 | * ``` php |
||
| 2048 | * <?php |
||
| 2049 | * // file is stored in 'tests/_data/prices.xls' |
||
| 2050 | * $I->attachFile('input[@type="file"]', 'prices.xls'); |
||
| 2051 | * ``` |
||
| 2052 | * @see \Codeception\Lib\InnerBrowser::attachFile() |
||
| 2053 | */ |
||
| 2054 | public function attachFile($field, string $filename): void { |
||
| 2055 | $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); |
||
| 2056 | } |
||
| 2057 | |||
| 2058 | |||
| 2059 | /** |
||
| 2060 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2061 | * |
||
| 2062 | * Sends an ajax GET request with the passed parameters. |
||
| 2063 | * See `sendAjaxPostRequest()` |
||
| 2064 | * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() |
||
| 2065 | */ |
||
| 2066 | public function sendAjaxGetRequest(string $uri, array $params = []): void { |
||
| 2067 | $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); |
||
| 2068 | } |
||
| 2069 | |||
| 2070 | |||
| 2071 | /** |
||
| 2072 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2073 | * |
||
| 2074 | * Sends an ajax POST request with the passed parameters. |
||
| 2075 | * The appropriate HTTP header is added automatically: |
||
| 2076 | * `X-Requested-With: XMLHttpRequest` |
||
| 2077 | * Example: |
||
| 2078 | * ``` php |
||
| 2079 | * <?php |
||
| 2080 | * $I->sendAjaxPostRequest('/add-task', ['task' => 'lorem ipsum']); |
||
| 2081 | * ``` |
||
| 2082 | * Some frameworks (e.g. Symfony) create field names in the form of an "array": |
||
| 2083 | * `<input type="text" name="form[task]">` |
||
| 2084 | * In this case you need to pass the fields like this: |
||
| 2085 | * ``` php |
||
| 2086 | * <?php |
||
| 2087 | * $I->sendAjaxPostRequest('/add-task', ['form' => [ |
||
| 2088 | * 'task' => 'lorem ipsum', |
||
| 2089 | * 'category' => 'miscellaneous', |
||
| 2090 | * ]]); |
||
| 2091 | * ``` |
||
| 2092 | * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() |
||
| 2093 | */ |
||
| 2094 | public function sendAjaxPostRequest(string $uri, array $params = []): void { |
||
| 2095 | $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); |
||
| 2096 | } |
||
| 2097 | |||
| 2098 | |||
| 2099 | /** |
||
| 2100 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2101 | * |
||
| 2102 | * Sends an ajax request, using the passed HTTP method. |
||
| 2103 | * See `sendAjaxPostRequest()` |
||
| 2104 | * Example: |
||
| 2105 | * ``` php |
||
| 2106 | * <?php |
||
| 2107 | * $I->sendAjaxRequest('PUT', '/posts/7', ['title' => 'new title']); |
||
| 2108 | * ``` |
||
| 2109 | * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() |
||
| 2110 | */ |
||
| 2111 | public function sendAjaxRequest(string $method, string $uri, array $params = []): void { |
||
| 2112 | $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); |
||
| 2113 | } |
||
| 2114 | |||
| 2115 | |||
| 2116 | /** |
||
| 2117 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2118 | * |
||
| 2119 | * Use this method within an [interactive pause](https://codeception.com/docs/02-GettingStarted#Interactive-Pause) to save the HTML source code of the current page. |
||
| 2120 | * |
||
| 2121 | * ```php |
||
| 2122 | * <?php |
||
| 2123 | * $I->makeHtmlSnapshot('edit_page'); |
||
| 2124 | * // saved to: tests/_output/debug/edit_page.html |
||
| 2125 | * $I->makeHtmlSnapshot(); |
||
| 2126 | * // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html |
||
| 2127 | * ``` |
||
| 2128 | * @see \Codeception\Lib\InnerBrowser::makeHtmlSnapshot() |
||
| 2129 | */ |
||
| 2130 | public function makeHtmlSnapshot(?string $name = NULL): void { |
||
| 2131 | $this->getScenario()->runStep(new \Codeception\Step\Action('makeHtmlSnapshot', func_get_args())); |
||
| 2132 | } |
||
| 2133 | |||
| 2134 | |||
| 2135 | /** |
||
| 2136 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2137 | * |
||
| 2138 | * Finds and returns the text contents of the given element. |
||
| 2139 | * If a fuzzy locator is used, the element is found using CSS, XPath, |
||
| 2140 | * and by matching the full page source by regular expression. |
||
| 2141 | * |
||
| 2142 | * ``` php |
||
| 2143 | * <?php |
||
| 2144 | * $heading = $I->grabTextFrom('h1'); |
||
| 2145 | * $heading = $I->grabTextFrom('descendant-or-self::h1'); |
||
| 2146 | * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex |
||
| 2147 | * ``` |
||
| 2148 | * @see \Codeception\Lib\InnerBrowser::grabTextFrom() |
||
| 2149 | */ |
||
| 2150 | public function grabTextFrom($cssOrXPathOrRegex): mixed { |
||
| 2151 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); |
||
| 2152 | } |
||
| 2153 | |||
| 2154 | |||
| 2155 | /** |
||
| 2156 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2157 | * |
||
| 2158 | * Grabs the value of the given attribute value from the given element. |
||
| 2159 | * Fails if element is not found. |
||
| 2160 | * |
||
| 2161 | * ``` php |
||
| 2162 | * <?php |
||
| 2163 | * $I->grabAttributeFrom('#tooltip', 'title'); |
||
| 2164 | * ``` |
||
| 2165 | * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() |
||
| 2166 | */ |
||
| 2167 | public function grabAttributeFrom($cssOrXpath, string $attribute): mixed { |
||
| 2168 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); |
||
| 2169 | } |
||
| 2170 | |||
| 2171 | |||
| 2172 | /** |
||
| 2173 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2174 | * |
||
| 2175 | * Grabs either the text content, or attribute values, of nodes |
||
| 2176 | * matched by $cssOrXpath and returns them as an array. |
||
| 2177 | * |
||
| 2178 | * ```html |
||
| 2179 | * <a href="#first">First</a> |
||
| 2180 | * <a href="#second">Second</a> |
||
| 2181 | * <a href="#third">Third</a> |
||
| 2182 | * ``` |
||
| 2183 | * |
||
| 2184 | * ```php |
||
| 2185 | * <?php |
||
| 2186 | * // would return ['First', 'Second', 'Third'] |
||
| 2187 | * $aLinkText = $I->grabMultiple('a'); |
||
| 2188 | * |
||
| 2189 | * // would return ['#first', '#second', '#third'] |
||
| 2190 | * $aLinks = $I->grabMultiple('a', 'href'); |
||
| 2191 | * ``` |
||
| 2192 | * |
||
| 2193 | * @return string[] |
||
| 2194 | * @see \Codeception\Lib\InnerBrowser::grabMultiple() |
||
| 2195 | */ |
||
| 2196 | public function grabMultiple($cssOrXpath, ?string $attribute = NULL): array { |
||
| 2197 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); |
||
| 2198 | } |
||
| 2199 | |||
| 2200 | |||
| 2201 | /** |
||
| 2202 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2203 | * |
||
| 2204 | * Finds the value for the given form field. |
||
| 2205 | * If a fuzzy locator is used, the field is found by field name, CSS, and XPath. |
||
| 2206 | * |
||
| 2207 | * ``` php |
||
| 2208 | * <?php |
||
| 2209 | * $name = $I->grabValueFrom('Name'); |
||
| 2210 | * $name = $I->grabValueFrom('input[name=username]'); |
||
| 2211 | * $name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']'); |
||
| 2212 | * $name = $I->grabValueFrom(['name' => 'username']); |
||
| 2213 | * ``` |
||
| 2214 | * @see \Codeception\Lib\InnerBrowser::grabValueFrom() |
||
| 2215 | */ |
||
| 2216 | public function grabValueFrom($field): mixed { |
||
| 2217 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); |
||
| 2218 | } |
||
| 2219 | |||
| 2220 | |||
| 2221 | /** |
||
| 2222 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2223 | * |
||
| 2224 | * Grabs a cookie value. |
||
| 2225 | * You can set additional cookie params like `domain`, `path` in array passed as last argument. |
||
| 2226 | * If the cookie is set by an ajax request (XMLHttpRequest), there might be some delay caused by the browser, so try `$I->wait(0.1)`. |
||
| 2227 | * @see \Codeception\Lib\InnerBrowser::grabCookie() |
||
| 2228 | */ |
||
| 2229 | public function grabCookie(string $cookie, array $params = []): mixed { |
||
| 2230 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); |
||
| 2231 | } |
||
| 2232 | |||
| 2233 | |||
| 2234 | /** |
||
| 2235 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2236 | * |
||
| 2237 | * Grabs current page source code. |
||
| 2238 | * |
||
| 2239 | * @throws ModuleException if no page was opened. |
||
| 2240 | * @return string Current page source code. |
||
| 2241 | * @see \Codeception\Lib\InnerBrowser::grabPageSource() |
||
| 2242 | */ |
||
| 2243 | public function grabPageSource(): string { |
||
| 2244 | return $this->getScenario()->runStep(new \Codeception\Step\Action('grabPageSource', func_get_args())); |
||
| 2245 | } |
||
| 2246 | |||
| 2247 | |||
| 2248 | /** |
||
| 2249 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2250 | * |
||
| 2251 | * Checks that a cookie with the given name is set. |
||
| 2252 | * You can set additional cookie params like `domain`, `path` as array passed in last argument. |
||
| 2253 | * |
||
| 2254 | * ``` php |
||
| 2255 | * <?php |
||
| 2256 | * $I->seeCookie('PHPSESSID'); |
||
| 2257 | * ``` |
||
| 2258 | * |
||
| 2259 | * @return mixed|void |
||
| 2260 | * @see \Codeception\Lib\InnerBrowser::seeCookie() |
||
| 2261 | */ |
||
| 2262 | public function seeCookie($cookie, $params = []) { |
||
| 2263 | return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); |
||
| 2264 | } |
||
| 2265 | /** |
||
| 2266 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2267 | * |
||
| 2268 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2269 | * Checks that a cookie with the given name is set. |
||
| 2270 | * You can set additional cookie params like `domain`, `path` as array passed in last argument. |
||
| 2271 | * |
||
| 2272 | * ``` php |
||
| 2273 | * <?php |
||
| 2274 | * $I->seeCookie('PHPSESSID'); |
||
| 2275 | * ``` |
||
| 2276 | * |
||
| 2277 | * @return mixed|void |
||
| 2278 | * @see \Codeception\Lib\InnerBrowser::seeCookie() |
||
| 2279 | */ |
||
| 2280 | public function canSeeCookie($cookie, $params = []) { |
||
| 2281 | return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); |
||
| 2282 | } |
||
| 2283 | |||
| 2284 | |||
| 2285 | /** |
||
| 2286 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2287 | * |
||
| 2288 | * Checks that there isn't a cookie with the given name. |
||
| 2289 | * You can set additional cookie params like `domain`, `path` as array passed in last argument. |
||
| 2290 | * |
||
| 2291 | * @return mixed|void |
||
| 2292 | * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() |
||
| 2293 | */ |
||
| 2294 | public function dontSeeCookie($cookie, $params = []) { |
||
| 2295 | return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCookie', func_get_args())); |
||
| 2296 | } |
||
| 2297 | /** |
||
| 2298 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2299 | * |
||
| 2300 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2301 | * Checks that there isn't a cookie with the given name. |
||
| 2302 | * You can set additional cookie params like `domain`, `path` as array passed in last argument. |
||
| 2303 | * |
||
| 2304 | * @return mixed|void |
||
| 2305 | * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() |
||
| 2306 | */ |
||
| 2307 | public function cantSeeCookie($cookie, $params = []) { |
||
| 2308 | return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); |
||
| 2309 | } |
||
| 2310 | |||
| 2311 | |||
| 2312 | /** |
||
| 2313 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2314 | * |
||
| 2315 | * Unsets cookie with the given name. |
||
| 2316 | * You can set additional cookie params like `domain`, `path` in array passed as last argument. |
||
| 2317 | * |
||
| 2318 | * @return mixed|void |
||
| 2319 | * @see \Codeception\Lib\InnerBrowser::resetCookie() |
||
| 2320 | */ |
||
| 2321 | public function resetCookie($cookie, $params = []) { |
||
| 2322 | return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); |
||
| 2323 | } |
||
| 2324 | |||
| 2325 | |||
| 2326 | /** |
||
| 2327 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2328 | * |
||
| 2329 | * Checks that the given element exists on the page and is visible. |
||
| 2330 | * You can also specify expected attributes of this element. |
||
| 2331 | * |
||
| 2332 | * ``` php |
||
| 2333 | * <?php |
||
| 2334 | * $I->seeElement('.error'); |
||
| 2335 | * $I->seeElement('//form/input[1]'); |
||
| 2336 | * $I->seeElement('input', ['name' => 'login']); |
||
| 2337 | * $I->seeElement('input', ['value' => '123456']); |
||
| 2338 | * |
||
| 2339 | * // strict locator in first arg, attributes in second |
||
| 2340 | * $I->seeElement(['css' => 'form input'], ['name' => 'login']); |
||
| 2341 | * ``` |
||
| 2342 | * @see \Codeception\Lib\InnerBrowser::seeElement() |
||
| 2343 | */ |
||
| 2344 | public function seeElement($selector, array $attributes = []): void { |
||
| 2345 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); |
||
| 2346 | } |
||
| 2347 | /** |
||
| 2348 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2349 | * |
||
| 2350 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2351 | * Checks that the given element exists on the page and is visible. |
||
| 2352 | * You can also specify expected attributes of this element. |
||
| 2353 | * |
||
| 2354 | * ``` php |
||
| 2355 | * <?php |
||
| 2356 | * $I->seeElement('.error'); |
||
| 2357 | * $I->seeElement('//form/input[1]'); |
||
| 2358 | * $I->seeElement('input', ['name' => 'login']); |
||
| 2359 | * $I->seeElement('input', ['value' => '123456']); |
||
| 2360 | * |
||
| 2361 | * // strict locator in first arg, attributes in second |
||
| 2362 | * $I->seeElement(['css' => 'form input'], ['name' => 'login']); |
||
| 2363 | * ``` |
||
| 2364 | * @see \Codeception\Lib\InnerBrowser::seeElement() |
||
| 2365 | */ |
||
| 2366 | public function canSeeElement($selector, array $attributes = []): void { |
||
| 2367 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); |
||
| 2368 | } |
||
| 2369 | |||
| 2370 | |||
| 2371 | /** |
||
| 2372 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2373 | * |
||
| 2374 | * Checks that the given element is invisible or not present on the page. |
||
| 2375 | * You can also specify expected attributes of this element. |
||
| 2376 | * |
||
| 2377 | * ``` php |
||
| 2378 | * <?php |
||
| 2379 | * $I->dontSeeElement('.error'); |
||
| 2380 | * $I->dontSeeElement('//form/input[1]'); |
||
| 2381 | * $I->dontSeeElement('input', ['name' => 'login']); |
||
| 2382 | * $I->dontSeeElement('input', ['value' => '123456']); |
||
| 2383 | * ``` |
||
| 2384 | * @see \Codeception\Lib\InnerBrowser::dontSeeElement() |
||
| 2385 | */ |
||
| 2386 | public function dontSeeElement($selector, array $attributes = []): void { |
||
| 2387 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeElement', func_get_args())); |
||
| 2388 | } |
||
| 2389 | /** |
||
| 2390 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2391 | * |
||
| 2392 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2393 | * Checks that the given element is invisible or not present on the page. |
||
| 2394 | * You can also specify expected attributes of this element. |
||
| 2395 | * |
||
| 2396 | * ``` php |
||
| 2397 | * <?php |
||
| 2398 | * $I->dontSeeElement('.error'); |
||
| 2399 | * $I->dontSeeElement('//form/input[1]'); |
||
| 2400 | * $I->dontSeeElement('input', ['name' => 'login']); |
||
| 2401 | * $I->dontSeeElement('input', ['value' => '123456']); |
||
| 2402 | * ``` |
||
| 2403 | * @see \Codeception\Lib\InnerBrowser::dontSeeElement() |
||
| 2404 | */ |
||
| 2405 | public function cantSeeElement($selector, array $attributes = []): void { |
||
| 2406 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); |
||
| 2407 | } |
||
| 2408 | |||
| 2409 | |||
| 2410 | /** |
||
| 2411 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2412 | * |
||
| 2413 | * Checks that there are a certain number of elements matched by the given locator on the page. |
||
| 2414 | * |
||
| 2415 | * ``` php |
||
| 2416 | * <?php |
||
| 2417 | * $I->seeNumberOfElements('tr', 10); |
||
| 2418 | * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements |
||
| 2419 | * ``` |
||
| 2420 | * |
||
| 2421 | * @param int|int[] $expected |
||
| 2422 | * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() |
||
| 2423 | */ |
||
| 2424 | public function seeNumberOfElements($selector, $expected): void { |
||
| 2425 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); |
||
| 2426 | } |
||
| 2427 | /** |
||
| 2428 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2429 | * |
||
| 2430 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2431 | * Checks that there are a certain number of elements matched by the given locator on the page. |
||
| 2432 | * |
||
| 2433 | * ``` php |
||
| 2434 | * <?php |
||
| 2435 | * $I->seeNumberOfElements('tr', 10); |
||
| 2436 | * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements |
||
| 2437 | * ``` |
||
| 2438 | * |
||
| 2439 | * @param int|int[] $expected |
||
| 2440 | * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() |
||
| 2441 | */ |
||
| 2442 | public function canSeeNumberOfElements($selector, $expected): void { |
||
| 2443 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); |
||
| 2444 | } |
||
| 2445 | |||
| 2446 | |||
| 2447 | /** |
||
| 2448 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2449 | * |
||
| 2450 | * Checks that the given option is selected. |
||
| 2451 | * |
||
| 2452 | * ``` php |
||
| 2453 | * <?php |
||
| 2454 | * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa'); |
||
| 2455 | * ``` |
||
| 2456 | * |
||
| 2457 | * @return mixed|void |
||
| 2458 | * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() |
||
| 2459 | */ |
||
| 2460 | public function seeOptionIsSelected($selector, $optionText) { |
||
| 2461 | return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); |
||
| 2462 | } |
||
| 2463 | /** |
||
| 2464 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2465 | * |
||
| 2466 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2467 | * Checks that the given option is selected. |
||
| 2468 | * |
||
| 2469 | * ``` php |
||
| 2470 | * <?php |
||
| 2471 | * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa'); |
||
| 2472 | * ``` |
||
| 2473 | * |
||
| 2474 | * @return mixed|void |
||
| 2475 | * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() |
||
| 2476 | */ |
||
| 2477 | public function canSeeOptionIsSelected($selector, $optionText) { |
||
| 2478 | return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); |
||
| 2479 | } |
||
| 2480 | |||
| 2481 | |||
| 2482 | /** |
||
| 2483 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2484 | * |
||
| 2485 | * Checks that the given option is not selected. |
||
| 2486 | * |
||
| 2487 | * ``` php |
||
| 2488 | * <?php |
||
| 2489 | * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); |
||
| 2490 | * ``` |
||
| 2491 | * |
||
| 2492 | * @return mixed|void |
||
| 2493 | * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() |
||
| 2494 | */ |
||
| 2495 | public function dontSeeOptionIsSelected($selector, $optionText) { |
||
| 2496 | return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeOptionIsSelected', func_get_args())); |
||
| 2497 | } |
||
| 2498 | /** |
||
| 2499 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2500 | * |
||
| 2501 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2502 | * Checks that the given option is not selected. |
||
| 2503 | * |
||
| 2504 | * ``` php |
||
| 2505 | * <?php |
||
| 2506 | * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); |
||
| 2507 | * ``` |
||
| 2508 | * |
||
| 2509 | * @return mixed|void |
||
| 2510 | * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() |
||
| 2511 | */ |
||
| 2512 | public function cantSeeOptionIsSelected($selector, $optionText) { |
||
| 2513 | return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); |
||
| 2514 | } |
||
| 2515 | |||
| 2516 | |||
| 2517 | /** |
||
| 2518 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2519 | * |
||
| 2520 | * Asserts that current page has 404 response status code. |
||
| 2521 | * @see \Codeception\Lib\InnerBrowser::seePageNotFound() |
||
| 2522 | */ |
||
| 2523 | public function seePageNotFound(): void { |
||
| 2524 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); |
||
| 2525 | } |
||
| 2526 | /** |
||
| 2527 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2528 | * |
||
| 2529 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2530 | * Asserts that current page has 404 response status code. |
||
| 2531 | * @see \Codeception\Lib\InnerBrowser::seePageNotFound() |
||
| 2532 | */ |
||
| 2533 | public function canSeePageNotFound(): void { |
||
| 2534 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); |
||
| 2535 | } |
||
| 2536 | |||
| 2537 | |||
| 2538 | /** |
||
| 2539 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2540 | * |
||
| 2541 | * Checks that response code is equal to value provided. |
||
| 2542 | * |
||
| 2543 | * ```php |
||
| 2544 | * <?php |
||
| 2545 | * $I->seeResponseCodeIs(200); |
||
| 2546 | * |
||
| 2547 | * // recommended \Codeception\Util\HttpCode |
||
| 2548 | * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK); |
||
| 2549 | * ``` |
||
| 2550 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() |
||
| 2551 | */ |
||
| 2552 | public function seeResponseCodeIs(int $code): void { |
||
| 2553 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); |
||
| 2554 | } |
||
| 2555 | /** |
||
| 2556 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2557 | * |
||
| 2558 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2559 | * Checks that response code is equal to value provided. |
||
| 2560 | * |
||
| 2561 | * ```php |
||
| 2562 | * <?php |
||
| 2563 | * $I->seeResponseCodeIs(200); |
||
| 2564 | * |
||
| 2565 | * // recommended \Codeception\Util\HttpCode |
||
| 2566 | * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK); |
||
| 2567 | * ``` |
||
| 2568 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() |
||
| 2569 | */ |
||
| 2570 | public function canSeeResponseCodeIs(int $code): void { |
||
| 2571 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); |
||
| 2572 | } |
||
| 2573 | |||
| 2574 | |||
| 2575 | /** |
||
| 2576 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2577 | * |
||
| 2578 | * Checks that response code is between a certain range. Between actually means [from <= CODE <= to] |
||
| 2579 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsBetween() |
||
| 2580 | */ |
||
| 2581 | public function seeResponseCodeIsBetween(int $from, int $to): void { |
||
| 2582 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsBetween', func_get_args())); |
||
| 2583 | } |
||
| 2584 | /** |
||
| 2585 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2586 | * |
||
| 2587 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2588 | * Checks that response code is between a certain range. Between actually means [from <= CODE <= to] |
||
| 2589 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsBetween() |
||
| 2590 | */ |
||
| 2591 | public function canSeeResponseCodeIsBetween(int $from, int $to): void { |
||
| 2592 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsBetween', func_get_args())); |
||
| 2593 | } |
||
| 2594 | |||
| 2595 | |||
| 2596 | /** |
||
| 2597 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2598 | * |
||
| 2599 | * Checks that response code is equal to value provided. |
||
| 2600 | * |
||
| 2601 | * ```php |
||
| 2602 | * <?php |
||
| 2603 | * $I->dontSeeResponseCodeIs(200); |
||
| 2604 | * |
||
| 2605 | * // recommended \Codeception\Util\HttpCode |
||
| 2606 | * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK); |
||
| 2607 | * ``` |
||
| 2608 | * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs() |
||
| 2609 | */ |
||
| 2610 | public function dontSeeResponseCodeIs(int $code): void { |
||
| 2611 | $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeResponseCodeIs', func_get_args())); |
||
| 2612 | } |
||
| 2613 | /** |
||
| 2614 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2615 | * |
||
| 2616 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2617 | * Checks that response code is equal to value provided. |
||
| 2618 | * |
||
| 2619 | * ```php |
||
| 2620 | * <?php |
||
| 2621 | * $I->dontSeeResponseCodeIs(200); |
||
| 2622 | * |
||
| 2623 | * // recommended \Codeception\Util\HttpCode |
||
| 2624 | * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK); |
||
| 2625 | * ``` |
||
| 2626 | * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs() |
||
| 2627 | */ |
||
| 2628 | public function cantSeeResponseCodeIs(int $code): void { |
||
| 2629 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeResponseCodeIs', func_get_args())); |
||
| 2630 | } |
||
| 2631 | |||
| 2632 | |||
| 2633 | /** |
||
| 2634 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2635 | * |
||
| 2636 | * Checks that the response code 2xx |
||
| 2637 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsSuccessful() |
||
| 2638 | */ |
||
| 2639 | public function seeResponseCodeIsSuccessful(): void { |
||
| 2640 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsSuccessful', func_get_args())); |
||
| 2641 | } |
||
| 2642 | /** |
||
| 2643 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2644 | * |
||
| 2645 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2646 | * Checks that the response code 2xx |
||
| 2647 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsSuccessful() |
||
| 2648 | */ |
||
| 2649 | public function canSeeResponseCodeIsSuccessful(): void { |
||
| 2650 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsSuccessful', func_get_args())); |
||
| 2651 | } |
||
| 2652 | |||
| 2653 | |||
| 2654 | /** |
||
| 2655 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2656 | * |
||
| 2657 | * Checks that the response code 3xx |
||
| 2658 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsRedirection() |
||
| 2659 | */ |
||
| 2660 | public function seeResponseCodeIsRedirection(): void { |
||
| 2661 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsRedirection', func_get_args())); |
||
| 2662 | } |
||
| 2663 | /** |
||
| 2664 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2665 | * |
||
| 2666 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2667 | * Checks that the response code 3xx |
||
| 2668 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsRedirection() |
||
| 2669 | */ |
||
| 2670 | public function canSeeResponseCodeIsRedirection(): void { |
||
| 2671 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsRedirection', func_get_args())); |
||
| 2672 | } |
||
| 2673 | |||
| 2674 | |||
| 2675 | /** |
||
| 2676 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2677 | * |
||
| 2678 | * Checks that the response code is 4xx |
||
| 2679 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsClientError() |
||
| 2680 | */ |
||
| 2681 | public function seeResponseCodeIsClientError(): void { |
||
| 2682 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsClientError', func_get_args())); |
||
| 2683 | } |
||
| 2684 | /** |
||
| 2685 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2686 | * |
||
| 2687 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2688 | * Checks that the response code is 4xx |
||
| 2689 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsClientError() |
||
| 2690 | */ |
||
| 2691 | public function canSeeResponseCodeIsClientError(): void { |
||
| 2692 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsClientError', func_get_args())); |
||
| 2693 | } |
||
| 2694 | |||
| 2695 | |||
| 2696 | /** |
||
| 2697 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2698 | * |
||
| 2699 | * Checks that the response code is 5xx |
||
| 2700 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsServerError() |
||
| 2701 | */ |
||
| 2702 | public function seeResponseCodeIsServerError(): void { |
||
| 2703 | $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsServerError', func_get_args())); |
||
| 2704 | } |
||
| 2705 | /** |
||
| 2706 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2707 | * |
||
| 2708 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2709 | * Checks that the response code is 5xx |
||
| 2710 | * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsServerError() |
||
| 2711 | */ |
||
| 2712 | public function canSeeResponseCodeIsServerError(): void { |
||
| 2713 | $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsServerError', func_get_args())); |
||
| 2714 | } |
||
| 2715 | |||
| 2716 | |||
| 2717 | /** |
||
| 2718 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2719 | * |
||
| 2720 | * Checks that the page title contains the given string. |
||
| 2721 | * |
||
| 2722 | * ``` php |
||
| 2723 | * <?php |
||
| 2724 | * $I->seeInTitle('Blog - Post #1'); |
||
| 2725 | * ``` |
||
| 2726 | * |
||
| 2727 | * @return mixed|void |
||
| 2728 | * @see \Codeception\Lib\InnerBrowser::seeInTitle() |
||
| 2729 | */ |
||
| 2730 | public function seeInTitle($title) { |
||
| 2731 | return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); |
||
| 2732 | } |
||
| 2733 | /** |
||
| 2734 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2735 | * |
||
| 2736 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2737 | * Checks that the page title contains the given string. |
||
| 2738 | * |
||
| 2739 | * ``` php |
||
| 2740 | * <?php |
||
| 2741 | * $I->seeInTitle('Blog - Post #1'); |
||
| 2742 | * ``` |
||
| 2743 | * |
||
| 2744 | * @return mixed|void |
||
| 2745 | * @see \Codeception\Lib\InnerBrowser::seeInTitle() |
||
| 2746 | */ |
||
| 2747 | public function canSeeInTitle($title) { |
||
| 2748 | return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); |
||
| 2749 | } |
||
| 2750 | |||
| 2751 | |||
| 2752 | /** |
||
| 2753 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2754 | * |
||
| 2755 | * Checks that the page title does not contain the given string. |
||
| 2756 | * |
||
| 2757 | * @return mixed|void |
||
| 2758 | * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() |
||
| 2759 | */ |
||
| 2760 | public function dontSeeInTitle($title) { |
||
| 2761 | return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInTitle', func_get_args())); |
||
| 2762 | } |
||
| 2763 | /** |
||
| 2764 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2765 | * |
||
| 2766 | * [!] Conditional Assertion: Test won't be stopped on fail |
||
| 2767 | * Checks that the page title does not contain the given string. |
||
| 2768 | * |
||
| 2769 | * @return mixed|void |
||
| 2770 | * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() |
||
| 2771 | */ |
||
| 2772 | public function cantSeeInTitle($title) { |
||
| 2773 | return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); |
||
| 2774 | } |
||
| 2775 | |||
| 2776 | |||
| 2777 | /** |
||
| 2778 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2779 | * |
||
| 2780 | * Switch to iframe or frame on the page. |
||
| 2781 | * |
||
| 2782 | * Example: |
||
| 2783 | * ``` html |
||
| 2784 | * <iframe name="another_frame" src="http://example.com"> |
||
| 2785 | * ``` |
||
| 2786 | * |
||
| 2787 | * ``` php |
||
| 2788 | * <?php |
||
| 2789 | * # switch to iframe |
||
| 2790 | * $I->switchToIframe("another_frame"); |
||
| 2791 | * ``` |
||
| 2792 | * @see \Codeception\Lib\InnerBrowser::switchToIframe() |
||
| 2793 | */ |
||
| 2794 | public function switchToIframe(string $name): void { |
||
| 2795 | $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args())); |
||
| 2796 | } |
||
| 2797 | |||
| 2798 | |||
| 2799 | /** |
||
| 2800 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2801 | * |
||
| 2802 | * Moves back in history. |
||
| 2803 | * |
||
| 2804 | * @param int $numberOfSteps (default value 1) |
||
| 2805 | * @see \Codeception\Lib\InnerBrowser::moveBack() |
||
| 2806 | */ |
||
| 2807 | public function moveBack(int $numberOfSteps = 1): void { |
||
| 2808 | $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args())); |
||
| 2809 | } |
||
| 2810 | |||
| 2811 | |||
| 2812 | /** |
||
| 2813 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2814 | * |
||
| 2815 | * Sets SERVER parameters valid for all next requests. |
||
| 2816 | * this will remove old ones. |
||
| 2817 | * |
||
| 2818 | * ```php |
||
| 2819 | * $I->setServerParameters([]); |
||
| 2820 | * ``` |
||
| 2821 | * @see \Codeception\Lib\InnerBrowser::setServerParameters() |
||
| 2822 | */ |
||
| 2823 | public function setServerParameters(array $params): void { |
||
| 2824 | $this->getScenario()->runStep(new \Codeception\Step\Action('setServerParameters', func_get_args())); |
||
| 2825 | } |
||
| 2826 | |||
| 2827 | |||
| 2828 | /** |
||
| 2829 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2830 | * |
||
| 2831 | * Sets SERVER parameter valid for all next requests. |
||
| 2832 | * |
||
| 2833 | * ```php |
||
| 2834 | * $I->haveServerParameter('name', 'value'); |
||
| 2835 | * ``` |
||
| 2836 | * @see \Codeception\Lib\InnerBrowser::haveServerParameter() |
||
| 2837 | */ |
||
| 2838 | public function haveServerParameter(string $name, string $value): void { |
||
| 2839 | $this->getScenario()->runStep(new \Codeception\Step\Action('haveServerParameter', func_get_args())); |
||
| 2840 | } |
||
| 2841 | |||
| 2842 | |||
| 2843 | /** |
||
| 2844 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2845 | * |
||
| 2846 | * Prevents automatic redirects to be followed by the client. |
||
| 2847 | * |
||
| 2848 | * ```php |
||
| 2849 | * <?php |
||
| 2850 | * $I->stopFollowingRedirects(); |
||
| 2851 | * ``` |
||
| 2852 | * @see \Codeception\Lib\InnerBrowser::stopFollowingRedirects() |
||
| 2853 | */ |
||
| 2854 | public function stopFollowingRedirects(): void { |
||
| 2855 | $this->getScenario()->runStep(new \Codeception\Step\Action('stopFollowingRedirects', func_get_args())); |
||
| 2856 | } |
||
| 2857 | |||
| 2858 | |||
| 2859 | /** |
||
| 2860 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2861 | * |
||
| 2862 | * Enables automatic redirects to be followed by the client. |
||
| 2863 | * |
||
| 2864 | * ```php |
||
| 2865 | * <?php |
||
| 2866 | * $I->startFollowingRedirects(); |
||
| 2867 | * ``` |
||
| 2868 | * @see \Codeception\Lib\InnerBrowser::startFollowingRedirects() |
||
| 2869 | */ |
||
| 2870 | public function startFollowingRedirects(): void { |
||
| 2871 | $this->getScenario()->runStep(new \Codeception\Step\Action('startFollowingRedirects', func_get_args())); |
||
| 2872 | } |
||
| 2873 | |||
| 2874 | |||
| 2875 | /** |
||
| 2876 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2877 | * |
||
| 2878 | * Follow pending redirect if there is one. |
||
| 2879 | * |
||
| 2880 | * ```php |
||
| 2881 | * <?php |
||
| 2882 | * $I->followRedirect(); |
||
| 2883 | * ``` |
||
| 2884 | * @see \Codeception\Lib\InnerBrowser::followRedirect() |
||
| 2885 | */ |
||
| 2886 | public function followRedirect(): void { |
||
| 2887 | $this->getScenario()->runStep(new \Codeception\Step\Action('followRedirect', func_get_args())); |
||
| 2888 | } |
||
| 2889 | |||
| 2890 | |||
| 2891 | /** |
||
| 2892 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2893 | * |
||
| 2894 | * Sets the maximum number of redirects that the Client can follow. |
||
| 2895 | * |
||
| 2896 | * ```php |
||
| 2897 | * <?php |
||
| 2898 | * $I->setMaxRedirects(2); |
||
| 2899 | * ``` |
||
| 2900 | * @see \Codeception\Lib\InnerBrowser::setMaxRedirects() |
||
| 2901 | */ |
||
| 2902 | public function setMaxRedirects(int $maxRedirects): void { |
||
| 2903 | $this->getScenario()->runStep(new \Codeception\Step\Action('setMaxRedirects', func_get_args())); |
||
| 2904 | } |
||
| 2905 | |||
| 2906 | |||
| 2907 | /** |
||
| 2908 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2909 | * |
||
| 2910 | * Handles and checks throwables (Exceptions/Errors) called inside the callback function. |
||
| 2911 | * Either throwable class name or throwable instance should be provided. |
||
| 2912 | * |
||
| 2913 | * ```php |
||
| 2914 | * <?php |
||
| 2915 | * $I->expectThrowable(MyThrowable::class, function() { |
||
| 2916 | * $this->doSomethingBad(); |
||
| 2917 | * }); |
||
| 2918 | * |
||
| 2919 | * $I->expectThrowable(new MyException(), function() { |
||
| 2920 | * $this->doSomethingBad(); |
||
| 2921 | * }); |
||
| 2922 | * ``` |
||
| 2923 | * If you want to check message or throwable code, you can pass them with throwable instance: |
||
| 2924 | * ```php |
||
| 2925 | * <?php |
||
| 2926 | * // will check that throwable MyError is thrown with "Don't do bad things" message |
||
| 2927 | * $I->expectThrowable(new MyError("Don't do bad things"), function() { |
||
| 2928 | * $this->doSomethingBad(); |
||
| 2929 | * }); |
||
| 2930 | * ``` |
||
| 2931 | * |
||
| 2932 | * @param \Throwable|string $throwable |
||
| 2933 | * @see \Codeception\Module\Asserts::expectThrowable() |
||
| 2934 | */ |
||
| 2935 | public function expectThrowable($throwable, callable $callback): void { |
||
| 2936 | $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); |
||
| 2937 | } |
||
| 2938 | |||
| 2939 | |||
| 2940 | /** |
||
| 2941 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2942 | * |
||
| 2943 | * Asserts that a file does not exist. |
||
| 2944 | * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() |
||
| 2945 | */ |
||
| 2946 | public function assertFileNotExists(string $filename, string $message = "") { |
||
| 2947 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); |
||
| 2948 | } |
||
| 2949 | |||
| 2950 | |||
| 2951 | /** |
||
| 2952 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2953 | * |
||
| 2954 | * Asserts that a value is greater than or equal to another value. |
||
| 2955 | * |
||
| 2956 | * @param mixed $expected |
||
| 2957 | * @param mixed $actual |
||
| 2958 | * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() |
||
| 2959 | */ |
||
| 2960 | public function assertGreaterOrEquals($expected, $actual, string $message = "") { |
||
| 2961 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); |
||
| 2962 | } |
||
| 2963 | |||
| 2964 | |||
| 2965 | /** |
||
| 2966 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2967 | * |
||
| 2968 | * Asserts that a variable is empty. |
||
| 2969 | * |
||
| 2970 | * @param mixed $actual |
||
| 2971 | * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() |
||
| 2972 | */ |
||
| 2973 | public function assertIsEmpty($actual, string $message = "") { |
||
| 2974 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); |
||
| 2975 | } |
||
| 2976 | |||
| 2977 | |||
| 2978 | /** |
||
| 2979 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2980 | * |
||
| 2981 | * Asserts that a value is smaller than or equal to another value. |
||
| 2982 | * |
||
| 2983 | * @param mixed $expected |
||
| 2984 | * @param mixed $actual |
||
| 2985 | * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() |
||
| 2986 | */ |
||
| 2987 | public function assertLessOrEquals($expected, $actual, string $message = "") { |
||
| 2988 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); |
||
| 2989 | } |
||
| 2990 | |||
| 2991 | |||
| 2992 | /** |
||
| 2993 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 2994 | * |
||
| 2995 | * Asserts that a string does not match a given regular expression. |
||
| 2996 | * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() |
||
| 2997 | */ |
||
| 2998 | public function assertNotRegExp(string $pattern, string $string, string $message = "") { |
||
| 2999 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); |
||
| 3000 | } |
||
| 3001 | |||
| 3002 | |||
| 3003 | /** |
||
| 3004 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3005 | * |
||
| 3006 | * Asserts that a string matches a given regular expression. |
||
| 3007 | * @see \Codeception\Module\AbstractAsserts::assertRegExp() |
||
| 3008 | */ |
||
| 3009 | public function assertRegExp(string $pattern, string $string, string $message = "") { |
||
| 3010 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); |
||
| 3011 | } |
||
| 3012 | |||
| 3013 | |||
| 3014 | /** |
||
| 3015 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3016 | * |
||
| 3017 | * Evaluates a PHPUnit\Framework\Constraint matcher object. |
||
| 3018 | * |
||
| 3019 | * @param mixed $value |
||
| 3020 | * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() |
||
| 3021 | */ |
||
| 3022 | public function assertThatItsNot($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") { |
||
| 3023 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); |
||
| 3024 | } |
||
| 3025 | |||
| 3026 | |||
| 3027 | /** |
||
| 3028 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3029 | * |
||
| 3030 | * Asserts that an array has a specified key. |
||
| 3031 | * |
||
| 3032 | * @param int|string $key |
||
| 3033 | * @param array|\ArrayAccess $array |
||
| 3034 | * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() |
||
| 3035 | */ |
||
| 3036 | public function assertArrayHasKey($key, $array, string $message = "") { |
||
| 3037 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); |
||
| 3038 | } |
||
| 3039 | |||
| 3040 | |||
| 3041 | /** |
||
| 3042 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3043 | * |
||
| 3044 | * Asserts that an array does not have a specified key. |
||
| 3045 | * |
||
| 3046 | * @param int|string $key |
||
| 3047 | * @param array|\ArrayAccess $array |
||
| 3048 | * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() |
||
| 3049 | */ |
||
| 3050 | public function assertArrayNotHasKey($key, $array, string $message = "") { |
||
| 3051 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); |
||
| 3052 | } |
||
| 3053 | |||
| 3054 | |||
| 3055 | /** |
||
| 3056 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3057 | * |
||
| 3058 | * Asserts that a class has a specified attribute. |
||
| 3059 | * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() |
||
| 3060 | */ |
||
| 3061 | public function assertClassHasAttribute(string $attributeName, string $className, string $message = "") { |
||
| 3062 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); |
||
| 3063 | } |
||
| 3064 | |||
| 3065 | |||
| 3066 | /** |
||
| 3067 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3068 | * |
||
| 3069 | * Asserts that a class has a specified static attribute. |
||
| 3070 | * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() |
||
| 3071 | */ |
||
| 3072 | public function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = "") { |
||
| 3073 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); |
||
| 3074 | } |
||
| 3075 | |||
| 3076 | |||
| 3077 | /** |
||
| 3078 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3079 | * |
||
| 3080 | * Asserts that a class does not have a specified attribute. |
||
| 3081 | * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() |
||
| 3082 | */ |
||
| 3083 | public function assertClassNotHasAttribute(string $attributeName, string $className, string $message = "") { |
||
| 3084 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); |
||
| 3085 | } |
||
| 3086 | |||
| 3087 | |||
| 3088 | /** |
||
| 3089 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3090 | * |
||
| 3091 | * Asserts that a class does not have a specified static attribute. |
||
| 3092 | * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() |
||
| 3093 | */ |
||
| 3094 | public function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = "") { |
||
| 3095 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); |
||
| 3096 | } |
||
| 3097 | |||
| 3098 | |||
| 3099 | /** |
||
| 3100 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3101 | * |
||
| 3102 | * Asserts that a haystack contains a needle. |
||
| 3103 | * |
||
| 3104 | * @param mixed $needle |
||
| 3105 | * @see \Codeception\Module\AbstractAsserts::assertContains() |
||
| 3106 | */ |
||
| 3107 | public function assertContains($needle, iterable $haystack, string $message = "") { |
||
| 3108 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); |
||
| 3109 | } |
||
| 3110 | |||
| 3111 | |||
| 3112 | /** |
||
| 3113 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3114 | * |
||
| 3115 | * @param mixed $needle |
||
| 3116 | * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() |
||
| 3117 | */ |
||
| 3118 | public function assertContainsEquals($needle, iterable $haystack, string $message = "") { |
||
| 3119 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); |
||
| 3120 | } |
||
| 3121 | |||
| 3122 | |||
| 3123 | /** |
||
| 3124 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3125 | * |
||
| 3126 | * Asserts that a haystack contains only values of a given type. |
||
| 3127 | * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() |
||
| 3128 | */ |
||
| 3129 | public function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") { |
||
| 3130 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); |
||
| 3131 | } |
||
| 3132 | |||
| 3133 | |||
| 3134 | /** |
||
| 3135 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3136 | * |
||
| 3137 | * Asserts that a haystack contains only instances of a given class name. |
||
| 3138 | * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() |
||
| 3139 | */ |
||
| 3140 | public function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = "") { |
||
| 3141 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); |
||
| 3142 | } |
||
| 3143 | |||
| 3144 | |||
| 3145 | /** |
||
| 3146 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3147 | * |
||
| 3148 | * Asserts the number of elements of an array, Countable or Traversable. |
||
| 3149 | * |
||
| 3150 | * @param \Countable|iterable $haystack |
||
| 3151 | * @see \Codeception\Module\AbstractAsserts::assertCount() |
||
| 3152 | */ |
||
| 3153 | public function assertCount(int $expectedCount, $haystack, string $message = "") { |
||
| 3154 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); |
||
| 3155 | } |
||
| 3156 | |||
| 3157 | |||
| 3158 | /** |
||
| 3159 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3160 | * |
||
| 3161 | * Asserts that a directory does not exist. |
||
| 3162 | * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() |
||
| 3163 | */ |
||
| 3164 | public function assertDirectoryDoesNotExist(string $directory, string $message = "") { |
||
| 3165 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); |
||
| 3166 | } |
||
| 3167 | |||
| 3168 | |||
| 3169 | /** |
||
| 3170 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3171 | * |
||
| 3172 | * Asserts that a directory exists. |
||
| 3173 | * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() |
||
| 3174 | */ |
||
| 3175 | public function assertDirectoryExists(string $directory, string $message = "") { |
||
| 3176 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); |
||
| 3177 | } |
||
| 3178 | |||
| 3179 | |||
| 3180 | /** |
||
| 3181 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3182 | * |
||
| 3183 | * Asserts that a directory exists and is not readable. |
||
| 3184 | * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() |
||
| 3185 | */ |
||
| 3186 | public function assertDirectoryIsNotReadable(string $directory, string $message = "") { |
||
| 3187 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); |
||
| 3188 | } |
||
| 3189 | |||
| 3190 | |||
| 3191 | /** |
||
| 3192 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3193 | * |
||
| 3194 | * Asserts that a directory exists and is not writable. |
||
| 3195 | * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() |
||
| 3196 | */ |
||
| 3197 | public function assertDirectoryIsNotWritable(string $directory, string $message = "") { |
||
| 3198 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); |
||
| 3199 | } |
||
| 3200 | |||
| 3201 | |||
| 3202 | /** |
||
| 3203 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3204 | * |
||
| 3205 | * Asserts that a directory exists and is readable. |
||
| 3206 | * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() |
||
| 3207 | */ |
||
| 3208 | public function assertDirectoryIsReadable(string $directory, string $message = "") { |
||
| 3209 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); |
||
| 3210 | } |
||
| 3211 | |||
| 3212 | |||
| 3213 | /** |
||
| 3214 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3215 | * |
||
| 3216 | * Asserts that a directory exists and is writable. |
||
| 3217 | * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() |
||
| 3218 | */ |
||
| 3219 | public function assertDirectoryIsWritable(string $directory, string $message = "") { |
||
| 3220 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); |
||
| 3221 | } |
||
| 3222 | |||
| 3223 | |||
| 3224 | /** |
||
| 3225 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3226 | * |
||
| 3227 | * Asserts that a string does not match a given regular expression. |
||
| 3228 | * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() |
||
| 3229 | */ |
||
| 3230 | public function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = "") { |
||
| 3231 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); |
||
| 3232 | } |
||
| 3233 | |||
| 3234 | |||
| 3235 | /** |
||
| 3236 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3237 | * |
||
| 3238 | * Asserts that a variable is empty. |
||
| 3239 | * |
||
| 3240 | * @param mixed $actual |
||
| 3241 | * @see \Codeception\Module\AbstractAsserts::assertEmpty() |
||
| 3242 | */ |
||
| 3243 | public function assertEmpty($actual, string $message = "") { |
||
| 3244 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); |
||
| 3245 | } |
||
| 3246 | |||
| 3247 | |||
| 3248 | /** |
||
| 3249 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3250 | * |
||
| 3251 | * Asserts that two variables are equal. |
||
| 3252 | * |
||
| 3253 | * @param mixed $expected |
||
| 3254 | * @param mixed $actual |
||
| 3255 | * @see \Codeception\Module\AbstractAsserts::assertEquals() |
||
| 3256 | */ |
||
| 3257 | public function assertEquals($expected, $actual, string $message = "") { |
||
| 3258 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); |
||
| 3259 | } |
||
| 3260 | |||
| 3261 | |||
| 3262 | /** |
||
| 3263 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3264 | * |
||
| 3265 | * Asserts that two variables are equal (canonicalizing). |
||
| 3266 | * |
||
| 3267 | * @param mixed $expected |
||
| 3268 | * @param mixed $actual |
||
| 3269 | * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() |
||
| 3270 | */ |
||
| 3271 | public function assertEqualsCanonicalizing($expected, $actual, string $message = "") { |
||
| 3272 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); |
||
| 3273 | } |
||
| 3274 | |||
| 3275 | |||
| 3276 | /** |
||
| 3277 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3278 | * |
||
| 3279 | * Asserts that two variables are equal (ignoring case). |
||
| 3280 | * |
||
| 3281 | * @param mixed $expected |
||
| 3282 | * @param mixed $actual |
||
| 3283 | * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() |
||
| 3284 | */ |
||
| 3285 | public function assertEqualsIgnoringCase($expected, $actual, string $message = "") { |
||
| 3286 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); |
||
| 3287 | } |
||
| 3288 | |||
| 3289 | |||
| 3290 | /** |
||
| 3291 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3292 | * |
||
| 3293 | * Asserts that two variables are equal (with delta). |
||
| 3294 | * |
||
| 3295 | * @param mixed $expected |
||
| 3296 | * @param mixed $actual |
||
| 3297 | * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() |
||
| 3298 | */ |
||
| 3299 | public function assertEqualsWithDelta($expected, $actual, float $delta, string $message = "") { |
||
| 3300 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); |
||
| 3301 | } |
||
| 3302 | |||
| 3303 | |||
| 3304 | /** |
||
| 3305 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3306 | * |
||
| 3307 | * Asserts that a condition is false. |
||
| 3308 | * |
||
| 3309 | * @param mixed $condition |
||
| 3310 | * @see \Codeception\Module\AbstractAsserts::assertFalse() |
||
| 3311 | */ |
||
| 3312 | public function assertFalse($condition, string $message = "") { |
||
| 3313 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); |
||
| 3314 | } |
||
| 3315 | |||
| 3316 | |||
| 3317 | /** |
||
| 3318 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3319 | * |
||
| 3320 | * Asserts that a file does not exist. |
||
| 3321 | * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() |
||
| 3322 | */ |
||
| 3323 | public function assertFileDoesNotExist(string $filename, string $message = "") { |
||
| 3324 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); |
||
| 3325 | } |
||
| 3326 | |||
| 3327 | |||
| 3328 | /** |
||
| 3329 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3330 | * |
||
| 3331 | * Asserts that the contents of one file is equal to the contents of another file. |
||
| 3332 | * @see \Codeception\Module\AbstractAsserts::assertFileEquals() |
||
| 3333 | */ |
||
| 3334 | public function assertFileEquals(string $expected, string $actual, string $message = "") { |
||
| 3335 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); |
||
| 3336 | } |
||
| 3337 | |||
| 3338 | |||
| 3339 | /** |
||
| 3340 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3341 | * |
||
| 3342 | * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). |
||
| 3343 | * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() |
||
| 3344 | */ |
||
| 3345 | public function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = "") { |
||
| 3346 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); |
||
| 3347 | } |
||
| 3348 | |||
| 3349 | |||
| 3350 | /** |
||
| 3351 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3352 | * |
||
| 3353 | * Asserts that the contents of one file is equal to the contents of another file (ignoring case). |
||
| 3354 | * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() |
||
| 3355 | */ |
||
| 3356 | public function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = "") { |
||
| 3357 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); |
||
| 3358 | } |
||
| 3359 | |||
| 3360 | |||
| 3361 | /** |
||
| 3362 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3363 | * |
||
| 3364 | * Asserts that a file exists. |
||
| 3365 | * @see \Codeception\Module\AbstractAsserts::assertFileExists() |
||
| 3366 | */ |
||
| 3367 | public function assertFileExists(string $filename, string $message = "") { |
||
| 3368 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); |
||
| 3369 | } |
||
| 3370 | |||
| 3371 | |||
| 3372 | /** |
||
| 3373 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3374 | * |
||
| 3375 | * Asserts that a file exists and is not readable. |
||
| 3376 | * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() |
||
| 3377 | */ |
||
| 3378 | public function assertFileIsNotReadable(string $file, string $message = "") { |
||
| 3379 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); |
||
| 3380 | } |
||
| 3381 | |||
| 3382 | |||
| 3383 | /** |
||
| 3384 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3385 | * |
||
| 3386 | * Asserts that a file exists and is not writable. |
||
| 3387 | * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() |
||
| 3388 | */ |
||
| 3389 | public function assertFileIsNotWritable(string $file, string $message = "") { |
||
| 3390 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); |
||
| 3391 | } |
||
| 3392 | |||
| 3393 | |||
| 3394 | /** |
||
| 3395 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3396 | * |
||
| 3397 | * Asserts that a file exists and is readable. |
||
| 3398 | * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() |
||
| 3399 | */ |
||
| 3400 | public function assertFileIsReadable(string $file, string $message = "") { |
||
| 3401 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); |
||
| 3402 | } |
||
| 3403 | |||
| 3404 | |||
| 3405 | /** |
||
| 3406 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3407 | * |
||
| 3408 | * Asserts that a file exists and is writable. |
||
| 3409 | * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() |
||
| 3410 | */ |
||
| 3411 | public function assertFileIsWritable(string $file, string $message = "") { |
||
| 3412 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); |
||
| 3413 | } |
||
| 3414 | |||
| 3415 | |||
| 3416 | /** |
||
| 3417 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3418 | * |
||
| 3419 | * Asserts that the contents of one file is not equal to the contents of another file. |
||
| 3420 | * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() |
||
| 3421 | */ |
||
| 3422 | public function assertFileNotEquals(string $expected, string $actual, string $message = "") { |
||
| 3423 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); |
||
| 3424 | } |
||
| 3425 | |||
| 3426 | |||
| 3427 | /** |
||
| 3428 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3429 | * |
||
| 3430 | * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). |
||
| 3431 | * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() |
||
| 3432 | */ |
||
| 3433 | public function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = "") { |
||
| 3434 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); |
||
| 3435 | } |
||
| 3436 | |||
| 3437 | |||
| 3438 | /** |
||
| 3439 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3440 | * |
||
| 3441 | * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). |
||
| 3442 | * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() |
||
| 3443 | */ |
||
| 3444 | public function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = "") { |
||
| 3445 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); |
||
| 3446 | } |
||
| 3447 | |||
| 3448 | |||
| 3449 | /** |
||
| 3450 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3451 | * |
||
| 3452 | * Asserts that a variable is finite. |
||
| 3453 | * |
||
| 3454 | * @param mixed $actual |
||
| 3455 | * @see \Codeception\Module\AbstractAsserts::assertFinite() |
||
| 3456 | */ |
||
| 3457 | public function assertFinite($actual, string $message = "") { |
||
| 3458 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); |
||
| 3459 | } |
||
| 3460 | |||
| 3461 | |||
| 3462 | /** |
||
| 3463 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3464 | * |
||
| 3465 | * Asserts that a value is greater than another value. |
||
| 3466 | * |
||
| 3467 | * @param mixed $expected |
||
| 3468 | * @param mixed $actual |
||
| 3469 | * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() |
||
| 3470 | */ |
||
| 3471 | public function assertGreaterThan($expected, $actual, string $message = "") { |
||
| 3472 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); |
||
| 3473 | } |
||
| 3474 | |||
| 3475 | |||
| 3476 | /** |
||
| 3477 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3478 | * |
||
| 3479 | * Asserts that a value is greater than or equal to another value. |
||
| 3480 | * |
||
| 3481 | * @param mixed $expected |
||
| 3482 | * @param mixed $actual |
||
| 3483 | * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() |
||
| 3484 | */ |
||
| 3485 | public function assertGreaterThanOrEqual($expected, $actual, string $message = "") { |
||
| 3486 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); |
||
| 3487 | } |
||
| 3488 | |||
| 3489 | |||
| 3490 | /** |
||
| 3491 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3492 | * |
||
| 3493 | * Asserts that a variable is infinite. |
||
| 3494 | * |
||
| 3495 | * @param mixed $actual |
||
| 3496 | * @see \Codeception\Module\AbstractAsserts::assertInfinite() |
||
| 3497 | */ |
||
| 3498 | public function assertInfinite($actual, string $message = "") { |
||
| 3499 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); |
||
| 3500 | } |
||
| 3501 | |||
| 3502 | |||
| 3503 | /** |
||
| 3504 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3505 | * |
||
| 3506 | * Asserts that a variable is of a given type. |
||
| 3507 | * |
||
| 3508 | * @param mixed $actual |
||
| 3509 | * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() |
||
| 3510 | */ |
||
| 3511 | public function assertInstanceOf(string $expected, $actual, string $message = "") { |
||
| 3512 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); |
||
| 3513 | } |
||
| 3514 | |||
| 3515 | |||
| 3516 | /** |
||
| 3517 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3518 | * |
||
| 3519 | * Asserts that a variable is of type array. |
||
| 3520 | * |
||
| 3521 | * @param mixed $actual |
||
| 3522 | * @see \Codeception\Module\AbstractAsserts::assertIsArray() |
||
| 3523 | */ |
||
| 3524 | public function assertIsArray($actual, string $message = "") { |
||
| 3525 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); |
||
| 3526 | } |
||
| 3527 | |||
| 3528 | |||
| 3529 | /** |
||
| 3530 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3531 | * |
||
| 3532 | * Asserts that a variable is of type bool. |
||
| 3533 | * |
||
| 3534 | * @param mixed $actual |
||
| 3535 | * @see \Codeception\Module\AbstractAsserts::assertIsBool() |
||
| 3536 | */ |
||
| 3537 | public function assertIsBool($actual, string $message = "") { |
||
| 3538 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); |
||
| 3539 | } |
||
| 3540 | |||
| 3541 | |||
| 3542 | /** |
||
| 3543 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3544 | * |
||
| 3545 | * Asserts that a variable is of type callable. |
||
| 3546 | * |
||
| 3547 | * @param mixed $actual |
||
| 3548 | * @see \Codeception\Module\AbstractAsserts::assertIsCallable() |
||
| 3549 | */ |
||
| 3550 | public function assertIsCallable($actual, string $message = "") { |
||
| 3551 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); |
||
| 3552 | } |
||
| 3553 | |||
| 3554 | |||
| 3555 | /** |
||
| 3556 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3557 | * |
||
| 3558 | * Asserts that a variable is of type resource and is closed. |
||
| 3559 | * |
||
| 3560 | * @param mixed $actual |
||
| 3561 | * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() |
||
| 3562 | */ |
||
| 3563 | public function assertIsClosedResource($actual, string $message = "") { |
||
| 3564 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); |
||
| 3565 | } |
||
| 3566 | |||
| 3567 | |||
| 3568 | /** |
||
| 3569 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3570 | * |
||
| 3571 | * Asserts that a variable is of type float. |
||
| 3572 | * |
||
| 3573 | * @param mixed $actual |
||
| 3574 | * @see \Codeception\Module\AbstractAsserts::assertIsFloat() |
||
| 3575 | */ |
||
| 3576 | public function assertIsFloat($actual, string $message = "") { |
||
| 3577 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); |
||
| 3578 | } |
||
| 3579 | |||
| 3580 | |||
| 3581 | /** |
||
| 3582 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3583 | * |
||
| 3584 | * Asserts that a variable is of type int. |
||
| 3585 | * |
||
| 3586 | * @param mixed $actual |
||
| 3587 | * @see \Codeception\Module\AbstractAsserts::assertIsInt() |
||
| 3588 | */ |
||
| 3589 | public function assertIsInt($actual, string $message = "") { |
||
| 3590 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); |
||
| 3591 | } |
||
| 3592 | |||
| 3593 | |||
| 3594 | /** |
||
| 3595 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3596 | * |
||
| 3597 | * Asserts that a variable is of type iterable. |
||
| 3598 | * |
||
| 3599 | * @param mixed $actual |
||
| 3600 | * @see \Codeception\Module\AbstractAsserts::assertIsIterable() |
||
| 3601 | */ |
||
| 3602 | public function assertIsIterable($actual, string $message = "") { |
||
| 3603 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); |
||
| 3604 | } |
||
| 3605 | |||
| 3606 | |||
| 3607 | /** |
||
| 3608 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3609 | * |
||
| 3610 | * Asserts that a variable is not of type array. |
||
| 3611 | * |
||
| 3612 | * @param mixed $actual |
||
| 3613 | * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() |
||
| 3614 | */ |
||
| 3615 | public function assertIsNotArray($actual, string $message = "") { |
||
| 3616 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); |
||
| 3617 | } |
||
| 3618 | |||
| 3619 | |||
| 3620 | /** |
||
| 3621 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3622 | * |
||
| 3623 | * Asserts that a variable is not of type bool. |
||
| 3624 | * |
||
| 3625 | * @param mixed $actual |
||
| 3626 | * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() |
||
| 3627 | */ |
||
| 3628 | public function assertIsNotBool($actual, string $message = "") { |
||
| 3629 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); |
||
| 3630 | } |
||
| 3631 | |||
| 3632 | |||
| 3633 | /** |
||
| 3634 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3635 | * |
||
| 3636 | * Asserts that a variable is not of type callable. |
||
| 3637 | * |
||
| 3638 | * @param mixed $actual |
||
| 3639 | * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() |
||
| 3640 | */ |
||
| 3641 | public function assertIsNotCallable($actual, string $message = "") { |
||
| 3642 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); |
||
| 3643 | } |
||
| 3644 | |||
| 3645 | |||
| 3646 | /** |
||
| 3647 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3648 | * |
||
| 3649 | * Asserts that a variable is not of type resource. |
||
| 3650 | * |
||
| 3651 | * @param mixed $actual |
||
| 3652 | * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() |
||
| 3653 | */ |
||
| 3654 | public function assertIsNotClosedResource($actual, string $message = "") { |
||
| 3655 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); |
||
| 3656 | } |
||
| 3657 | |||
| 3658 | |||
| 3659 | /** |
||
| 3660 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3661 | * |
||
| 3662 | * Asserts that a variable is not of type float. |
||
| 3663 | * |
||
| 3664 | * @param mixed $actual |
||
| 3665 | * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() |
||
| 3666 | */ |
||
| 3667 | public function assertIsNotFloat($actual, string $message = "") { |
||
| 3668 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); |
||
| 3669 | } |
||
| 3670 | |||
| 3671 | |||
| 3672 | /** |
||
| 3673 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3674 | * |
||
| 3675 | * Asserts that a variable is not of type int. |
||
| 3676 | * |
||
| 3677 | * @param mixed $actual |
||
| 3678 | * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() |
||
| 3679 | */ |
||
| 3680 | public function assertIsNotInt($actual, string $message = "") { |
||
| 3682 | } |
||
| 3683 | |||
| 3684 | |||
| 3685 | /** |
||
| 3686 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3687 | * |
||
| 3688 | * Asserts that a variable is not of type iterable. |
||
| 3689 | * |
||
| 3690 | * @param mixed $actual |
||
| 3691 | * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() |
||
| 3692 | */ |
||
| 3693 | public function assertIsNotIterable($actual, string $message = "") { |
||
| 3694 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); |
||
| 3695 | } |
||
| 3696 | |||
| 3697 | |||
| 3698 | /** |
||
| 3699 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3700 | * |
||
| 3701 | * Asserts that a variable is not of type numeric. |
||
| 3702 | * |
||
| 3703 | * @param mixed $actual |
||
| 3704 | * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() |
||
| 3705 | */ |
||
| 3706 | public function assertIsNotNumeric($actual, string $message = "") { |
||
| 3707 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); |
||
| 3708 | } |
||
| 3709 | |||
| 3710 | |||
| 3711 | /** |
||
| 3712 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3713 | * |
||
| 3714 | * Asserts that a variable is not of type object. |
||
| 3715 | * |
||
| 3716 | * @param mixed $actual |
||
| 3717 | * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() |
||
| 3718 | */ |
||
| 3719 | public function assertIsNotObject($actual, string $message = "") { |
||
| 3720 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); |
||
| 3721 | } |
||
| 3722 | |||
| 3723 | |||
| 3724 | /** |
||
| 3725 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3726 | * |
||
| 3727 | * Asserts that a file/dir exists and is not readable. |
||
| 3728 | * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() |
||
| 3729 | */ |
||
| 3730 | public function assertIsNotReadable(string $filename, string $message = "") { |
||
| 3731 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); |
||
| 3732 | } |
||
| 3733 | |||
| 3734 | |||
| 3735 | /** |
||
| 3736 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3737 | * |
||
| 3738 | * Asserts that a variable is not of type resource. |
||
| 3739 | * |
||
| 3740 | * @param mixed $actual |
||
| 3741 | * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() |
||
| 3742 | */ |
||
| 3743 | public function assertIsNotResource($actual, string $message = "") { |
||
| 3744 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); |
||
| 3745 | } |
||
| 3746 | |||
| 3747 | |||
| 3748 | /** |
||
| 3749 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3750 | * |
||
| 3751 | * Asserts that a variable is not of type scalar. |
||
| 3752 | * |
||
| 3753 | * @param mixed $actual |
||
| 3754 | * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() |
||
| 3755 | */ |
||
| 3756 | public function assertIsNotScalar($actual, string $message = "") { |
||
| 3757 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); |
||
| 3758 | } |
||
| 3759 | |||
| 3760 | |||
| 3761 | /** |
||
| 3762 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3763 | * |
||
| 3764 | * Asserts that a variable is not of type string. |
||
| 3765 | * |
||
| 3766 | * @param mixed $actual |
||
| 3767 | * @see \Codeception\Module\AbstractAsserts::assertIsNotString() |
||
| 3768 | */ |
||
| 3769 | public function assertIsNotString($actual, string $message = "") { |
||
| 3770 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); |
||
| 3771 | } |
||
| 3772 | |||
| 3773 | |||
| 3774 | /** |
||
| 3775 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3776 | * |
||
| 3777 | * Asserts that a file/dir exists and is not writable. |
||
| 3778 | * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() |
||
| 3779 | */ |
||
| 3780 | public function assertIsNotWritable(string $filename, string $message = "") { |
||
| 3781 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); |
||
| 3782 | } |
||
| 3783 | |||
| 3784 | |||
| 3785 | /** |
||
| 3786 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3787 | * |
||
| 3788 | * Asserts that a variable is of type numeric. |
||
| 3789 | * |
||
| 3790 | * @param mixed $actual |
||
| 3791 | * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() |
||
| 3792 | */ |
||
| 3793 | public function assertIsNumeric($actual, string $message = "") { |
||
| 3794 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); |
||
| 3795 | } |
||
| 3796 | |||
| 3797 | |||
| 3798 | /** |
||
| 3799 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3800 | * |
||
| 3801 | * Asserts that a variable is of type object. |
||
| 3802 | * |
||
| 3803 | * @param mixed $actual |
||
| 3804 | * @see \Codeception\Module\AbstractAsserts::assertIsObject() |
||
| 3805 | */ |
||
| 3806 | public function assertIsObject($actual, string $message = "") { |
||
| 3807 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); |
||
| 3808 | } |
||
| 3809 | |||
| 3810 | |||
| 3811 | /** |
||
| 3812 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3813 | * |
||
| 3814 | * Asserts that a file/dir is readable. |
||
| 3815 | * @see \Codeception\Module\AbstractAsserts::assertIsReadable() |
||
| 3816 | */ |
||
| 3817 | public function assertIsReadable(string $filename, string $message = "") { |
||
| 3818 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); |
||
| 3819 | } |
||
| 3820 | |||
| 3821 | |||
| 3822 | /** |
||
| 3823 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3824 | * |
||
| 3825 | * Asserts that a variable is of type resource. |
||
| 3826 | * |
||
| 3827 | * @param mixed $actual |
||
| 3828 | * @see \Codeception\Module\AbstractAsserts::assertIsResource() |
||
| 3829 | */ |
||
| 3830 | public function assertIsResource($actual, string $message = "") { |
||
| 3831 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); |
||
| 3832 | } |
||
| 3833 | |||
| 3834 | |||
| 3835 | /** |
||
| 3836 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3837 | * |
||
| 3838 | * Asserts that a variable is of type scalar. |
||
| 3839 | * |
||
| 3840 | * @param mixed $actual |
||
| 3841 | * @see \Codeception\Module\AbstractAsserts::assertIsScalar() |
||
| 3842 | */ |
||
| 3843 | public function assertIsScalar($actual, string $message = "") { |
||
| 3844 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); |
||
| 3845 | } |
||
| 3846 | |||
| 3847 | |||
| 3848 | /** |
||
| 3849 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3850 | * |
||
| 3851 | * Asserts that a variable is of type string. |
||
| 3852 | * |
||
| 3853 | * @param mixed $actual |
||
| 3854 | * @see \Codeception\Module\AbstractAsserts::assertIsString() |
||
| 3855 | */ |
||
| 3856 | public function assertIsString($actual, string $message = "") { |
||
| 3857 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); |
||
| 3858 | } |
||
| 3859 | |||
| 3860 | |||
| 3861 | /** |
||
| 3862 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3863 | * |
||
| 3864 | * Asserts that a file/dir exists and is writable. |
||
| 3865 | * @see \Codeception\Module\AbstractAsserts::assertIsWritable() |
||
| 3866 | */ |
||
| 3867 | public function assertIsWritable(string $filename, string $message = "") { |
||
| 3868 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); |
||
| 3869 | } |
||
| 3870 | |||
| 3871 | |||
| 3872 | /** |
||
| 3873 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3874 | * |
||
| 3875 | * Asserts that a string is a valid JSON string. |
||
| 3876 | * @see \Codeception\Module\AbstractAsserts::assertJson() |
||
| 3877 | */ |
||
| 3878 | public function assertJson(string $actualJson, string $message = "") { |
||
| 3879 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); |
||
| 3880 | } |
||
| 3881 | |||
| 3882 | |||
| 3883 | /** |
||
| 3884 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3885 | * |
||
| 3886 | * Asserts that two JSON files are equal. |
||
| 3887 | * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() |
||
| 3888 | */ |
||
| 3889 | public function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") { |
||
| 3890 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); |
||
| 3891 | } |
||
| 3892 | |||
| 3893 | |||
| 3894 | /** |
||
| 3895 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3896 | * |
||
| 3897 | * Asserts that two JSON files are not equal. |
||
| 3898 | * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() |
||
| 3899 | */ |
||
| 3900 | public function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = "") { |
||
| 3901 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); |
||
| 3902 | } |
||
| 3903 | |||
| 3904 | |||
| 3905 | /** |
||
| 3906 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3907 | * |
||
| 3908 | * Asserts that the generated JSON encoded object and the content of the given file are equal. |
||
| 3909 | * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() |
||
| 3910 | */ |
||
| 3911 | public function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") { |
||
| 3912 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); |
||
| 3913 | } |
||
| 3914 | |||
| 3915 | |||
| 3916 | /** |
||
| 3917 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3918 | * |
||
| 3919 | * Asserts that two given JSON encoded objects or arrays are equal. |
||
| 3920 | * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() |
||
| 3921 | */ |
||
| 3922 | public function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") { |
||
| 3923 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); |
||
| 3924 | } |
||
| 3925 | |||
| 3926 | |||
| 3927 | /** |
||
| 3928 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3929 | * |
||
| 3930 | * Asserts that the generated JSON encoded object and the content of the given file are not equal. |
||
| 3931 | * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() |
||
| 3932 | */ |
||
| 3933 | public function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = "") { |
||
| 3934 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); |
||
| 3935 | } |
||
| 3936 | |||
| 3937 | |||
| 3938 | /** |
||
| 3939 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3940 | * |
||
| 3941 | * Asserts that two given JSON encoded objects or arrays are not equal. |
||
| 3942 | * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() |
||
| 3943 | */ |
||
| 3944 | public function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = "") { |
||
| 3945 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); |
||
| 3946 | } |
||
| 3947 | |||
| 3948 | |||
| 3949 | /** |
||
| 3950 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3951 | * |
||
| 3952 | * Asserts that a value is smaller than another value. |
||
| 3953 | * |
||
| 3954 | * @param mixed $expected |
||
| 3955 | * @param mixed $actual |
||
| 3956 | * @see \Codeception\Module\AbstractAsserts::assertLessThan() |
||
| 3957 | */ |
||
| 3958 | public function assertLessThan($expected, $actual, string $message = "") { |
||
| 3959 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); |
||
| 3960 | } |
||
| 3961 | |||
| 3962 | |||
| 3963 | /** |
||
| 3964 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3965 | * |
||
| 3966 | * Asserts that a value is smaller than or equal to another value. |
||
| 3967 | * |
||
| 3968 | * @param mixed $expected |
||
| 3969 | * @param mixed $actual |
||
| 3970 | * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() |
||
| 3971 | */ |
||
| 3972 | public function assertLessThanOrEqual($expected, $actual, string $message = "") { |
||
| 3973 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); |
||
| 3974 | } |
||
| 3975 | |||
| 3976 | |||
| 3977 | /** |
||
| 3978 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3979 | * |
||
| 3980 | * Asserts that a string matches a given regular expression. |
||
| 3981 | * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() |
||
| 3982 | */ |
||
| 3983 | public function assertMatchesRegularExpression(string $pattern, string $string, string $message = "") { |
||
| 3984 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); |
||
| 3985 | } |
||
| 3986 | |||
| 3987 | |||
| 3988 | /** |
||
| 3989 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 3990 | * |
||
| 3991 | * Asserts that a variable is nan. |
||
| 3992 | * |
||
| 3993 | * @param mixed $actual |
||
| 3994 | * @see \Codeception\Module\AbstractAsserts::assertNan() |
||
| 3995 | */ |
||
| 3996 | public function assertNan($actual, string $message = "") { |
||
| 3997 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); |
||
| 3998 | } |
||
| 3999 | |||
| 4000 | |||
| 4001 | /** |
||
| 4002 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4003 | * |
||
| 4004 | * Asserts that a haystack does not contain a needle. |
||
| 4005 | * |
||
| 4006 | * @param mixed $needle |
||
| 4007 | * @see \Codeception\Module\AbstractAsserts::assertNotContains() |
||
| 4008 | */ |
||
| 4009 | public function assertNotContains($needle, iterable $haystack, string $message = "") { |
||
| 4010 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); |
||
| 4011 | } |
||
| 4012 | |||
| 4013 | |||
| 4014 | /** |
||
| 4015 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4016 | * |
||
| 4017 | * |
||
| 4018 | * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() |
||
| 4019 | */ |
||
| 4020 | public function assertNotContainsEquals($needle, iterable $haystack, string $message = "") { |
||
| 4021 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); |
||
| 4022 | } |
||
| 4023 | |||
| 4024 | |||
| 4025 | /** |
||
| 4026 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4027 | * |
||
| 4028 | * Asserts that a haystack does not contain only values of a given type. |
||
| 4029 | * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() |
||
| 4030 | */ |
||
| 4031 | public function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = NULL, string $message = "") { |
||
| 4032 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); |
||
| 4033 | } |
||
| 4034 | |||
| 4035 | |||
| 4036 | /** |
||
| 4037 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4038 | * |
||
| 4039 | * Asserts the number of elements of an array, Countable or Traversable. |
||
| 4040 | * |
||
| 4041 | * @param \Countable|iterable $haystack |
||
| 4042 | * @see \Codeception\Module\AbstractAsserts::assertNotCount() |
||
| 4043 | */ |
||
| 4044 | public function assertNotCount(int $expectedCount, $haystack, string $message = "") { |
||
| 4045 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); |
||
| 4046 | } |
||
| 4047 | |||
| 4048 | |||
| 4049 | /** |
||
| 4050 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4051 | * |
||
| 4052 | * Asserts that a variable is not empty. |
||
| 4053 | * |
||
| 4054 | * @param mixed $actual |
||
| 4055 | * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() |
||
| 4056 | */ |
||
| 4057 | public function assertNotEmpty($actual, string $message = "") { |
||
| 4058 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); |
||
| 4059 | } |
||
| 4060 | |||
| 4061 | |||
| 4062 | /** |
||
| 4063 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4064 | * |
||
| 4065 | * Asserts that two variables are not equal. |
||
| 4066 | * |
||
| 4067 | * @param mixed $expected |
||
| 4068 | * @param mixed $actual |
||
| 4069 | * @see \Codeception\Module\AbstractAsserts::assertNotEquals() |
||
| 4070 | */ |
||
| 4071 | public function assertNotEquals($expected, $actual, string $message = "") { |
||
| 4072 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); |
||
| 4073 | } |
||
| 4074 | |||
| 4075 | |||
| 4076 | /** |
||
| 4077 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4078 | * |
||
| 4079 | * Asserts that two variables are not equal (canonicalizing). |
||
| 4080 | * |
||
| 4081 | * @param mixed $expected |
||
| 4082 | * @param mixed $actual |
||
| 4083 | * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() |
||
| 4084 | */ |
||
| 4085 | public function assertNotEqualsCanonicalizing($expected, $actual, string $message = "") { |
||
| 4086 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); |
||
| 4087 | } |
||
| 4088 | |||
| 4089 | |||
| 4090 | /** |
||
| 4091 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4092 | * |
||
| 4093 | * Asserts that two variables are not equal (ignoring case). |
||
| 4094 | * |
||
| 4095 | * @param mixed $expected |
||
| 4096 | * @param mixed $actual |
||
| 4097 | * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() |
||
| 4098 | */ |
||
| 4099 | public function assertNotEqualsIgnoringCase($expected, $actual, string $message = "") { |
||
| 4100 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); |
||
| 4101 | } |
||
| 4102 | |||
| 4103 | |||
| 4104 | /** |
||
| 4105 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4106 | * |
||
| 4107 | * Asserts that two variables are not equal (with delta). |
||
| 4108 | * |
||
| 4109 | * @param mixed $expected |
||
| 4110 | * @param mixed $actual |
||
| 4111 | * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() |
||
| 4112 | */ |
||
| 4113 | public function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = "") { |
||
| 4114 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); |
||
| 4115 | } |
||
| 4116 | |||
| 4117 | |||
| 4118 | /** |
||
| 4119 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4120 | * |
||
| 4121 | * Asserts that a condition is not false. |
||
| 4122 | * |
||
| 4123 | * @param mixed $condition |
||
| 4124 | * @see \Codeception\Module\AbstractAsserts::assertNotFalse() |
||
| 4125 | */ |
||
| 4126 | public function assertNotFalse($condition, string $message = "") { |
||
| 4127 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); |
||
| 4128 | } |
||
| 4129 | |||
| 4130 | |||
| 4131 | /** |
||
| 4132 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4133 | * |
||
| 4134 | * Asserts that a variable is not of a given type. |
||
| 4135 | * |
||
| 4136 | * @param mixed $actual |
||
| 4137 | * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() |
||
| 4138 | */ |
||
| 4139 | public function assertNotInstanceOf(string $expected, $actual, string $message = "") { |
||
| 4140 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); |
||
| 4141 | } |
||
| 4142 | |||
| 4143 | |||
| 4144 | /** |
||
| 4145 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4146 | * |
||
| 4147 | * Asserts that a variable is not null. |
||
| 4148 | * |
||
| 4149 | * @param mixed $actual |
||
| 4150 | * @see \Codeception\Module\AbstractAsserts::assertNotNull() |
||
| 4151 | */ |
||
| 4152 | public function assertNotNull($actual, string $message = "") { |
||
| 4153 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); |
||
| 4154 | } |
||
| 4155 | |||
| 4156 | |||
| 4157 | /** |
||
| 4158 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4159 | * |
||
| 4160 | * Asserts that two variables do not have the same type and value. |
||
| 4161 | * |
||
| 4162 | * @param mixed $expected |
||
| 4163 | * @param mixed $actual |
||
| 4164 | * @see \Codeception\Module\AbstractAsserts::assertNotSame() |
||
| 4165 | */ |
||
| 4166 | public function assertNotSame($expected, $actual, string $message = "") { |
||
| 4167 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); |
||
| 4168 | } |
||
| 4169 | |||
| 4170 | |||
| 4171 | /** |
||
| 4172 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4173 | * |
||
| 4174 | * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. |
||
| 4175 | * |
||
| 4176 | * @param \Countable|iterable $expected |
||
| 4177 | * @param \Countable|iterable $actual |
||
| 4178 | * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() |
||
| 4179 | */ |
||
| 4180 | public function assertNotSameSize($expected, $actual, string $message = "") { |
||
| 4181 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); |
||
| 4182 | } |
||
| 4183 | |||
| 4184 | |||
| 4185 | /** |
||
| 4186 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4187 | * |
||
| 4188 | * Asserts that a condition is not true. |
||
| 4189 | * |
||
| 4190 | * @param mixed $condition |
||
| 4191 | * @see \Codeception\Module\AbstractAsserts::assertNotTrue() |
||
| 4192 | */ |
||
| 4193 | public function assertNotTrue($condition, string $message = "") { |
||
| 4194 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); |
||
| 4195 | } |
||
| 4196 | |||
| 4197 | |||
| 4198 | /** |
||
| 4199 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4200 | * |
||
| 4201 | * Asserts that a variable is null. |
||
| 4202 | * |
||
| 4203 | * @param mixed $actual |
||
| 4204 | * @see \Codeception\Module\AbstractAsserts::assertNull() |
||
| 4205 | */ |
||
| 4206 | public function assertNull($actual, string $message = "") { |
||
| 4207 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); |
||
| 4208 | } |
||
| 4209 | |||
| 4210 | |||
| 4211 | /** |
||
| 4212 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4213 | * |
||
| 4214 | * Asserts that an object has a specified attribute. |
||
| 4215 | * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() |
||
| 4216 | */ |
||
| 4217 | public function assertObjectHasAttribute(string $attributeName, object $object, string $message = "") { |
||
| 4218 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); |
||
| 4219 | } |
||
| 4220 | |||
| 4221 | |||
| 4222 | /** |
||
| 4223 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4224 | * |
||
| 4225 | * Asserts that an object does not have a specified attribute. |
||
| 4226 | * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() |
||
| 4227 | */ |
||
| 4228 | public function assertObjectNotHasAttribute(string $attributeName, object $object, string $message = "") { |
||
| 4229 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); |
||
| 4230 | } |
||
| 4231 | |||
| 4232 | |||
| 4233 | /** |
||
| 4234 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4235 | * |
||
| 4236 | * Asserts that two variables have the same type and value. |
||
| 4237 | * |
||
| 4238 | * @param mixed $expected |
||
| 4239 | * @param mixed $actual |
||
| 4240 | * @see \Codeception\Module\AbstractAsserts::assertSame() |
||
| 4241 | */ |
||
| 4242 | public function assertSame($expected, $actual, string $message = "") { |
||
| 4243 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); |
||
| 4244 | } |
||
| 4245 | |||
| 4246 | |||
| 4247 | /** |
||
| 4248 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4249 | * |
||
| 4250 | * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. |
||
| 4251 | * |
||
| 4252 | * @param \Countable|iterable $expected |
||
| 4253 | * @param \Countable|iterable $actual |
||
| 4254 | * @see \Codeception\Module\AbstractAsserts::assertSameSize() |
||
| 4255 | */ |
||
| 4256 | public function assertSameSize($expected, $actual, string $message = "") { |
||
| 4257 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); |
||
| 4258 | } |
||
| 4259 | |||
| 4260 | |||
| 4261 | /** |
||
| 4262 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4263 | * |
||
| 4264 | * |
||
| 4265 | * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() |
||
| 4266 | */ |
||
| 4267 | public function assertStringContainsString(string $needle, string $haystack, string $message = "") { |
||
| 4268 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); |
||
| 4269 | } |
||
| 4270 | |||
| 4271 | |||
| 4272 | /** |
||
| 4273 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4274 | * |
||
| 4275 | * |
||
| 4276 | * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() |
||
| 4277 | */ |
||
| 4278 | public function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") { |
||
| 4279 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); |
||
| 4280 | } |
||
| 4281 | |||
| 4282 | |||
| 4283 | /** |
||
| 4284 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4285 | * |
||
| 4286 | * Asserts that a string ends not with a given suffix. |
||
| 4287 | * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() |
||
| 4288 | */ |
||
| 4289 | public function assertStringEndsNotWith(string $suffix, string $string, string $message = "") { |
||
| 4290 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); |
||
| 4291 | } |
||
| 4292 | |||
| 4293 | |||
| 4294 | /** |
||
| 4295 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4296 | * |
||
| 4297 | * Asserts that a string ends with a given suffix. |
||
| 4298 | * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() |
||
| 4299 | */ |
||
| 4300 | public function assertStringEndsWith(string $suffix, string $string, string $message = "") { |
||
| 4301 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); |
||
| 4302 | } |
||
| 4303 | |||
| 4304 | |||
| 4305 | /** |
||
| 4306 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4307 | * |
||
| 4308 | * Asserts that the contents of a string is equal to the contents of a file. |
||
| 4309 | * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() |
||
| 4310 | */ |
||
| 4311 | public function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = "") { |
||
| 4312 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); |
||
| 4313 | } |
||
| 4314 | |||
| 4315 | |||
| 4316 | /** |
||
| 4317 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4318 | * |
||
| 4319 | * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). |
||
| 4320 | * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() |
||
| 4321 | */ |
||
| 4322 | public function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") { |
||
| 4323 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); |
||
| 4324 | } |
||
| 4325 | |||
| 4326 | |||
| 4327 | /** |
||
| 4328 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4329 | * |
||
| 4330 | * Asserts that the contents of a string is equal to the contents of a file (ignoring case). |
||
| 4331 | * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() |
||
| 4332 | */ |
||
| 4333 | public function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") { |
||
| 4334 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); |
||
| 4335 | } |
||
| 4336 | |||
| 4337 | |||
| 4338 | /** |
||
| 4339 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4340 | * |
||
| 4341 | * Asserts that a string matches a given format string. |
||
| 4342 | * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() |
||
| 4343 | */ |
||
| 4344 | public function assertStringMatchesFormat(string $format, string $string, string $message = "") { |
||
| 4345 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); |
||
| 4346 | } |
||
| 4347 | |||
| 4348 | |||
| 4349 | /** |
||
| 4350 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4351 | * |
||
| 4352 | * Asserts that a string matches a given format file. |
||
| 4353 | * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() |
||
| 4354 | */ |
||
| 4355 | public function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = "") { |
||
| 4356 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); |
||
| 4357 | } |
||
| 4358 | |||
| 4359 | |||
| 4360 | /** |
||
| 4361 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4362 | * |
||
| 4363 | * |
||
| 4364 | * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() |
||
| 4365 | */ |
||
| 4366 | public function assertStringNotContainsString(string $needle, string $haystack, string $message = "") { |
||
| 4367 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); |
||
| 4368 | } |
||
| 4369 | |||
| 4370 | |||
| 4371 | /** |
||
| 4372 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4373 | * |
||
| 4374 | * |
||
| 4375 | * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() |
||
| 4376 | */ |
||
| 4377 | public function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = "") { |
||
| 4378 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); |
||
| 4379 | } |
||
| 4380 | |||
| 4381 | |||
| 4382 | /** |
||
| 4383 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4384 | * |
||
| 4385 | * Asserts that the contents of a string is not equal to the contents of a file. |
||
| 4386 | * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() |
||
| 4387 | */ |
||
| 4388 | public function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = "") { |
||
| 4389 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); |
||
| 4390 | } |
||
| 4391 | |||
| 4392 | |||
| 4393 | /** |
||
| 4394 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4395 | * |
||
| 4396 | * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). |
||
| 4397 | * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() |
||
| 4398 | */ |
||
| 4399 | public function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = "") { |
||
| 4400 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); |
||
| 4401 | } |
||
| 4402 | |||
| 4403 | |||
| 4404 | /** |
||
| 4405 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4406 | * |
||
| 4407 | * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). |
||
| 4408 | * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() |
||
| 4409 | */ |
||
| 4410 | public function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = "") { |
||
| 4411 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); |
||
| 4412 | } |
||
| 4413 | |||
| 4414 | |||
| 4415 | /** |
||
| 4416 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4417 | * |
||
| 4418 | * Asserts that a string does not match a given format string. |
||
| 4419 | * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() |
||
| 4420 | */ |
||
| 4421 | public function assertStringNotMatchesFormat(string $format, string $string, string $message = "") { |
||
| 4422 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); |
||
| 4423 | } |
||
| 4424 | |||
| 4425 | |||
| 4426 | /** |
||
| 4427 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4428 | * |
||
| 4429 | * Asserts that a string does not match a given format string. |
||
| 4430 | * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() |
||
| 4431 | */ |
||
| 4432 | public function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = "") { |
||
| 4433 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); |
||
| 4434 | } |
||
| 4435 | |||
| 4436 | |||
| 4437 | /** |
||
| 4438 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4439 | * |
||
| 4440 | * Asserts that a string starts not with a given prefix. |
||
| 4441 | * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() |
||
| 4442 | */ |
||
| 4443 | public function assertStringStartsNotWith(string $prefix, string $string, string $message = "") { |
||
| 4444 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); |
||
| 4445 | } |
||
| 4446 | |||
| 4447 | |||
| 4448 | /** |
||
| 4449 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4450 | * |
||
| 4451 | * Asserts that a string starts with a given prefix. |
||
| 4452 | * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() |
||
| 4453 | */ |
||
| 4454 | public function assertStringStartsWith(string $prefix, string $string, string $message = "") { |
||
| 4455 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); |
||
| 4456 | } |
||
| 4457 | |||
| 4458 | |||
| 4459 | /** |
||
| 4460 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4461 | * |
||
| 4462 | * Evaluates a PHPUnit\Framework\Constraint matcher object. |
||
| 4463 | * |
||
| 4464 | * @param mixed $value |
||
| 4465 | * @see \Codeception\Module\AbstractAsserts::assertThat() |
||
| 4466 | */ |
||
| 4467 | public function assertThat($value, \PHPUnit\Framework\Constraint\Constraint $constraint, string $message = "") { |
||
| 4468 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); |
||
| 4469 | } |
||
| 4470 | |||
| 4471 | |||
| 4472 | /** |
||
| 4473 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4474 | * |
||
| 4475 | * Asserts that a condition is true. |
||
| 4476 | * |
||
| 4477 | * @param mixed $condition |
||
| 4478 | * @see \Codeception\Module\AbstractAsserts::assertTrue() |
||
| 4479 | */ |
||
| 4480 | public function assertTrue($condition, string $message = "") { |
||
| 4481 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); |
||
| 4482 | } |
||
| 4483 | |||
| 4484 | |||
| 4485 | /** |
||
| 4486 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4487 | * |
||
| 4488 | * Asserts that two XML files are equal. |
||
| 4489 | * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() |
||
| 4490 | */ |
||
| 4491 | public function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") { |
||
| 4493 | } |
||
| 4494 | |||
| 4495 | |||
| 4496 | /** |
||
| 4497 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4498 | * |
||
| 4499 | * Asserts that two XML files are not equal. |
||
| 4500 | * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() |
||
| 4501 | */ |
||
| 4502 | public function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = "") { |
||
| 4503 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); |
||
| 4504 | } |
||
| 4505 | |||
| 4506 | |||
| 4507 | /** |
||
| 4508 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4509 | * |
||
| 4510 | * Asserts that two XML documents are equal. |
||
| 4511 | * |
||
| 4512 | * @param \DOMDocument|string $actualXml |
||
| 4513 | * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() |
||
| 4514 | */ |
||
| 4515 | public function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") { |
||
| 4516 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); |
||
| 4517 | } |
||
| 4518 | |||
| 4519 | |||
| 4520 | /** |
||
| 4521 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4522 | * |
||
| 4523 | * Asserts that two XML documents are equal. |
||
| 4524 | * |
||
| 4525 | * @param \DOMDocument|string $expectedXml |
||
| 4526 | * @param \DOMDocument|string $actualXml |
||
| 4527 | * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() |
||
| 4528 | */ |
||
| 4529 | public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = "") { |
||
| 4530 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); |
||
| 4531 | } |
||
| 4532 | |||
| 4533 | |||
| 4534 | /** |
||
| 4535 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4536 | * |
||
| 4537 | * Asserts that two XML documents are not equal. |
||
| 4538 | * |
||
| 4539 | * @param \DOMDocument|string $actualXml |
||
| 4540 | * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() |
||
| 4541 | */ |
||
| 4542 | public function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = "") { |
||
| 4543 | return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); |
||
| 4544 | } |
||
| 4545 | |||
| 4546 | |||
| 4547 | /** |
||
| 4548 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4549 | * |
||
| 4550 | * Asserts that two XML documents are not equal. |
||
| 4551 | * |
||
| 4552 | * @param \DOMDocument|string $expectedXml |
||
| 4553 | * @param \DOMDocument|string $actualXml |
||
| 4554 | * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() |
||
| 4555 | */ |
||
| 4556 | public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = "") { |
||
| 4558 | } |
||
| 4559 | |||
| 4560 | |||
| 4561 | /** |
||
| 4562 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4563 | * |
||
| 4564 | * Fails a test with the given message. |
||
| 4565 | * @see \Codeception\Module\AbstractAsserts::fail() |
||
| 4566 | */ |
||
| 4567 | public function fail(string $message = "") { |
||
| 4568 | return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); |
||
| 4569 | } |
||
| 4570 | |||
| 4571 | |||
| 4572 | /** |
||
| 4573 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4574 | * |
||
| 4575 | * Mark the test as incomplete. |
||
| 4576 | * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() |
||
| 4577 | */ |
||
| 4578 | public function markTestIncomplete(string $message = "") { |
||
| 4579 | return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); |
||
| 4580 | } |
||
| 4581 | |||
| 4582 | |||
| 4583 | /** |
||
| 4584 | * [!] Method is generated. Documentation taken from corresponding module. |
||
| 4585 | * |
||
| 4586 | * Mark the test as skipped. |
||
| 4587 | * @see \Codeception\Module\AbstractAsserts::markTestSkipped() |
||
| 4588 | */ |
||
| 4589 | public function markTestSkipped(string $message = "") { |
||
| 4590 | return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); |
||
| 4591 | } |
||
| 4592 | } |
||
| 4593 |