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/transient.php

    r38382 r42343  
    1515
    1616    function test_the_basics() {
    17         $key = 'key1';
    18         $value = 'value1';
     17        $key    = 'key1';
     18        $value  = 'value1';
    1919        $value2 = 'value2';
    2020
     
    3131
    3232    function test_serialized_data() {
    33         $key = rand_str();
    34         $value = array( 'foo' => true, 'bar' => true );
     33        $key   = rand_str();
     34        $value = array(
     35            'foo' => true,
     36            'bar' => true,
     37        );
    3538
    3639        $this->assertTrue( set_transient( $key, $value ) );
     
    4750     */
    4851    function test_transient_data_with_timeout() {
    49         $key = rand_str();
     52        $key   = rand_str();
    5053        $value = rand_str();
    5154
     
    6871     */
    6972    function test_transient_add_timeout() {
    70         $key = rand_str();
    71         $value = rand_str();
     73        $key    = rand_str();
     74        $value  = rand_str();
    7275        $value2 = rand_str();
    7376        $this->assertTrue( set_transient( $key, $value ) );
     
    125128
    126129        // Make sure the timeout option returns false
    127         $timeout = '_transient_timeout_' . $key;
     130        $timeout          = '_transient_timeout_' . $key;
    128131        $transient_option = '_transient_' . $key;
    129132        add_filter( 'option_' . $timeout, '__return_zero' );
Note: See TracChangeset for help on using the changeset viewer.