Make WordPress Core

Changeset 904 in tests for trunk/tests/compat.php


Ignore:
Timestamp:
07/18/2012 07:01:41 PM (12 years ago)
Author:
nacin
Message:

Rename tests to conform to this standard: the class Tests_A_B_C.php should be found in Tests/A/B/C.php.

One class per file. Tests are now organized by general component, rather than by the core file they are found in.

Work in progress. Some classes need to be renamed, and some files still need to be moved (and split up).

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/compat.php

    r903 r904  
    44 * @group compat
    55 */
    6 class TestMbSubStr extends WP_UnitTestCase {
    7     function test_mb_strcut() {
     6class Tests_Compat extends WP_UnitTestCase {
     7    function test_mb_substr() {
    88        $this->assertEquals('баб', _mb_substr('баба', 0, 3));
    99        $this->assertEquals('баб', _mb_substr('баба', 0, -1));
     
    1111        $this->assertEquals('I am your б', _mb_substr('I am your баба', 0, 11));
    1212    }
    13 }
    1413
    15 /**
    16  * @group compat
    17  */
    18 class TestHashHMAC extends WP_UnitTestCase {
    19     function test_simple() {
     14    function test_hash_hmac_simple() {
    2015        $this->assertEquals('140d1cb79fa12e2a31f32d35ad0a2723', _hash_hmac('md5', 'simple', 'key'));
    2116        $this->assertEquals('993003b95758e0ac2eba451a4c5877eb1bb7b92a', _hash_hmac('sha1', 'simple', 'key'));
    2217    }
    2318
    24     function test_key_padding() {
     19    function test_hash_hmac_padding() {
    2520        $this->assertEquals('3c1399103807cf12ec38228614416a8c', _hash_hmac('md5', 'simple', '65 character key 65 character key 65 character key 65 character k'));
    2621        $this->assertEquals('4428826d20003e309d6c2a6515891370daf184ea', _hash_hmac('sha1', 'simple', '65 character key 65 character key 65 character key 65 character k'));
    2722    }
    2823
    29     function test_raw_output() {
     24    function test_hash_hmac_output() {
    3025        $this->assertEquals(array( 1 => '140d1cb79fa12e2a31f32d35ad0a2723'), unpack('H32', _hash_hmac('md5', 'simple', 'key', true)));
    3126        $this->assertEquals(array( 1 => '993003b95758e0ac2eba451a4c5877eb1bb7b92a'), unpack('H40', _hash_hmac('sha1', 'simple', 'key', true)));
Note: See TracChangeset for help on using the changeset viewer.