WordPress.org

Make WordPress Core

Changeset 1291 in tests


Ignore:
Timestamp:
05/29/13 10:59:41 (22 months ago)
Author:
westi
Message:

XMLRPC: Add tests for new readonly "options" to read the login and admin urls for a site. See #23446.

Also fix the site url tests to match the option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/xmlrpc/wp/getOptions.php

    r904 r1291  
    4747        $this->assertTrue( $result['software_version']['readonly'] ); 
    4848 
    49         /* TODO: Gives junk data in Test Environment 
    50         $this->assertEquals( get_site_url(), $result['site-url']['value'] ); 
    51         $this->assertTrue( $result['site-url']['readonly'] ); 
    52         */ 
     49        $this->assertEquals( get_site_url(), $result['blog_url']['value'] ); 
     50        $this->assertTrue( $result['blog_url']['readonly'] ); 
     51 
     52        $this->assertEquals( wp_login_url(), $result['login_url']['value'] ); 
     53        $this->assertTrue( $result['login_url']['readonly'] ); 
     54 
     55        $this->assertEquals( get_admin_url(), $result['admin_url']['value'] ); 
     56        $this->assertTrue( $result['admin_url']['readonly'] ); 
    5357 
    5458        $this->assertEquals( get_option( 'image_default_link_type' ), $result['image_default_link_type']['value'] ); 
     
    132136        $this->assertTrue( $result['software_version']['readonly'] ); 
    133137 
    134         /* TODO: Gives junk data in Test Environment 
    135         $this->assertEquals( get_site_url(), $result['site-url']['value'] ); 
    136         $this->assertTrue( $result['site-url']['readonly'] ); 
    137         */ 
     138        $this->assertEquals( get_site_url(), $result['blog_url']['value'] ); 
     139        $this->assertTrue( $result['blog_url']['readonly'] ); 
     140 
     141        $this->assertEquals( wp_login_url(), $result['login_url']['value'] ); 
     142        $this->assertTrue( $result['login_url']['readonly'] ); 
     143 
     144        $this->assertEquals( get_admin_url(), $result['admin_url']['value'] ); 
     145        $this->assertTrue( $result['admin_url']['readonly'] ); 
    138146 
    139147        $this->assertEquals( get_option( 'image_default_link_type' ), $result['image_default_link_type']['value'] ); 
Note: See TracChangeset for help on using the changeset viewer.