Show
Ignore:
Timestamp:
06/21/07 11:46:08 (1 year ago)
Author:
mikey
Message:

added unit tests for net.stubbles.util.cache

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/util/cache/stubAbstractCacheContainer.php

    r738 r741  
    1818     * the strategy used for decisions about caching 
    1919     * 
    20      * @var  stubCacheStrage
     20     * @var  stubCacheStrateg
    2121     */ 
    2222    protected $strategy; 
     
    3535 
    3636    /** 
     37     * constructor 
     38     * 
     39     * @param  string             $id        id of the container 
     40     * @param  stubCacheStrategy  $strategy  strategy the container should use 
     41     */ 
     42    public function __construct($id, stubCacheStrategy $strategy) 
     43    { 
     44        $this->id       = $id; 
     45        $this->strategy = $strategy; 
     46    } 
     47 
     48    /** 
    3749     * sets the id of the container 
    3850     * 
     
    5769     * sets the strategy the container should use 
    5870     * 
    59      * @param  stubCacheStragey  $strategy 
    60      */ 
    61     public function setStrategy(stubCacheStragey $strategy) 
     71     * @param  stubCacheStrategy  $strategy 
     72     */ 
     73    public function setStrategy(stubCacheStrategy $strategy) 
    6274    { 
    6375        $this->strategy = $strategy; 
     
    7587    public function put($key, $data) 
    7688    { 
    77         if ($this->strategy->isCacheable($this, $key, $data) == false) { 
     89        if ($this->strategy->isCachable($this, $key, $data) == false) { 
    7890            return false; 
    7991        }