CacheCallbackTest::_startcallback PHP Method

_startcallback() protected method

protected _startcallback ( CacheAbstract $cache )
$cache Cachearium\CacheAbstract
    protected function _startcallback(CacheAbstract $cache)
    {
        $key = new CacheKey("startcallback", 1);
        $cache->clean($key);
        $this->assertFalse($cache->start($key));
        echo "something ";
        $this->assertTrue($cache->appendCallback('callbackTesterStart'));
        echo " otherthing";
        $output = $cache->end(false);
        $this->assertContains(CALLBACKVALUE, $output);
        // run again, we should have another value
        $second = $cache->start($key, null, false);
        $this->assertNotFalse($second);
        $this->assertContains(CALLBACKVALUE, $second);
        $this->assertNotEquals($second, $output);
    }