Changeset 52253
- Timestamp:
- 11/26/2021 01:27:42 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n.php
r52010 r52253 408 408 $this->factory()->post->create( $args ); 409 409 410 // Effectively ignore the output until retrieving it later via `getActualOutput()`. 411 $this->expectOutputRegex( '`.`' ); 412 410 413 $expect = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do…'; 411 414 wp_dashboard_recent_drafts(); 412 415 413 restore_previous_locale(); 414 415 $this->expectOutputRegex( '/' . $expect . '/' ); 416 $actual = $this->getActualOutput(); 417 418 restore_previous_locale(); 419 420 $this->assertMatchesRegularExpression( '/' . $expect . '/', $actual ); 416 421 } 417 422 … … 432 437 $post = $this->factory()->post->create( $args ); 433 438 439 // Effectively ignore the output until retrieving it later via `getActualOutput()`. 440 $this->expectOutputRegex( '`.`' ); 441 434 442 $expect = 'Lorem ipsum dolor sit amet, consectetur …'; 435 443 wp_dashboard_recent_drafts(); 436 444 437 restore_previous_locale(); 438 439 $this->expectOutputRegex( '/' . $expect . '/' ); 445 $actual = $this->getActualOutput(); 446 447 restore_previous_locale(); 448 449 $this->assertMatchesRegularExpression( '/' . $expect . '/', $actual ); 440 450 } 441 451 … … 456 466 $this->factory()->post->create( $args ); 457 467 468 // Effectively ignore the output until retrieving it later via `getActualOutput()`. 469 $this->expectOutputRegex( '`.`' ); 470 458 471 $expect = str_repeat( 'あ', 40 ) . '…'; 459 472 wp_dashboard_recent_drafts(); 460 473 461 restore_previous_locale(); 462 463 $this->expectOutputRegex( '/' . $expect . '/' ); 474 $actual = $this->getActualOutput(); 475 476 restore_previous_locale(); 477 478 $this->assertMatchesRegularExpression( '/' . $expect . '/', $actual ); 464 479 } 465 480
Note: See TracChangeset
for help on using the changeset viewer.