WordPress.org

Make WordPress Core

Changeset 542 in tests


Ignore:
Timestamp:
02/15/12 17:11:11 (2 years ago)
Author:
westi
Message:

XMLRPC wp.getTerm(): Switch to assertStringMatchesFormat so that we check both the datatype and that it looks like an integer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test-xmlrpc-api/test_wp_getTerm.php

    r541 r542  
    9696        // Check DataTypes 
    9797        // We expect all ID's to be strings not integers so we don't return something larger than an XMLRPC integer can describe. 
    98         $this->assertInternalType( 'string', $result['term_id'] ); 
    99         $this->assertInternalType( 'string', $result['term_taxonomy_id'] ); 
    100         $this->assertInternalType( 'string', $result['parent'] ); 
    101         $this->assertInternalType( 'string', $result['count'] ); 
     98        $this->assertStringMatchesFormat( '%d', $result['term_id'] ); 
     99        $this->assertStringMatchesFormat( '%d', $result['term_taxonomy_id'] ); 
     100        $this->assertStringMatchesFormat( '%d', $result['parent'] ); 
     101        $this->assertStringMatchesFormat( '%d', $result['count'] ); 
    102102    } 
    103103} 
Note: See TracChangeset for help on using the changeset viewer.