Changeset 1215 in tests for trunk/tests/meta.php
- Timestamp:
- 02/14/2013 10:51:37 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/meta.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/meta.php
r1207 r1215 125 125 $key = rand_str(); 126 126 $value = 'Test\\singleslash'; 127 $expected = 'Test singleslash';127 $expected = 'Test\\singleslash'; 128 128 $value2 = 'Test\\\\doubleslash'; 129 $expected2 = 'Test\\doubleslash'; 129 $expected2 = 'Test\\\\doubleslash'; 130 $value3 = 'Test\oneslash'; 131 $expected3 = 'Test\oneslash'; 130 132 $this->assertFalse( metadata_exists( 'user', $this->author->ID, $key ) ); 131 133 $this->assertFalse( delete_metadata( 'user', $this->author->ID, $key ) ); … … 150 152 $this->assertInternalType( 'int', update_metadata( 'user', $this->author->ID, $key, $value2 ) ); 151 153 $this->assertEquals( $expected2, get_metadata( 'user', $this->author->ID, $key, true ) ); 154 $this->assertTrue( delete_metadata( 'user', $this->author->ID, $key ) ); 155 $this->assertSame( '', get_metadata( 'user', $this->author->ID, $key, true ) ); 156 $this->assertFalse( metadata_exists( 'user', $this->author->ID, $key ) ); 157 158 $this->assertInternalType( 'int', add_metadata( 'user', $this->author->ID, $key, $value3 ) ); 159 $this->assertEquals( $expected3, get_metadata( 'user', $this->author->ID, $key, true ) ); 160 $this->assertTrue( delete_metadata( 'user', $this->author->ID, $key ) ); 161 $this->assertSame( '', get_metadata( 'user', $this->author->ID, $key, true ) ); 162 $this->assertInternalType( 'int', update_metadata( 'user', $this->author->ID, $key, $value3 ) ); 163 $this->assertEquals( $expected3, get_metadata( 'user', $this->author->ID, $key, true ) ); 152 164 } 153 165 }
Note: See TracChangeset
for help on using the changeset viewer.