You appear to be a bot. Output may be restricted
Description
Usage
Tests_Option_UpdateOption::test_update_option_array_with_object();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/option/updateOption.php
Lines:
1 to 22 of 22
public function test_update_option_array_with_object() { $array_w_object = array( 'url' => 'http://src.wordpress-develop.dev/wp-content/uploads/2016/10/cropped-Blurry-Lights.jpg', 'meta_data' => (object) array( 'attachment_id' => 292, 'height' => 708, 'width' => 1260, ), ); // Add the option, it did not exist before this. add_option( 'array_w_object', $array_w_object ); $num_queries_pre_update = get_num_queries(); // Update the option using the same array with an object for the value. $this->assertFalse( update_option( 'array_w_object', $array_w_object ) ); // Check that no new database queries were performed. $this->assertSame( $num_queries_pre_update, get_num_queries() ); }