/
Base.php
208 lines (184 loc) · 4.49 KB
/
Base.php
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?php
/**
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/gpl GPLv2
* @category Horde
* @package Horde_ActiveSync
* @subpackage UnitTests
*/
class Horde_ActiveSync_StateTest_Sql_Base extends Horde_ActiveSync_StateTest_Base
{
protected static $db;
protected static $migrator;
protected static $reason;
public function testGetDeviceInfo()
{
$this->_testGetDeviceInfo();
}
/**
* @depends testGetDeviceInfo
*/
public function testCacheInitialState()
{
$this->_testCacheInitialState();
}
/**
* @depends testCacheInitialState
*/
public function testCacheFolders()
{
$this->_testCacheFolders();
}
/**
* @depends testCacheFolders
*/
public function testCacheDataRestrictFields()
{
$this->_testCacheDataRestrictFields();
}
/**
* @depends testCacheFolders
*/
public function testCacheFoldersPersistence()
{
$this->_testCacheFoldersPersistence();
}
/**
* @depends testCacheFolders
*/
public function testCacheUniqueness()
{
$this->_testCacheUniqueness();
}
/**
* @depends testCacheFolders
*/
public function testCacheCollections()
{
$this->_testCacheCollections();
}
/**
* @depends testCacheCollections
*/
public function testLoadCollectionsFromCache()
{
return $this->_testLoadCollectionsFromCache();
}
/**
* @depends testCacheCollections
*/
public function testGettingImapId()
{
$this->_testGettingImapId();
}
/**
* @depends testCacheCollections
*/
public function testCacheRefreshCollections()
{
$this->_testCacheRefreshCollections();
}
/**
* @depends testCacheCollections
*/
public function testCollectionsFromCache()
{
$this->_testCollectionsFromCache();
}
/**
* @depends testCacheFolders
*/
public function testGetStateWithNoState()
{
$this->_testGetStateWithNoState();
}
/**
* @depends testCollectionsFromCache
*/
public function testCollectionHandler()
{
$this->_testCollectionHandler();
}
/**
* @depends testCollectionHandler
*/
public function testPartialSyncWithChangedCollections()
{
$this->_testPartialSyncWithChangedCollections();
}
/**
* @depends testCollectionHandler
*/
public function testPartialSyncWithUnchangedCollections()
{
$this->_testPartialSyncWithUnchangedCollections();
}
/**
* @depends testCollectionHandler
*/
public function testMissingCollections()
{
$this->_testMissingCollections();
}
/**
* @depends testCollectionHandler
*/
public function testChangingFilterType()
{
$this->_testChangingFilterType();
}
/**
* @depends testCollectionHandler
*/
public function testEmptyResponse()
{
$this->_testEmptyResponse();
}
/**
* @depends testGetDeviceInfo
*/
public function testHierarchy()
{
$this->_testHierarchy();
}
/**
* @depends testCollectionHandler
*/
public function testPartialSyncWithOnlyChangedHbInterval()
{
$this->_testPartialSyncWithOnlyChangedHbInterval();
}
public static function setUpBeforeClass()
{
$dir = dirname(__FILE__) . '/../../../../../migration/Horde/ActiveSync';
if (!is_dir($dir)) {
error_reporting(E_ALL & ~E_DEPRECATED);
$dir = PEAR_Config::singleton()
->get('data_dir', null, 'pear.horde.org')
. '/Horde_ActiveSync/migration';
error_reporting(E_ALL | E_STRICT);
}
self::$logger = new Horde_Test_Log();
self::$migrator = new Horde_Db_Migration_Migrator(
self::$db,
self::$logger->getLogger(),
array('migrationsPath' => $dir,
'schemaTableName' => 'horde_activesync_test_schema'));
self::$migrator->up();
}
public static function tearDownAfterClass()
{
if (self::$migrator) {
self::$migrator->down();
}
self::$db = null;
parent::tearDownAfterClass();
}
public function setUp()
{
if (!self::$db) {
$this->markTestSkipped(self::$reason);
}
self::$state = new Horde_ActiveSync_State_Sql(array('db' => self::$db));
}
}