Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
pearbug13693
3
--FILE--
4
<?php
5
 
6
    require_once 'Cache/Lite.php';
7
 
8
    // Create temp dir
9
    $dir = dirname( __FILE__ ) . '/' . uniqid();
10
    mkdir( $dir );
11
 
12
    $options = array(
13
        'cacheDir' => $dir,
14
        'lifeTime' => 60,
15
    );
16
    $id = '#13693';
17
    $cache = new Cache_Lite($options);
18
    $cache->save('stuff', $id);
19
    // Must be true
20
    echo ( $cache->remove($id) === true ) ? "OK\n" : "ERROR\n";
21
    // Will return a PEAR Error
22
    echo ( $cache->remove($id) instanceof PEAR_Error ) ? "OK\n" : "ERROR\n";
23
    // Will return true
24
    echo ( $cache->remove($id, 'default', true) === true ) ? "OK\n" : "ERROR\n";
25
 
26
    // Remove temp dir
27
    rmdir( $dir );
28
--EXPECT--
29
OK
30
OK
31
OK