Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
tests
unit
settings
SettingsTest.php
1
<?php
2
/**
3
*
4
*/
5
class
SettingsTest
extends
CTestCase
6
{
7
public
static
function
setUpBeforeClass()
8
{
9
Yii::app()->getModule(
'settings'
);
10
Settings::model
()->deleteAll();
11
}
12
13
/**
14
* @dataProvider provider
15
*/
16
public
function
testSet
($name, $value)
17
{
18
Settings::instance
()->set($name, $value);
19
}
20
21
/**
22
*
23
* @depends testSet
24
* @dataProvider provider
25
*/
26
public
function
testGet
($name, $value)
27
{
28
$this->assertEquals($value,
Settings::instance
()->
get
($name));
29
}
30
31
/**
32
* @depends testGet
33
* @dataProvider provider
34
*/
35
public
function
testUnset
($name)
36
{
37
Settings::instance
()->unsetValue($name);
38
}
39
40
public
function
testReload()
41
{
42
$this->assertInstanceOf(
'Settings'
,
Settings::reload
());
43
}
44
45
public
function
provider()
46
{
47
return
array(
48
array(
'name'
,
'peter'
),
49
array(
'pathToConfig'
,
'/var/www/conf.php'
),
50
array(
'numbers'
, array(1, 2, 3, 4, 5, 6)),
51
);
52
}
53
54
55
}
Generated on Thu Feb 6 2014 15:47:55 for Gentics Portal.Node PHP API by
1.8.1.2