Make WordPress Core

Changeset 1202 in tests


Ignore:
Timestamp:
02/02/2013 02:14:05 AM (12 years ago)
Author:
nacin
Message:

Basic test that Services_JSON isn't broken. see #21568.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/compat.php

    r904 r1202  
    2727    }
    2828
     29    function test_json_encode_decode() {
     30        require_once( ABSPATH . WPINC . '/class-json.php' );
     31        $json = new Services_JSON();
     32        // Super basic test to verify Services_JSON is intact and working.
     33        $this->assertEquals( '["foo"]', $json->encodeUnsafe( array( 'foo' ) ) );
     34        $this->assertEquals( array( 'foo' ), $json->decode( '["foo"]' ) );
     35    }
    2936}
Note: See TracChangeset for help on using the changeset viewer.