This repository was archived by the owner on Feb 1, 2026. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCache_Container_fileTest.php
More file actions
57 lines (48 loc) · 1.56 KB
/
Cache_Container_fileTest.php
File metadata and controls
57 lines (48 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
require_once 'Cache/Container/file.php';
/**
* Cache_Container_file test case.
*/
class Cache_Container_fileTest extends PHPUnit_Framework_TestCase {
/**
* @var Cache_Container_file
*/
private $Cache_Container_file;
/**
* Prepares the environment before running a test.
*/
protected function setUp() {
parent::setUp ();
$config = Array('cache_dir'=>sys_get_temp_dir(),'filename_prefix'=>'test');
$this->allowedOptions = Array('cache_dir', 'filename_prefix', 'max_userdata_linelength');
$this->Cache_Container_file = new Cache_Container_file('file', $config);
}
/**
* Cleans up the environment after running a test.
*/
protected function tearDown() {
$this->Cache_Container_file = null;
$this->allowedOptions = null;
parent::tearDown ();
}
/**
* Constructs the test case.
*/
public function __construct() {
}
/**
* Tests Cache_Container_file->Cache_Container_file()
*/
public function testCache_Container_file() {
$this->assertInstanceOf('Cache_Container_file', $this->Cache_Container_file);
}
public function testhasBeenSet() {
$this->AssertFalse($this->Cache_Container_file->hasBeenSet('propertynotset'));
$this->AssertTrue($this->Cache_Container_file->hasBeenSet('cache_dir'));
}
public function testAllowedOptions(){
$this->AssertEquals($this->allowedOptions,
$this->Cache_Container_file->getAllowedOptions()
);
}
}