Make WordPress Core

Changeset 327 in tests for wp-testcase/test_includes_cache.php


Ignore:
Timestamp:
01/20/2011 02:50:29 PM (15 years ago)
Author:
duck_
Message:

Fixes and cleanup in TestObjectCache and TestSSLLinks

TestObjectCache: null value is converted to empty string
TestSSLLinks: extra is_ssl checks; still todo - last invalid admin_url needs fixing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_cache.php

    r280 r327  
    1717
    1818    function &init_cache() {
    19         $cache = new WP_Object_cache();
     19        $cache = new WP_Object_Cache();
    2020        return $cache;
    2121    }
     
    4646        $val = null;
    4747
    48         // you can't store null in the cache
    49         $this->assertFalse($this->cache->add($key, $val));
    50         $this->assertFalse($this->cache->get($key));
     48        $this->assertTrue( $this->cache->add($key, $val) );
     49        // null is converted to empty string
     50        $this->assertEquals( '', $this->cache->get($key) );
    5151    }
    5252
     
    9393        $this->assertFalse($this->cache->get($key));
    9494    }
    95 
    9695}
    9796
Note: See TracChangeset for help on using the changeset viewer.