Changeset 34759
- Timestamp:
- 10/02/2015 02:05:23 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/siteOption.php
r34758 r34759 115 115 } 116 116 117 function test_s erialized_data() {117 function test_site_option_add_and_get_serialized_array() { 118 118 $key = rand_str(); 119 119 $value = array( 'foo' => true, 'bar' => true ); 120 add_site_option( $key, $value ); 121 $this->assertEquals( $value, get_site_option( $key ) ); 122 } 120 123 121 $this->assertTrue( add_site_option( $key, $value ) ); 124 function test_site_option_add_and_get_serialized_object() { 125 $key = rand_str(); 126 $value = new stdClass(); 127 $value->foo = true; 128 $value->bar = true; 129 add_site_option( $key, $value ); 122 130 $this->assertEquals( $value, get_site_option( $key ) ); 123 124 $value = (object) $value;125 $this->assertTrue( update_site_option( $key, $value ) );126 $this->assertEquals( $value, get_site_option( $key ) );127 $this->assertTrue( delete_site_option( $key ) );128 131 } 129 132
Note: See TracChangeset
for help on using the changeset viewer.