You appear to be a bot. Output may be restricted
Description
Usage
Tests_Admin_IncludesSchema::test_populate_options( $options, $expected );
Parameters
- $options
- ( mixed ) required –
- $expected
- ( mixed ) required –
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/admin/includesSchema.php
Lines:
1 to 22 of 22
public function test_populate_options( $options, $expected ) { global $wpdb; $orig_options = $wpdb->options; $wpdb->options = self::$options; populate_options( $options ); wp_cache_delete( 'alloptions', 'options' ); $results = array(); foreach ( $expected as $option => $value ) { $results[ $option ] = get_option( $option ); } $wpdb->query( "TRUNCATE TABLE {$wpdb->options}" ); $wpdb->options = $orig_options; $this->assertSame( $expected, $results ); }