WordPress.org

Make WordPress Core

Changeset 428 in tests


Ignore:
Timestamp:
08/24/2011 07:33:25 PM (7 years ago)
Author:
ryan
Message:

metadata_exists() tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_meta.php

    r407 r428  
    9292        $this->assertFalse( $first === $second );
    9393    }
     94
     95    function test_metadata_exists() {
     96        if ( ! function_exists( 'metadata_exists' ) )
     97            return;
     98
     99        $this->assertFalse( metadata_exists( 'user',  $this->author->ID, 'foobarbaz' ) );
     100        $this->assertTrue( metadata_exists( 'user',  $this->author->ID, 'meta_key' ) );
     101        $this->assertFalse( metadata_exists( 'user',  1234567890, 'foobarbaz' ) );
     102        $this->assertFalse( metadata_exists( 'user',  1234567890, 'meta_key' ) );
     103    }
    94104}
Note: See TracChangeset for help on using the changeset viewer.