- Timestamp:
- 09/08/2023 10:01:14 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/wpHandleCommentSubmission.php
r55369 r56548 55 55 $this->assertWPError( $comment ); 56 56 $this->assertSame( $error, $comment->get_error_code() ); 57 58 57 } 59 58 … … 78 77 $this->assertWPError( $comment ); 79 78 $this->assertSame( $error, $comment->get_error_code() ); 80 81 79 } 82 80 … … 99 97 $this->assertWPError( $comment ); 100 98 $this->assertSame( $error, $comment->get_error_code() ); 101 102 99 } 103 100 … … 122 119 $this->assertSame( $error, $comment->get_error_code() ); 123 120 $this->assertEmpty( $comment->get_error_message() ); 124 125 121 } 126 122 … … 176 172 $this->assertWPError( $comment ); 177 173 $this->assertSame( $error, $comment->get_error_code() ); 178 179 174 } 180 175 … … 199 194 $this->assertWPError( $comment ); 200 195 $this->assertSame( $error, $comment->get_error_code() ); 201 202 196 } 203 197 … … 226 220 $this->assertNotWPError( $comment ); 227 221 $this->assertInstanceOf( 'WP_Comment', $comment ); 228 229 222 } 230 223 … … 253 246 $this->assertSame( $user->user_url, $comment->comment_author_url ); 254 247 $this->assertSame( $user->ID, (int) $comment->user_id ); 255 256 248 } 257 249 … … 275 267 $this->assertSame( 'http://user.example.org', $comment->comment_author_url ); 276 268 $this->assertSame( '0', $comment->user_id ); 277 278 269 } 279 270 … … 298 289 $this->assertSame( 'Comment Author with 1 slash: \\', $comment->comment_author ); 299 290 $this->assertSame( 'comment@example.org', $comment->comment_author_email ); 300 301 291 } 302 292 … … 319 309 $this->assertWPError( $comment ); 320 310 $this->assertSame( $error, $comment->get_error_code() ); 321 322 311 } 323 312 … … 349 338 $this->assertWPError( $comment ); 350 339 $this->assertSame( $error, $comment->get_error_code() ); 351 352 340 } 353 341 … … 380 368 $this->assertWPError( $comment ); 381 369 $this->assertSame( $error, $comment->get_error_code() ); 382 383 370 } 384 371 … … 403 390 $this->assertNotWPError( $comment ); 404 391 $this->assertInstanceOf( 'WP_Comment', $comment ); 405 406 392 } 407 393 … … 426 412 $this->assertNotWPError( $comment ); 427 413 $this->assertInstanceOf( 'WP_Comment', $comment ); 428 429 414 } 430 415 … … 441 426 $this->assertInstanceOf( 'WP_Comment', $comment ); 442 427 $this->assertStringNotContainsString( '<script', $comment->comment_content ); 443 444 428 } 445 429 … … 459 443 $this->assertInstanceOf( 'WP_Comment', $comment ); 460 444 $this->assertStringNotContainsString( '<script', $comment->comment_content ); 461 462 445 } 463 446 … … 483 466 $this->assertInstanceOf( 'WP_Comment', $comment ); 484 467 $this->assertStringNotContainsString( '<script', $comment->comment_content ); 485 486 468 } 487 469 … … 515 497 $this->assertInstanceOf( 'WP_Comment', $comment ); 516 498 $this->assertStringContainsString( '<script', $comment->comment_content ); 517 518 499 } 519 500 … … 539 520 $this->assertInstanceOf( 'WP_Comment', $comment ); 540 521 $this->assertStringNotContainsString( '<script', $comment->comment_content ); 541 542 522 } 543 523 … … 558 538 $this->assertWPError( $comment ); 559 539 $this->assertSame( $error, $comment->get_error_code() ); 560 561 540 } 562 541 … … 579 558 $this->assertWPError( $comment ); 580 559 $this->assertSame( $error, $comment->get_error_code() ); 581 582 560 } 583 561 … … 600 578 $this->assertWPError( $comment ); 601 579 $this->assertSame( $error, $comment->get_error_code() ); 602 603 580 } 604 581 … … 622 599 $this->assertWPError( $comment ); 623 600 $this->assertSame( $error, $comment->get_error_code() ); 624 625 601 } 626 602 … … 639 615 $this->assertWPError( $comment ); 640 616 $this->assertSame( $error, $comment->get_error_code() ); 641 642 617 } 643 618 … … 789 764 $this->preprocess_comment_data 790 765 ); 791 792 766 } 793 767
Note: See TracChangeset
for help on using the changeset viewer.