Help for this page

Select Code to Download


  1. or download this
    function testAdd() {
        $hash = new Hash;
    ...
        $hash->add("foo","bar");
        assert($OK == $hash->remove("foo"));
    }
    
  2. or download this
    function testGetShouldNotDieHorriblyIfKeyNotFound() {
        $hash = new Hash;
    ...
        $hash->remove("foo");
        assert("bar" != $hash->get("foo"));  # hey look, still there
    }