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