Make WordPress Core


Ignore:
Timestamp:
11/29/2022 12:32:37 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods. This continues the previous efforts to make sure visibility is declared on all methods.

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [51919], [52009], [52010].

Props jrf.
See #56791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-supports/typography.php

    r54823 r54889  
    2424    private $orig_theme_dir;
    2525
    26     function set_up() {
     26    public function set_up() {
    2727        parent::set_up();
    2828
     
    4949     * Unregisters block type after each test.
    5050     */
    51     function tear_down() {
     51    public function tear_down() {
    5252        // Restores the original theme directory setup.
    5353        $GLOBALS['wp_theme_directories'] = $this->orig_theme_dir;
     
    6969     * @covers ::wp_apply_typography_support
    7070     */
    71     function test_should_kebab_case_font_size_slug_with_numbers() {
     71    public function test_should_kebab_case_font_size_slug_with_numbers() {
    7272        $this->test_block_name = 'test/font-size-slug-with-numbers';
    7373        register_block_type(
     
    105105     * @covers ::wp_apply_typography_support
    106106     */
    107     function test_should_generate_font_family_with_legacy_inline_styles_using_a_value() {
     107    public function test_should_generate_font_family_with_legacy_inline_styles_using_a_value() {
    108108        $this->test_block_name = 'test/font-family-with-inline-styles-using-value';
    109109        register_block_type(
     
    140140     * @covers ::wp_apply_typography_support
    141141     */
    142     function test_should_skip_serialization_for_typography_block_supports() {
     142    public function test_should_skip_serialization_for_typography_block_supports() {
    143143        $this->test_block_name = 'test/typography-with-skipped-serialization-block-supports';
    144144        register_block_type(
     
    188188     * @covers ::wp_apply_typography_support
    189189     */
    190     function test_should_skip_serialization_for_letter_spacing_block_supports() {
     190    public function test_should_skip_serialization_for_letter_spacing_block_supports() {
    191191        $this->test_block_name = 'test/letter-spacing-with-individual-skipped-serialization-block-supports';
    192192        register_block_type(
     
    226226     * @covers ::wp_apply_typography_support
    227227     */
    228     function test_should_generate_css_var_for_font_family_with_legacy_inline_styles() {
     228    public function test_should_generate_css_var_for_font_family_with_legacy_inline_styles() {
    229229        $this->test_block_name = 'test/font-family-with-inline-styles-using-css-var';
    230230        register_block_type(
     
    261261     * @covers ::wp_apply_typography_support
    262262     */
    263     function test_should_generate_classname_for_font_family() {
     263    public function test_should_generate_classname_for_font_family() {
    264264        $this->test_block_name = 'test/font-family-with-class';
    265265        register_block_type(
     
    309309     * @param string $expected_output             Expected output.
    310310     */
    311     function test_wp_get_typography_font_size_value( $font_size_preset, $should_use_fluid_typography, $expected_output ) {
     311    public function test_wp_get_typography_font_size_value( $font_size_preset, $should_use_fluid_typography, $expected_output ) {
    312312        $actual = wp_get_typography_font_size_value( $font_size_preset, $should_use_fluid_typography );
    313313
Note: See TracChangeset for help on using the changeset viewer.