wordpress-develop/tests/phpunit/tests/formatting/capitalPDangit.php
Sergey Biryukov 4d2762ed93 Tests: Rename classes in phpunit/tests/formatting/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51623 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-16 21:33:54 +00:00

21 lines
954 B
PHP

<?php
// phpcs:disable WordPress.WP.CapitalPDangit.Misspelled -- 🙃
/**
* @group formatting
*/
class Tests_Formatting_CapitalPDangit extends WP_UnitTestCase {
function test_esc_attr_quotes() {
global $wp_current_filter;
$this->assertSame( 'Something about WordPress', capital_P_dangit( 'Something about Wordpress' ) );
$this->assertSame( 'Something about (WordPress', capital_P_dangit( 'Something about (Wordpress' ) );
$this->assertSame( 'Something about &#8216;WordPress', capital_P_dangit( 'Something about &#8216;Wordpress' ) );
$this->assertSame( 'Something about &#8220;WordPress', capital_P_dangit( 'Something about &#8220;Wordpress' ) );
$this->assertSame( 'Something about >WordPress', capital_P_dangit( 'Something about >Wordpress' ) );
$this->assertSame( 'Wordpress', capital_P_dangit( 'Wordpress' ) );
$wp_current_filter = array( 'the_title' );
$this->assertSame( 'WordPress', capital_P_dangit( 'Wordpress' ) );
}
}