WordPress.org

Make WordPress Core

Changeset 377 in tests


Ignore:
Timestamp:
07/20/11 13:04:27 (3 years ago)
Author:
ryan
Message:

Adapt to register_meta() API changes.

Location:
wp-testcase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_meta.php

    r376 r377  
    2525        $this->assertEquals( 'unsanitized', $meta ); 
    2626 
    27         register_meta( 'some_meta', 'post', array( &$this, '_meta_sanitize_cb' ) ); 
     27        register_meta( 'post', 'some_meta', array( &$this, '_meta_sanitize_cb' ) ); 
    2828        $meta = sanitize_meta( 'some_meta', 'unsanitized', 'post' ); 
    2929        $this->assertEquals( 'sanitized', $meta ); 
  • wp-testcase/test_user_capabilities.php

    r376 r377  
    469469            $this->assertFalse( $admin->has_cap('delete_post_meta', $post, '_protected') ); 
    470470 
    471             register_meta( '_protected', 'post', array( &$this, '_meta_filter' ), array( &$this, '_meta_yes_you_can' ) ); 
     471            register_meta( 'post', '_protected', array( &$this, '_meta_filter' ), array( &$this, '_meta_yes_you_can' ) ); 
    472472            $this->assertTrue( $admin->has_cap('edit_post_meta',  $post, '_protected') ); 
    473473            $this->assertTrue( $admin->has_cap('add_post_meta',  $post, '_protected') ); 
     
    478478            $this->assertTrue( $admin->has_cap('delete_post_meta', $post, 'not_protected') ); 
    479479 
    480             register_meta( 'not_protected', 'post', array( &$this, '_meta_filter' ), array( &$this, '_meta_no_you_cant' ) ); 
     480            register_meta( 'post', 'not_protected', array( &$this, '_meta_filter' ), array( &$this, '_meta_no_you_cant' ) ); 
    481481            $this->assertFalse( $admin->has_cap('edit_post_meta',  $post, 'not_protected') ); 
    482482            $this->assertFalse( $admin->has_cap('add_post_meta',  $post, 'not_protected') ); 
Note: See TracChangeset for help on using the changeset viewer.