WordPress.org

Make WordPress Core

Ticket #13480: 13480-test.diff

File 13480-test.diff, 832 bytes (added by jgadbois, 4 years ago)
  • wp-testcase/test_includes_functions.php

     
    99                parent::tearDown(); 
    1010        } 
    1111 
     12   function test_update_option_object_caching() { 
     13                $x = new MockClass; 
     14      $x->arg1 = "Some Value"; 
     15      update_option('test_option', $x); 
     16      $x->arg1 = "Another Value"; 
     17      update_option('test_option', $x); 
     18 
     19      // we don't want to read the option from the cache 
     20      wp_cache_delete( 'test_option', 'options'); 
     21 
     22      // grabs from db since WP_INSTALLING is 1 
     23      $this->assertEquals("Another Value", get_option('test_option')->arg1); 
     24   } 
     25 
    1226        function test_wp_parse_args_object() { 
    1327                $x = new MockClass; 
    1428                $x->_baba = 5;