Changeset 48858 for trunk/tests/phpunit/tests/general/wpError.php
- Timestamp:
- 08/25/2020 12:57:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/general/wpError.php
r46586 r48858 101 101 102 102 /** 103 * @covers ::get_error_codes ()103 * @covers ::get_error_codes 104 104 */ 105 105 public function test_get_error_codes_with_no_errors_should_return_empty_array() { … … 108 108 109 109 /** 110 * @covers ::get_error_codes ()110 * @covers ::get_error_codes 111 111 */ 112 112 public function test_get_error_codes_with_one_error_should_return_an_array_with_only_that_code() { … … 117 117 118 118 /** 119 * @covers ::get_error_codes ()119 * @covers ::get_error_codes 120 120 */ 121 121 public function test_get_error_codes_with_multiple_errors_should_return_an_array_of_those_codes() { … … 129 129 130 130 /** 131 * @covers ::get_error_code ()131 * @covers ::get_error_code 132 132 */ 133 133 public function test_get_error_code_with_no_errors_should_return_an_empty_string() { … … 136 136 137 137 /** 138 * @covers ::get_error_code ()138 * @covers ::get_error_code 139 139 */ 140 140 public function test_get_error_code_with_one_error_should_return_that_error_code() { … … 145 145 146 146 /** 147 * @covers ::get_error_code ()147 * @covers ::get_error_code 148 148 */ 149 149 public function test_get_error_code_with_multiple_errors_should_return_only_the_first_error_code() { … … 155 155 156 156 /** 157 * @covers ::get_error_messages ()157 * @covers ::get_error_messages 158 158 */ 159 159 public function test_get_error_messages_with_empty_code_and_no_errors_should_return_an_empty_array() { … … 162 162 163 163 /** 164 * @covers ::get_error_messages ()164 * @covers ::get_error_messages 165 165 */ 166 166 public function test_get_error_messages_with_empty_code_one_error_should_return_an_array_with_that_message() { … … 171 171 172 172 /** 173 * @covers ::get_error_messages ()173 * @covers ::get_error_messages 174 174 */ 175 175 public function test_get_error_messages_with_empty_code_multiple_errors_should_return_an_array_of_messages() { … … 181 181 182 182 /** 183 * @covers ::get_error_messages ()183 * @covers ::get_error_messages 184 184 */ 185 185 public function test_get_error_messages_with_an_invalid_code_should_return_an_empty_array() { … … 188 188 189 189 /** 190 * @covers ::get_error_messages ()190 * @covers ::get_error_messages 191 191 */ 192 192 public function test_get_error_messages_with_one_error_should_return_an_array_with_that_message() { … … 197 197 198 198 /** 199 * @covers ::get_error_messages ()199 * @covers ::get_error_messages 200 200 */ 201 201 public function test_get_error_messages_with_multiple_errors_same_code_should_return_an_array_with_all_messages() { … … 207 207 208 208 /** 209 * @covers ::get_error_message ()209 * @covers ::get_error_message 210 210 */ 211 211 public function test_get_error_message_with_empty_code_and_no_errors_should_return_an_empty_string() { … … 214 214 215 215 /** 216 * @covers ::get_error_message ()216 * @covers ::get_error_message 217 217 */ 218 218 public function test_get_error_message_with_empty_code_and_one_error_should_return_that_message() { … … 223 223 224 224 /** 225 * @covers ::get_error_message ()225 * @covers ::get_error_message 226 226 */ 227 227 public function test_get_error_message_with_empty_code_and_multiple_errors_should_return_the_first_message() { … … 233 233 234 234 /** 235 * @covers ::get_error_message ()235 * @covers ::get_error_message 236 236 */ 237 237 public function test_get_error_message_with_empty_code_and_multiple_errors_multiple_codes_should_return_the_first_message() { … … 244 244 245 245 /** 246 * @covers ::get_error_message ()246 * @covers ::get_error_message 247 247 */ 248 248 public function test_get_error_message_with_invalid_code_and_no_errors_should_return_empty_string() { … … 251 251 252 252 /** 253 * @covers ::get_error_message ()253 * @covers ::get_error_message 254 254 */ 255 255 public function test_get_error_message_with_invalid_code_and_one_error_should_return_an_empty_string() { … … 260 260 261 261 /** 262 * @covers ::get_error_message ()262 * @covers ::get_error_message 263 263 */ 264 264 public function test_get_error_message_with_invalid_code_and_multiple_errors_should_return_an_empty_string() { … … 270 270 271 271 /** 272 * @covers ::get_error_data ()272 * @covers ::get_error_data 273 273 */ 274 274 public function test_get_error_data_with_empty_code_and_no_errors_should_evaluate_as_null() { … … 277 277 278 278 /** 279 * @covers ::get_error_data ()279 * @covers ::get_error_data 280 280 */ 281 281 public function test_get_error_data_with_empty_code_one_error_no_data_should_evaluate_as_null() { … … 286 286 287 287 /** 288 * @covers ::get_error_data ()288 * @covers ::get_error_data 289 289 */ 290 290 public function test_get_error_data_with_empty_code_multiple_errors_no_data_should_evaluate_as_null() { … … 296 296 297 297 /** 298 * @covers ::get_error_data ()298 * @covers ::get_error_data 299 299 */ 300 300 public function test_get_error_data_with_empty_code_and_one_error_with_data_should_return_that_data() { … … 306 306 307 307 /** 308 * @covers ::get_error_data ()308 * @covers ::get_error_data 309 309 */ 310 310 public function test_get_error_data_with_empty_code_and_multiple_errors_different_codes_should_return_the_last_data_of_the_first_code() { … … 317 317 318 318 /** 319 * @covers ::get_error_data ()319 * @covers ::get_error_data 320 320 */ 321 321 public function test_get_error_data_with_empty_code_and_multiple_errors_same_code_should_return_the_last_data_of_the_first_code() { … … 328 328 329 329 /** 330 * @covers ::get_error_data ()330 * @covers ::get_error_data 331 331 */ 332 332 public function test_get_error_data_with_code_and_no_errors_should_evaluate_as_null() { … … 335 335 336 336 /** 337 * @covers ::get_error_data ()337 * @covers ::get_error_data 338 338 */ 339 339 public function test_get_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_null() { … … 344 344 345 345 /** 346 * @covers ::get_error_data ()346 * @covers ::get_error_data 347 347 */ 348 348 public function test_get_error_data_with_code_and_one_error_with_data_should_return_that_data() { … … 354 354 355 355 /** 356 * @covers ::get_error_data ()356 * @covers ::get_error_data 357 357 */ 358 358 public function test_get_error_data_with_code_and_multiple_errors_different_codes_should_return_the_last_stored_data_of_the_code() { … … 366 366 367 367 /** 368 * @covers ::get_error_data ()368 * @covers ::get_error_data 369 369 */ 370 370 public function test_get_error_data_with_code_and_multiple_errors_same_code_should_return_the_last_stored_data() { … … 377 377 378 378 /** 379 * @covers ::has_errors ()379 * @covers ::has_errors 380 380 */ 381 381 public function test_has_errors_with_no_errors_returns_false() { … … 384 384 385 385 /** 386 * @covers ::has_errors ()386 * @covers ::has_errors 387 387 */ 388 388 public function test_has_errors_with_errors_returns_true() { … … 392 392 393 393 /** 394 * @covers ::add ()394 * @covers ::add 395 395 */ 396 396 public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_key_to_errors_array() { … … 401 401 402 402 /** 403 * @covers ::add ()403 * @covers ::add 404 404 */ 405 405 public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_message_to_errors_array_under_empty_key() { … … 410 410 411 411 /** 412 * @covers ::add ()412 * @covers ::add 413 413 */ 414 414 public function test_add_with_empty_code_empty_message_empty_data_should_not_alter_data() { … … 419 419 420 420 /** 421 * @covers ::add ()421 * @covers ::add 422 422 */ 423 423 public function test_add_with_empty_code_empty_message_non_empty_data_should_store_data_under_an_empty_code_key() { … … 428 428 429 429 /** 430 * @covers ::add ()430 * @covers ::add 431 431 */ 432 432 public function test_add_with_code_empty_message_empty_data_should_add_error_with_code() { … … 437 437 438 438 /** 439 * @covers ::add ()439 * @covers ::add 440 440 */ 441 441 public function test_add_with_code_empty_message_empty_data_should_add_error_with_empty_message() { … … 446 446 447 447 /** 448 * @covers ::add ()448 * @covers ::add 449 449 */ 450 450 public function test_add_with_code_empty_message_empty_data_should_not_add_error_data() { … … 455 455 456 456 /** 457 * @covers ::add ()457 * @covers ::add 458 458 */ 459 459 public function test_add_with_code_and_message_and_empty_data_should_should_add_error_with_that_message() { … … 464 464 465 465 /** 466 * @covers ::add ()466 * @covers ::add 467 467 */ 468 468 public function test_add_with_code_and_message_and_empty_data_should_not_alter_stored_data() { … … 473 473 474 474 /** 475 * @covers ::add ()475 * @covers ::add 476 476 */ 477 477 public function test_add_with_code_and_empty_message_and_data_should_add_error_with_that_code() { … … 482 482 483 483 /** 484 * @covers ::add ()484 * @covers ::add 485 485 */ 486 486 public function test_add_with_code_and_empty_message_and_data_should_store_that_data() { … … 491 491 492 492 /** 493 * @covers ::add ()493 * @covers ::add 494 494 */ 495 495 public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_code() { … … 500 500 501 501 /** 502 * @covers ::add ()502 * @covers ::add 503 503 */ 504 504 public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_message() { … … 509 509 510 510 /** 511 * @covers ::add ()511 * @covers ::add 512 512 */ 513 513 public function test_add_with_code_and_message_and_data_should_store_that_data() { … … 518 518 519 519 /** 520 * @covers ::add ()520 * @covers ::add 521 521 */ 522 522 public function test_add_multiple_times_with_the_same_code_should_add_additional_messages_for_that_code() { … … 530 530 531 531 /** 532 * @covers ::add ()532 * @covers ::add 533 533 */ 534 534 public function test_add_multiple_times_with_the_same_code_and_different_data_should_store_only_the_last_added_data() { … … 540 540 541 541 /** 542 * @covers ::add_data ()542 * @covers ::add_data 543 543 */ 544 544 public function test_add_data_with_empty_data_empty_code_should_create_orphaned_data_with_no_error() { … … 549 549 550 550 /** 551 * @covers ::add_data ()551 * @covers ::add_data 552 552 */ 553 553 public function test_add_data_with_empty_data_empty_code_no_errors_should_create_data_under_an_empty_code_key() { … … 558 558 559 559 /** 560 * @covers ::add_data ()560 * @covers ::add_data 561 561 */ 562 562 public function test_add_data_with_data_empty_code_and_one_error_should_store_the_data_under_that_code() { … … 568 568 569 569 /** 570 * @covers ::add_data ()570 * @covers ::add_data 571 571 */ 572 572 public function test_add_data_with_data_empty_code_and_multiple_errors_with_different_codes_should_store_it_under_the_first_code() { … … 580 580 581 581 /** 582 * @covers ::add_data ()582 * @covers ::add_data 583 583 */ 584 584 public function test_add_data_with_data_empty_code_and_multiple_errors_with_same_code_should_store_it_under_the_first_code() { … … 593 593 594 594 /** 595 * @covers ::add_data ()595 * @covers ::add_data 596 596 */ 597 597 public function test_add_data_with_data_and_code_and_no_errors_should_create_orphaned_data_with_no_error() { … … 602 602 603 603 /** 604 * @covers ::add_data ()604 * @covers ::add_data 605 605 */ 606 606 public function test_add_data_with_data_and_code_no_errors_should_create_data_under_that_code_key() { … … 611 611 612 612 /** 613 * @covers ::add_data ()613 * @covers ::add_data 614 614 */ 615 615 public function test_add_data_with_data_and_code_one_error_different_code_should_create_orphaned_data_with_no_error() { … … 622 622 623 623 /** 624 * @covers ::add_data ()624 * @covers ::add_data 625 625 */ 626 626 public function test_add_data_with_data_and_code_one_error_different_code_should_create_data_under_that_code_key() { … … 633 633 634 634 /** 635 * @covers ::add_data ()635 * @covers ::add_data 636 636 */ 637 637 public function test_add_data_with_data_and_code_should_add_data() { … … 644 644 645 645 /** 646 * @covers ::remove ()646 * @covers ::remove 647 647 */ 648 648 public function test_remove_with_no_errors_should_affect_nothing() { … … 657 657 658 658 /** 659 * @covers ::remove ()659 * @covers ::remove 660 660 */ 661 661 public function test_remove_empty_code_no_errors_should_affect_nothing() { … … 670 670 671 671 /** 672 * @covers ::remove ()672 * @covers ::remove 673 673 */ 674 674 public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error() { … … 685 685 686 686 /** 687 * @covers ::remove ()687 * @covers ::remove 688 688 */ 689 689 public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error_data() { … … 698 698 699 699 /** 700 * @covers ::remove ()700 * @covers ::remove 701 701 */ 702 702 public function test_remove_should_remove_the_error_with_the_given_code() { … … 709 709 710 710 /** 711 * @covers ::remove ()711 * @covers ::remove 712 712 */ 713 713 public function test_remove_should_remove_the_error_data_associated_with_the_given_code() {
Note: See TracChangeset
for help on using the changeset viewer.