WordPress.org

Make WordPress Core

Changeset 422 in tests


Ignore:
Timestamp:
08/22/2011 11:23:16 PM (7 years ago)
Author:
ryan
Message:

Make sure add doesn't change value underneath even when returning false.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_option.php

    r419 r422  
    2222        $this->assertFalse( update_option( $key, $value ) );  // Value is the same
    2323        $this->assertTrue( update_option( $key, $value2 ) );
     24        $this->assertEquals( $value2, get_option( $key ) );
     25        $this->assertFalse( add_option( $key, $value ) );
    2426        $this->assertEquals( $value2, get_option( $key ) );
    2527        $this->assertTrue( delete_option( $key ) );
     
    6870        $this->assertFalse( update_site_option( $key, $value ) );  // Value is the same
    6971        $this->assertTrue( update_site_option( $key, $value2 ) );
     72        $this->assertEquals( $value2, get_site_option( $key ) );
     73        $this->assertFalse( add_site_option( $key, $value ) );
    7074        $this->assertEquals( $value2, get_site_option( $key ) );
    7175        $this->assertTrue( delete_site_option( $key ) );
Note: See TracChangeset for help on using the changeset viewer.