Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/option/registration.php

    r39382 r42343  
    2828
    2929    public function test_register_with_array() {
    30         register_setting( 'test_group', 'test_option', array(
    31             'sanitize_callback' => array( $this, 'filter_registered_setting' ),
    32         ));
     30        register_setting(
     31            'test_group', 'test_option', array(
     32                'sanitize_callback' => array( $this, 'filter_registered_setting' ),
     33            )
     34        );
    3335
    3436        $filtered = apply_filters( 'sanitize_option_test_option', 'smart', 'test_option', 'smart' );
     
    4446     */
    4547    public function test_register_with_default() {
    46         register_setting( 'test_group', 'test_default', array(
    47             'default' => 'Fuck Cancer'
    48         ));
     48        register_setting(
     49            'test_group', 'test_default', array(
     50                'default' => 'Fuck Cancer',
     51            )
     52        );
    4953
    5054        $this->assertEquals( 'Fuck Cancer', get_option( 'test_default' ) );
     
    5559     */
    5660    public function test_register_with_default_override() {
    57         register_setting( 'test_group', 'test_default', array(
    58             'default' => 'Fuck Cancer'
    59         ));
     61        register_setting(
     62            'test_group', 'test_default', array(
     63                'default' => 'Fuck Cancer',
     64            )
     65        );
    6066
    6167        $this->assertEquals( 'Fuck Leukemia', get_option( 'test_default', 'Fuck Leukemia' ) );
     
    6672     */
    6773    public function test_add_option_with_no_options_cache() {
    68         register_setting( 'test_group', 'test_default', array(
    69             'default' => 'My Default :)',
    70         ));
     74        register_setting(
     75            'test_group', 'test_default', array(
     76                'default' => 'My Default :)',
     77            )
     78        );
    7179        wp_cache_delete( 'notoptions', 'options' );
    7280        $this->assertTrue( add_option( 'test_default', 'hello' ) );
Note: See TracChangeset for help on using the changeset viewer.