wordpress-develop/tests/phpunit/tests/formatting/capitalPDangit.php
Andrew Ozz 5a3f8484d6 Build/Test Tools, Formatting group:
- Add and update @covers tags.
- Add and improve docs and inline comments.

Props pbeane, hellofromTonya, antonvlasenko, ironprogrammer, SergeyBiryukov, costdev.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@53562 602fd350-edb4-49c9-b593-d223f7449a82
2022-06-23 20:27:34 +00:00

23 lines
994 B
PHP

<?php
// phpcs:disable WordPress.WP.CapitalPDangit.Misspelled -- 🙃
/**
* @group formatting
*
* @covers ::capital_P_dangit
*/
class Tests_Formatting_CapitalPDangit extends WP_UnitTestCase {
public 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' ) );
}
}