mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Unfortunately, in my overzealous desire to fix all the un-capitalised Ps, [42343] capitalled some Ps that intentionally should not be capitals. This commit fixes the incorrectly capitalling of Ps, as well as including unit tests and PHPCS instructions to ensure we never capitulate to capitalisationing them again. Props superdav42. Fixes #43040. Fixes #43041. git-svn-id: https://develop.svn.wordpress.org/trunk@42429 602fd350-edb4-49c9-b593-d223f7449a82
21 lines
968 B
PHP
21 lines
968 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->assertEquals( 'Something about WordPress', capital_P_dangit( 'Something about Wordpress' ) );
|
|
$this->assertEquals( 'Something about (WordPress', capital_P_dangit( 'Something about (Wordpress' ) );
|
|
$this->assertEquals( 'Something about ‘WordPress', capital_P_dangit( 'Something about ‘Wordpress' ) );
|
|
$this->assertEquals( 'Something about “WordPress', capital_P_dangit( 'Something about “Wordpress' ) );
|
|
$this->assertEquals( 'Something about >WordPress', capital_P_dangit( 'Something about >Wordpress' ) );
|
|
$this->assertEquals( 'Wordpress', capital_P_dangit( 'Wordpress' ) );
|
|
|
|
$wp_current_filter = array( 'the_title' );
|
|
$this->assertEquals( 'WordPress', capital_P_dangit( 'Wordpress' ) );
|
|
}
|
|
}
|