Make WordPress Core

Changeset 1148 in tests for trunk/tests/term/slashes.php


Ignore:
Timestamp:
11/21/2012 03:01:28 PM (13 years ago)
Author:
ryan
Message:

Pinking shears and eol-style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/term/slashes.php

    r1071 r1148  
    3939        );
    4040        $_POST = add_magic_quotes( $_POST );
    41        
     41
    4242        // Make the request
    4343        try {
     
    4646            unset( $e );
    4747        }
    48        
     48
    4949        $term = get_term_by( 'slug', 'string-with-1-slash', 'category' );
    5050        $this->assertEquals( $this->slash_1, $term->name );
     
    5757        );
    5858        $_POST = add_magic_quotes( $_POST );
    59        
     59
    6060        // Make the request
    6161        try {
     
    6464            unset( $e );
    6565        }
    66        
     66
    6767        $term = get_term_by( 'slug', 'string-with-3-slashes', 'category' );
    6868        $this->assertEquals( $this->slash_3, $term->name );
     
    7575        );
    7676        $_POST = add_magic_quotes( $_POST );
    77        
     77
    7878        // Make the request
    7979        try {
     
    8282            unset( $e );
    8383        }
    84        
     84
    8585        $term = get_term_by( 'slug', 'string-with-2-slashes', 'category' );
    8686        $this->assertEquals( $this->slash_2, $term->name );
    8787
    8888    }
    89    
     89
    9090    /**
    9191     * Tests the controller function that expects slashed data
     
    9999        foreach ( $taxonomies as $taxonomy ) {
    100100            $_POST = $_GET = $_REQUEST = array();
    101            
     101
    102102            $_POST = array(
    103103                '_wpnonce_add-tag' => wp_create_nonce( 'add-tag' ),
     
    108108            );
    109109            $_POST = add_magic_quotes( $_POST );
    110            
     110
    111111            // Make the request
    112112            try {
     
    115115                unset( $e );
    116116            }
    117            
     117
    118118            $term = get_term_by( 'slug', 'controller_slash_test_1_'.$taxonomy, $taxonomy );
    119119            $this->assertEquals( $this->slash_1, $term->name );
     
    128128            );
    129129            $_POST = add_magic_quotes( $_POST );
    130            
     130
    131131            // Make the request
    132132            try {
     
    135135                unset( $e );
    136136            }
    137            
     137
    138138            $term = get_term_by( 'slug', 'controller_slash_test_2_'.$taxonomy, $taxonomy );
    139139            $this->assertEquals( $this->slash_3, $term->name );
     
    148148            );
    149149            $_POST = add_magic_quotes( $_POST );
    150            
     150
    151151            // Make the request
    152152            try {
     
    155155                unset( $e );
    156156            }
    157            
     157
    158158            $term = get_term_by( 'slug', 'controller_slash_test_3_'.$taxonomy, $taxonomy );
    159159            $this->assertEquals( $this->slash_2, $term->name );
     
    161161        }
    162162    }
    163    
     163
    164164    /**
    165165     * Tests the model function that expects un-slashed data
     
    183183            $this->assertEquals( $this->slash_1, $term->name );
    184184            $this->assertEquals( $this->slash_3, $term->description );
    185    
     185
    186186            $insert = wp_insert_term(
    187187                $this->slash_3,
     
    195195            $this->assertEquals( $this->slash_3, $term->name );
    196196            $this->assertEquals( $this->slash_5, $term->description );
    197    
     197
    198198            $insert = wp_insert_term(
    199199                $this->slash_2,
     
    223223                'taxonomy' => $taxonomy
    224224            ));
    225    
     225
    226226            $update = wp_update_term(
    227227                $id,
     
    236236            $this->assertEquals( $this->slash_1, $term->name );
    237237            $this->assertEquals( $this->slash_3, $term->description );
    238    
     238
    239239            $update = wp_update_term(
    240240                $id,
     
    248248            $this->assertEquals( $this->slash_3, $term->name );
    249249            $this->assertEquals( $this->slash_5, $term->description );
    250    
     250
    251251            $update = wp_update_term(
    252252                $id,
Note: See TracChangeset for help on using the changeset viewer.