public
Created

Unit test for #22233

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php
 
function test_multiple_calls() {
 
$key = rand_str();
 
$obj1 = new stdClass;
$obj2 = new stdClass;
 
$obj1->prop = false;
$obj2->prop = false;
 
$array = array( $obj1, $obj2 );
$this->assertTrue( add_option( $key, $array ) );
 
$array[0]->prop = true;
$this->assertTrue( update_option( $key, $array ) );
 
$array[1]->prop = true;
$this->assertTrue( update_option( $key, $array ) );
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.