Completed
Branch master (838035)
by Michael
03:45
created
htdocs/modules/extcal/class/pear/Calendar/tests/decorator_test.php 1 patch
Spacing   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 require_once 'simple_include.php';
5 5
 require_once 'calendar_include.php';
6 6
 
7
-Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine');
8
-Mock::generate('Calendar_Second','Mock_Calendar_Second');
9
-Mock::generate('Calendar_Week','Mock_Calendar_Week');
10
-Mock::generate('Calendar_Day','Mock_Calendar_Day');
7
+Mock::generate('Calendar_Engine_Interface', 'Mock_Calendar_Engine');
8
+Mock::generate('Calendar_Second', 'Mock_Calendar_Second');
9
+Mock::generate('Calendar_Week', 'Mock_Calendar_Week');
10
+Mock::generate('Calendar_Day', 'Mock_Calendar_Day');
11 11
 
12 12
 /**
13 13
  * Class TestOfDecorator
@@ -25,290 +25,290 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $this->mockengine = new Mock_Calendar_Engine($this);
27 27
         $this->mockcal = new Mock_Calendar_Second($this);
28
-        $this->mockcal->setReturnValue('prevYear',2002);
29
-        $this->mockcal->setReturnValue('thisYear',2003);
30
-        $this->mockcal->setReturnValue('nextYear',2004);
31
-        $this->mockcal->setReturnValue('prevMonth',9);
32
-        $this->mockcal->setReturnValue('thisMonth',10);
33
-        $this->mockcal->setReturnValue('nextMonth',11);
34
-        $this->mockcal->setReturnValue('prevDay',14);
35
-        $this->mockcal->setReturnValue('thisDay',15);
36
-        $this->mockcal->setReturnValue('nextDay',16);
37
-        $this->mockcal->setReturnValue('prevHour',12);
38
-        $this->mockcal->setReturnValue('thisHour',13);
39
-        $this->mockcal->setReturnValue('nextHour',14);
40
-        $this->mockcal->setReturnValue('prevMinute',29);
41
-        $this->mockcal->setReturnValue('thisMinute',30);
42
-        $this->mockcal->setReturnValue('nextMinute',31);
43
-        $this->mockcal->setReturnValue('prevSecond',44);
44
-        $this->mockcal->setReturnValue('thisSecond',45);
45
-        $this->mockcal->setReturnValue('nextSecond',46);
46
-        $this->mockcal->setReturnValue('getEngine',$this->mockengine);
47
-        $this->mockcal->setReturnValue('getTimestamp',12345);
28
+        $this->mockcal->setReturnValue('prevYear', 2002);
29
+        $this->mockcal->setReturnValue('thisYear', 2003);
30
+        $this->mockcal->setReturnValue('nextYear', 2004);
31
+        $this->mockcal->setReturnValue('prevMonth', 9);
32
+        $this->mockcal->setReturnValue('thisMonth', 10);
33
+        $this->mockcal->setReturnValue('nextMonth', 11);
34
+        $this->mockcal->setReturnValue('prevDay', 14);
35
+        $this->mockcal->setReturnValue('thisDay', 15);
36
+        $this->mockcal->setReturnValue('nextDay', 16);
37
+        $this->mockcal->setReturnValue('prevHour', 12);
38
+        $this->mockcal->setReturnValue('thisHour', 13);
39
+        $this->mockcal->setReturnValue('nextHour', 14);
40
+        $this->mockcal->setReturnValue('prevMinute', 29);
41
+        $this->mockcal->setReturnValue('thisMinute', 30);
42
+        $this->mockcal->setReturnValue('nextMinute', 31);
43
+        $this->mockcal->setReturnValue('prevSecond', 44);
44
+        $this->mockcal->setReturnValue('thisSecond', 45);
45
+        $this->mockcal->setReturnValue('nextSecond', 46);
46
+        $this->mockcal->setReturnValue('getEngine', $this->mockengine);
47
+        $this->mockcal->setReturnValue('getTimestamp', 12345);
48 48
 
49 49
     }
50 50
     function tearDown()
51 51
     {
52
-        unset ( $this->engine );
53
-        unset ( $this->mockcal );
52
+        unset ($this->engine);
53
+        unset ($this->mockcal);
54 54
     }
55 55
     function testPrevYear()
56 56
     {
57
-        $this->mockcal->expectOnce('prevYear',array('int'));
57
+        $this->mockcal->expectOnce('prevYear', array('int'));
58 58
         $Decorator = new Calendar_Decorator($this->mockcal);
59
-        $this->assertEqual(2002,$Decorator->prevYear());
59
+        $this->assertEqual(2002, $Decorator->prevYear());
60 60
     }
61 61
     function testThisYear()
62 62
     {
63
-        $this->mockcal->expectOnce('thisYear',array('int'));
63
+        $this->mockcal->expectOnce('thisYear', array('int'));
64 64
         $Decorator = new Calendar_Decorator($this->mockcal);
65
-        $this->assertEqual(2003,$Decorator->thisYear());
65
+        $this->assertEqual(2003, $Decorator->thisYear());
66 66
     }
67 67
     function testNextYear()
68 68
     {
69
-        $this->mockcal->expectOnce('nextYear',array('int'));
69
+        $this->mockcal->expectOnce('nextYear', array('int'));
70 70
         $Decorator = new Calendar_Decorator($this->mockcal);
71
-        $this->assertEqual(2004,$Decorator->nextYear());
71
+        $this->assertEqual(2004, $Decorator->nextYear());
72 72
     }
73 73
     function testPrevMonth()
74 74
     {
75
-        $this->mockcal->expectOnce('prevMonth',array('int'));
75
+        $this->mockcal->expectOnce('prevMonth', array('int'));
76 76
         $Decorator = new Calendar_Decorator($this->mockcal);
77
-        $this->assertEqual(9,$Decorator->prevMonth());
77
+        $this->assertEqual(9, $Decorator->prevMonth());
78 78
     }
79 79
     function testThisMonth()
80 80
     {
81
-        $this->mockcal->expectOnce('thisMonth',array('int'));
81
+        $this->mockcal->expectOnce('thisMonth', array('int'));
82 82
         $Decorator = new Calendar_Decorator($this->mockcal);
83
-        $this->assertEqual(10,$Decorator->thisMonth());
83
+        $this->assertEqual(10, $Decorator->thisMonth());
84 84
     }
85 85
     function testNextMonth()
86 86
     {
87
-        $this->mockcal->expectOnce('nextMonth',array('int'));
87
+        $this->mockcal->expectOnce('nextMonth', array('int'));
88 88
         $Decorator = new Calendar_Decorator($this->mockcal);
89
-        $this->assertEqual(11,$Decorator->nextMonth());
89
+        $this->assertEqual(11, $Decorator->nextMonth());
90 90
     }
91 91
     function testPrevWeek()
92 92
     {
93 93
         $mockweek = new Mock_Calendar_Week($this);
94
-        $mockweek->setReturnValue('prevWeek',1);
95
-        $mockweek->expectOnce('prevWeek',array('n_in_month'));
94
+        $mockweek->setReturnValue('prevWeek', 1);
95
+        $mockweek->expectOnce('prevWeek', array('n_in_month'));
96 96
         $Decorator = new Calendar_Decorator($mockweek);
97
-        $this->assertEqual(1,$Decorator->prevWeek());
97
+        $this->assertEqual(1, $Decorator->prevWeek());
98 98
     }
99 99
     function testThisWeek()
100 100
     {
101 101
         $mockweek = new Mock_Calendar_Week($this);
102
-        $mockweek->setReturnValue('thisWeek',2);
103
-        $mockweek->expectOnce('thisWeek',array('n_in_month'));
102
+        $mockweek->setReturnValue('thisWeek', 2);
103
+        $mockweek->expectOnce('thisWeek', array('n_in_month'));
104 104
         $Decorator = new Calendar_Decorator($mockweek);
105
-        $this->assertEqual(2,$Decorator->thisWeek());
105
+        $this->assertEqual(2, $Decorator->thisWeek());
106 106
     }
107 107
     function testNextWeek()
108 108
     {
109 109
         $mockweek = new Mock_Calendar_Week($this);
110
-        $mockweek->setReturnValue('nextWeek',3);
111
-        $mockweek->expectOnce('nextWeek',array('n_in_month'));
110
+        $mockweek->setReturnValue('nextWeek', 3);
111
+        $mockweek->expectOnce('nextWeek', array('n_in_month'));
112 112
         $Decorator = new Calendar_Decorator($mockweek);
113
-        $this->assertEqual(3,$Decorator->nextWeek());
113
+        $this->assertEqual(3, $Decorator->nextWeek());
114 114
     }
115 115
     function testPrevDay()
116 116
     {
117
-        $this->mockcal->expectOnce('prevDay',array('int'));
117
+        $this->mockcal->expectOnce('prevDay', array('int'));
118 118
         $Decorator = new Calendar_Decorator($this->mockcal);
119
-        $this->assertEqual(14,$Decorator->prevDay());
119
+        $this->assertEqual(14, $Decorator->prevDay());
120 120
     }
121 121
     function testThisDay()
122 122
     {
123
-        $this->mockcal->expectOnce('thisDay',array('int'));
123
+        $this->mockcal->expectOnce('thisDay', array('int'));
124 124
         $Decorator = new Calendar_Decorator($this->mockcal);
125
-        $this->assertEqual(15,$Decorator->thisDay());
125
+        $this->assertEqual(15, $Decorator->thisDay());
126 126
     }
127 127
     function testNextDay()
128 128
     {
129
-        $this->mockcal->expectOnce('nextDay',array('int'));
129
+        $this->mockcal->expectOnce('nextDay', array('int'));
130 130
         $Decorator = new Calendar_Decorator($this->mockcal);
131
-        $this->assertEqual(16,$Decorator->nextDay());
131
+        $this->assertEqual(16, $Decorator->nextDay());
132 132
     }
133 133
     function testPrevHour()
134 134
     {
135
-        $this->mockcal->expectOnce('prevHour',array('int'));
135
+        $this->mockcal->expectOnce('prevHour', array('int'));
136 136
         $Decorator = new Calendar_Decorator($this->mockcal);
137
-        $this->assertEqual(12,$Decorator->prevHour());
137
+        $this->assertEqual(12, $Decorator->prevHour());
138 138
     }
139 139
     function testThisHour()
140 140
     {
141
-        $this->mockcal->expectOnce('thisHour',array('int'));
141
+        $this->mockcal->expectOnce('thisHour', array('int'));
142 142
         $Decorator = new Calendar_Decorator($this->mockcal);
143
-        $this->assertEqual(13,$Decorator->thisHour());
143
+        $this->assertEqual(13, $Decorator->thisHour());
144 144
     }
145 145
     function testNextHour()
146 146
     {
147
-        $this->mockcal->expectOnce('nextHour',array('int'));
147
+        $this->mockcal->expectOnce('nextHour', array('int'));
148 148
         $Decorator = new Calendar_Decorator($this->mockcal);
149
-        $this->assertEqual(14,$Decorator->nextHour());
149
+        $this->assertEqual(14, $Decorator->nextHour());
150 150
     }
151 151
     function testPrevMinute()
152 152
     {
153
-        $this->mockcal->expectOnce('prevMinute',array('int'));
153
+        $this->mockcal->expectOnce('prevMinute', array('int'));
154 154
         $Decorator = new Calendar_Decorator($this->mockcal);
155
-        $this->assertEqual(29,$Decorator->prevMinute());
155
+        $this->assertEqual(29, $Decorator->prevMinute());
156 156
     }
157 157
     function testThisMinute()
158 158
     {
159
-        $this->mockcal->expectOnce('thisMinute',array('int'));
159
+        $this->mockcal->expectOnce('thisMinute', array('int'));
160 160
         $Decorator = new Calendar_Decorator($this->mockcal);
161
-        $this->assertEqual(30,$Decorator->thisMinute());
161
+        $this->assertEqual(30, $Decorator->thisMinute());
162 162
     }
163 163
     function testNextMinute()
164 164
     {
165
-        $this->mockcal->expectOnce('nextMinute',array('int'));
165
+        $this->mockcal->expectOnce('nextMinute', array('int'));
166 166
         $Decorator = new Calendar_Decorator($this->mockcal);
167
-        $this->assertEqual(31,$Decorator->nextMinute());
167
+        $this->assertEqual(31, $Decorator->nextMinute());
168 168
     }
169 169
     function testPrevSecond()
170 170
     {
171
-        $this->mockcal->expectOnce('prevSecond',array('int'));
171
+        $this->mockcal->expectOnce('prevSecond', array('int'));
172 172
         $Decorator = new Calendar_Decorator($this->mockcal);
173
-        $this->assertEqual(44,$Decorator->prevSecond());
173
+        $this->assertEqual(44, $Decorator->prevSecond());
174 174
     }
175 175
     function testThisSecond()
176 176
     {
177
-        $this->mockcal->expectOnce('thisSecond',array('int'));
177
+        $this->mockcal->expectOnce('thisSecond', array('int'));
178 178
         $Decorator = new Calendar_Decorator($this->mockcal);
179
-        $this->assertEqual(45,$Decorator->thisSecond());
179
+        $this->assertEqual(45, $Decorator->thisSecond());
180 180
     }
181 181
     function testNextSecond()
182 182
     {
183
-        $this->mockcal->expectOnce('nextSecond',array('int'));
183
+        $this->mockcal->expectOnce('nextSecond', array('int'));
184 184
         $Decorator = new Calendar_Decorator($this->mockcal);
185
-        $this->assertEqual(46,$Decorator->nextSecond());
185
+        $this->assertEqual(46, $Decorator->nextSecond());
186 186
     }
187 187
     function testGetEngine()
188 188
     {
189 189
         $Decorator = new Calendar_Decorator($this->mockcal);
190
-        $this->assertIsA($Decorator->getEngine(),'Mock_Calendar_Engine');
190
+        $this->assertIsA($Decorator->getEngine(), 'Mock_Calendar_Engine');
191 191
     }
192 192
     function testSetTimestamp()
193 193
     {
194
-        $this->mockcal->expectOnce('setTimestamp',array('12345'));
194
+        $this->mockcal->expectOnce('setTimestamp', array('12345'));
195 195
         $Decorator = new Calendar_Decorator($this->mockcal);
196 196
         $Decorator->setTimestamp('12345');
197 197
     }
198 198
     function testGetTimestamp()
199 199
     {
200 200
         $Decorator = new Calendar_Decorator($this->mockcal);
201
-        $this->assertEqual(12345,$Decorator->getTimestamp());
201
+        $this->assertEqual(12345, $Decorator->getTimestamp());
202 202
     }
203 203
     function testSetSelected()
204 204
     {
205
-        $this->mockcal->expectOnce('setSelected',array(true));
205
+        $this->mockcal->expectOnce('setSelected', array(true));
206 206
         $Decorator = new Calendar_Decorator($this->mockcal);
207 207
         $Decorator->setSelected();
208 208
     }
209 209
     function testIsSelected()
210 210
     {
211
-        $this->mockcal->setReturnValue('isSelected',true);
211
+        $this->mockcal->setReturnValue('isSelected', true);
212 212
         $Decorator = new Calendar_Decorator($this->mockcal);
213 213
         $this->assertTrue($Decorator->isSelected());
214 214
     }
215 215
     function testAdjust()
216 216
     {
217
-        $this->mockcal->expectOnce('adjust',array());
217
+        $this->mockcal->expectOnce('adjust', array());
218 218
         $Decorator = new Calendar_Decorator($this->mockcal);
219 219
         $Decorator->adjust();
220 220
     }
221 221
     function testToArray()
222 222
     {
223
-        $this->mockcal->expectOnce('toArray',array(12345));
223
+        $this->mockcal->expectOnce('toArray', array(12345));
224 224
         $testArray = array('foo'=>'bar');
225
-        $this->mockcal->setReturnValue('toArray',$testArray);
225
+        $this->mockcal->setReturnValue('toArray', $testArray);
226 226
         $Decorator = new Calendar_Decorator($this->mockcal);
227
-        $this->assertEqual($testArray,$Decorator->toArray(12345));
227
+        $this->assertEqual($testArray, $Decorator->toArray(12345));
228 228
     }
229 229
     function testReturnValue()
230 230
     {
231
-        $this->mockcal->expectOnce('returnValue',array('a','b','c','d'));
232
-        $this->mockcal->setReturnValue('returnValue','foo');
231
+        $this->mockcal->expectOnce('returnValue', array('a', 'b', 'c', 'd'));
232
+        $this->mockcal->setReturnValue('returnValue', 'foo');
233 233
         $Decorator = new Calendar_Decorator($this->mockcal);
234
-        $this->assertEqual('foo',$Decorator->returnValue('a','b','c','d'));
234
+        $this->assertEqual('foo', $Decorator->returnValue('a', 'b', 'c', 'd'));
235 235
     }
236 236
     function testSetFirst()
237 237
     {
238 238
         $mockday = new Mock_Calendar_Day($this);
239
-        $mockday->expectOnce('setFirst',array(true));
239
+        $mockday->expectOnce('setFirst', array(true));
240 240
         $Decorator = new Calendar_Decorator($mockday);
241 241
         $Decorator->setFirst();
242 242
     }
243 243
     function testSetLast()
244 244
     {
245 245
         $mockday = new Mock_Calendar_Day($this);
246
-        $mockday->expectOnce('setLast',array(true));
246
+        $mockday->expectOnce('setLast', array(true));
247 247
         $Decorator = new Calendar_Decorator($mockday);
248 248
         $Decorator->setLast();
249 249
     }
250 250
     function testIsFirst()
251 251
     {
252 252
         $mockday = new Mock_Calendar_Day($this);
253
-        $mockday->setReturnValue('isFirst',TRUE);
253
+        $mockday->setReturnValue('isFirst', TRUE);
254 254
         $Decorator = new Calendar_Decorator($mockday);
255 255
         $this->assertTrue($Decorator->isFirst());
256 256
     }
257 257
     function testIsLast()
258 258
     {
259 259
         $mockday = new Mock_Calendar_Day($this);
260
-        $mockday->setReturnValue('isLast',TRUE);
260
+        $mockday->setReturnValue('isLast', TRUE);
261 261
         $Decorator = new Calendar_Decorator($mockday);
262 262
         $this->assertTrue($Decorator->isLast());
263 263
     }
264 264
     function testSetEmpty()
265 265
     {
266 266
         $mockday = new Mock_Calendar_Day($this);
267
-        $mockday->expectOnce('setEmpty',array(true));
267
+        $mockday->expectOnce('setEmpty', array(true));
268 268
         $Decorator = new Calendar_Decorator($mockday);
269 269
         $Decorator->setEmpty();
270 270
     }
271 271
     function testIsEmpty()
272 272
     {
273 273
         $mockday = new Mock_Calendar_Day($this);
274
-        $mockday->setReturnValue('isEmpty',TRUE);
274
+        $mockday->setReturnValue('isEmpty', TRUE);
275 275
         $Decorator = new Calendar_Decorator($mockday);
276 276
         $this->assertTrue($Decorator->isEmpty());
277 277
     }
278 278
     function testBuild()
279 279
     {
280
-        $testArray=array('foo'=>'bar');
281
-        $this->mockcal->expectOnce('build',array($testArray));
280
+        $testArray = array('foo'=>'bar');
281
+        $this->mockcal->expectOnce('build', array($testArray));
282 282
         $Decorator = new Calendar_Decorator($this->mockcal);
283 283
         $Decorator->build($testArray);
284 284
     }
285 285
     function testFetch()
286 286
     {
287
-        $this->mockcal->expectOnce('fetch',array());
287
+        $this->mockcal->expectOnce('fetch', array());
288 288
         $Decorator = new Calendar_Decorator($this->mockcal);
289 289
         $Decorator->fetch();
290 290
     }
291 291
     function testFetchAll()
292 292
     {
293
-        $this->mockcal->expectOnce('fetchAll',array());
293
+        $this->mockcal->expectOnce('fetchAll', array());
294 294
         $Decorator = new Calendar_Decorator($this->mockcal);
295 295
         $Decorator->fetchAll();
296 296
     }
297 297
     function testSize()
298 298
     {
299
-        $this->mockcal->expectOnce('size',array());
299
+        $this->mockcal->expectOnce('size', array());
300 300
         $Decorator = new Calendar_Decorator($this->mockcal);
301 301
         $Decorator->size();
302 302
     }
303 303
     function testIsValid()
304 304
     {
305
-        $this->mockcal->expectOnce('isValid',array());
305
+        $this->mockcal->expectOnce('isValid', array());
306 306
         $Decorator = new Calendar_Decorator($this->mockcal);
307 307
         $Decorator->isValid();
308 308
     }
309 309
     function testGetValidator()
310 310
     {
311
-        $this->mockcal->expectOnce('getValidator',array());
311
+        $this->mockcal->expectOnce('getValidator', array());
312 312
         $Decorator = new Calendar_Decorator($this->mockcal);
313 313
         $Decorator->getValidator();
314 314
     }
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/calendar_include.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 // $Id: calendar_include.php 1511 2011-09-01 20:56:07Z jjdai $
3 3
 if (!@include 'Calendar/Calendar.php') {
4
-    @define('CALENDAR_ROOT','../');
4
+    @define('CALENDAR_ROOT', '../');
5 5
 }
6 6
 require_once(CALENDAR_ROOT . 'Year.php');
7 7
 require_once(CALENDAR_ROOT . 'Month.php');
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/day_test.php 2 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
     }
18 18
     function setUp()
19 19
     {
20
-        $this->cal = new Calendar_Day(2003,10,25);
20
+        $this->cal = new Calendar_Day(2003, 10, 25);
21 21
     }
22
-    function testPrevDay_Array ()
22
+    function testPrevDay_Array()
23 23
     {
24 24
         $this->assertEqual(
25 25
             array(
@@ -31,46 +31,46 @@  discard block
 block discarded – undo
31 31
                 'second' => 0),
32 32
             $this->cal->prevDay('array'));
33 33
     }
34
-    function testPrevHour ()
34
+    function testPrevHour()
35 35
     {
36
-        $this->assertEqual(23,$this->cal->prevHour());
36
+        $this->assertEqual(23, $this->cal->prevHour());
37 37
     }
38
-    function testThisHour ()
38
+    function testThisHour()
39 39
     {
40
-        $this->assertEqual(0,$this->cal->thisHour());
40
+        $this->assertEqual(0, $this->cal->thisHour());
41 41
     }
42
-    function testNextHour ()
42
+    function testNextHour()
43 43
     {
44
-        $this->assertEqual(1,$this->cal->nextHour());
44
+        $this->assertEqual(1, $this->cal->nextHour());
45 45
     }
46
-    function testPrevMinute ()
46
+    function testPrevMinute()
47 47
     {
48
-        $this->assertEqual(59,$this->cal->prevMinute());
48
+        $this->assertEqual(59, $this->cal->prevMinute());
49 49
     }
50
-    function testThisMinute ()
50
+    function testThisMinute()
51 51
     {
52
-        $this->assertEqual(0,$this->cal->thisMinute());
52
+        $this->assertEqual(0, $this->cal->thisMinute());
53 53
     }
54
-    function testNextMinute ()
54
+    function testNextMinute()
55 55
     {
56
-        $this->assertEqual(1,$this->cal->nextMinute());
56
+        $this->assertEqual(1, $this->cal->nextMinute());
57 57
     }
58
-    function testPrevSecond ()
58
+    function testPrevSecond()
59 59
     {
60
-        $this->assertEqual(59,$this->cal->prevSecond());
60
+        $this->assertEqual(59, $this->cal->prevSecond());
61 61
     }
62
-    function testThisSecond ()
62
+    function testThisSecond()
63 63
     {
64
-        $this->assertEqual(0,$this->cal->thisSecond());
64
+        $this->assertEqual(0, $this->cal->thisSecond());
65 65
     }
66
-    function testNextSecond ()
66
+    function testNextSecond()
67 67
     {
68
-        $this->assertEqual(1,$this->cal->nextSecond());
68
+        $this->assertEqual(1, $this->cal->nextSecond());
69 69
     }
70 70
     function testGetTimeStamp()
71 71
     {
72
-        $stamp = mktime(0,0,0,10,25,2003);
73
-        $this->assertEqual($stamp,$this->cal->getTimeStamp());
72
+        $stamp = mktime(0, 0, 0, 10, 25, 2003);
73
+        $this->assertEqual($stamp, $this->cal->getTimeStamp());
74 74
     }
75 75
 }
76 76
 
@@ -86,36 +86,36 @@  discard block
 block discarded – undo
86 86
     function testSize()
87 87
     {
88 88
         $this->cal->build();
89
-        $this->assertEqual(24,$this->cal->size());
89
+        $this->assertEqual(24, $this->cal->size());
90 90
     }
91 91
     function testFetch()
92 92
     {
93 93
         $this->cal->build();
94
-        $i=0;
95
-        while ( $Child = $this->cal->fetch() ) {
94
+        $i = 0;
95
+        while ($Child = $this->cal->fetch()) {
96 96
             ++$i;
97 97
         }
98
-        $this->assertEqual(24,$i);
98
+        $this->assertEqual(24, $i);
99 99
     }
100 100
     function testFetchAll()
101 101
     {
102 102
         $this->cal->build();
103 103
         $children = array();
104 104
         $i = 0;
105
-        while ( $Child = $this->cal->fetch() ) {
106
-            $children[$i]=$Child;
105
+        while ($Child = $this->cal->fetch()) {
106
+            $children[$i] = $Child;
107 107
             ++$i;
108 108
         }
109
-        $this->assertEqual($children,$this->cal->fetchAll());
109
+        $this->assertEqual($children, $this->cal->fetchAll());
110 110
     }
111 111
     function testSelection()
112 112
     {
113 113
         require_once(CALENDAR_ROOT . 'Hour.php');
114
-        $selection = array(new Calendar_Hour(2003,10,25,13));
114
+        $selection = array(new Calendar_Hour(2003, 10, 25, 13));
115 115
         $this->cal->build($selection);
116 116
         $i = 0;
117
-        while ( $Child = $this->cal->fetch() ) {
118
-            if ( $i == 13 )
117
+        while ($Child = $this->cal->fetch()) {
118
+            if ($i == 13)
119 119
                 break;
120 120
             ++$i;
121 121
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,8 +115,9 @@
 block discarded – undo
115 115
         $this->cal->build($selection);
116 116
         $i = 0;
117 117
         while ( $Child = $this->cal->fetch() ) {
118
-            if ( $i == 13 )
119
-                break;
118
+            if ( $i == 13 ) {
119
+                            break;
120
+            }
120 121
             ++$i;
121 122
         }
122 123
         $this->assertTrue($Child->isSelected());
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/util_textual_test.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -21,31 +21,31 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $this->mockengine = new Mock_Calendar_Engine($this);
23 23
         $this->mockcal = new Mock_Calendar_Second($this);
24
-        $this->mockcal->setReturnValue('prevYear',2002);
25
-        $this->mockcal->setReturnValue('thisYear',2003);
26
-        $this->mockcal->setReturnValue('nextYear',2004);
27
-        $this->mockcal->setReturnValue('prevMonth',9);
28
-        $this->mockcal->setReturnValue('thisMonth',10);
29
-        $this->mockcal->setReturnValue('nextMonth',11);
30
-        $this->mockcal->setReturnValue('prevDay',14);
31
-        $this->mockcal->setReturnValue('thisDay',15);
32
-        $this->mockcal->setReturnValue('nextDay',16);
33
-        $this->mockcal->setReturnValue('prevHour',12);
34
-        $this->mockcal->setReturnValue('thisHour',13);
35
-        $this->mockcal->setReturnValue('nextHour',14);
36
-        $this->mockcal->setReturnValue('prevMinute',29);
37
-        $this->mockcal->setReturnValue('thisMinute',30);
38
-        $this->mockcal->setReturnValue('nextMinute',31);
39
-        $this->mockcal->setReturnValue('prevSecond',44);
40
-        $this->mockcal->setReturnValue('thisSecond',45);
41
-        $this->mockcal->setReturnValue('nextSecond',46);
42
-        $this->mockcal->setReturnValue('getEngine',$this->mockengine);
43
-        $this->mockcal->setReturnValue('getTimestamp',12345);
24
+        $this->mockcal->setReturnValue('prevYear', 2002);
25
+        $this->mockcal->setReturnValue('thisYear', 2003);
26
+        $this->mockcal->setReturnValue('nextYear', 2004);
27
+        $this->mockcal->setReturnValue('prevMonth', 9);
28
+        $this->mockcal->setReturnValue('thisMonth', 10);
29
+        $this->mockcal->setReturnValue('nextMonth', 11);
30
+        $this->mockcal->setReturnValue('prevDay', 14);
31
+        $this->mockcal->setReturnValue('thisDay', 15);
32
+        $this->mockcal->setReturnValue('nextDay', 16);
33
+        $this->mockcal->setReturnValue('prevHour', 12);
34
+        $this->mockcal->setReturnValue('thisHour', 13);
35
+        $this->mockcal->setReturnValue('nextHour', 14);
36
+        $this->mockcal->setReturnValue('prevMinute', 29);
37
+        $this->mockcal->setReturnValue('thisMinute', 30);
38
+        $this->mockcal->setReturnValue('nextMinute', 31);
39
+        $this->mockcal->setReturnValue('prevSecond', 44);
40
+        $this->mockcal->setReturnValue('thisSecond', 45);
41
+        $this->mockcal->setReturnValue('nextSecond', 46);
42
+        $this->mockcal->setReturnValue('getEngine', $this->mockengine);
43
+        $this->mockcal->setReturnValue('getTimestamp', 12345);
44 44
     }
45 45
     function tearDown()
46 46
     {
47
-        unset ( $this->engine );
48
-        unset ( $this->mockcal );
47
+        unset ($this->engine);
48
+        unset ($this->mockcal);
49 49
     }
50 50
     function testMonthNamesLong()
51 51
     {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             11=>'November',
64 64
             12=>'December',
65 65
         );
66
-        $this->assertEqual($monthNames,Calendar_Util_Textual::monthNames());
66
+        $this->assertEqual($monthNames, Calendar_Util_Textual::monthNames());
67 67
     }
68 68
     function testMonthNamesShort()
69 69
     {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             11=>'Nov',
82 82
             12=>'Dec',
83 83
         );
84
-        $this->assertEqual($monthNames,Calendar_Util_Textual::monthNames('short'));
84
+        $this->assertEqual($monthNames, Calendar_Util_Textual::monthNames('short'));
85 85
     }
86 86
     function testMonthNamesTwo()
87 87
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             11=>'No',
100 100
             12=>'De',
101 101
         );
102
-        $this->assertEqual($monthNames,Calendar_Util_Textual::monthNames('two'));
102
+        $this->assertEqual($monthNames, Calendar_Util_Textual::monthNames('two'));
103 103
     }
104 104
     function testMonthNamesOne()
105 105
     {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             11=>'N',
118 118
             12=>'D',
119 119
         );
120
-        $this->assertEqual($monthNames,Calendar_Util_Textual::monthNames('one'));
120
+        $this->assertEqual($monthNames, Calendar_Util_Textual::monthNames('one'));
121 121
     }
122 122
     function testWeekdayNamesLong()
123 123
     {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             5=>'Friday',
131 131
             6=>'Saturday',
132 132
         );
133
-        $this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames());
133
+        $this->assertEqual($weekdayNames, Calendar_Util_Textual::weekdayNames());
134 134
     }
135 135
     function testWeekdayNamesShort()
136 136
     {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             5=>'Fri',
144 144
             6=>'Sat',
145 145
         );
146
-        $this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames('short'));
146
+        $this->assertEqual($weekdayNames, Calendar_Util_Textual::weekdayNames('short'));
147 147
     }
148 148
     function testWeekdayNamesTwo()
149 149
     {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             5=>'Fr',
157 157
             6=>'Sa',
158 158
         );
159
-        $this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames('two'));
159
+        $this->assertEqual($weekdayNames, Calendar_Util_Textual::weekdayNames('two'));
160 160
     }
161 161
     function testWeekdayNamesOne()
162 162
     {
@@ -169,23 +169,23 @@  discard block
 block discarded – undo
169 169
             5=>'F',
170 170
             6=>'S',
171 171
         );
172
-        $this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames('one'));
172
+        $this->assertEqual($weekdayNames, Calendar_Util_Textual::weekdayNames('one'));
173 173
     }
174 174
     function testPrevMonthNameShort()
175 175
     {
176
-        $this->assertEqual('Sep',Calendar_Util_Textual::prevMonthName($this->mockcal,'short'));
176
+        $this->assertEqual('Sep', Calendar_Util_Textual::prevMonthName($this->mockcal, 'short'));
177 177
     }
178 178
     function testThisMonthNameShort()
179 179
     {
180
-        $this->assertEqual('Oct',Calendar_Util_Textual::thisMonthName($this->mockcal,'short'));
180
+        $this->assertEqual('Oct', Calendar_Util_Textual::thisMonthName($this->mockcal, 'short'));
181 181
     }
182 182
     function testNextMonthNameShort()
183 183
     {
184
-        $this->assertEqual('Nov',Calendar_Util_Textual::nextMonthName($this->mockcal,'short'));
184
+        $this->assertEqual('Nov', Calendar_Util_Textual::nextMonthName($this->mockcal, 'short'));
185 185
     }
186 186
     function testThisDayNameShort()
187 187
     {
188
-        $this->assertEqual('Wed',Calendar_Util_Textual::thisDayName($this->mockcal,'short'));
188
+        $this->assertEqual('Wed', Calendar_Util_Textual::thisDayName($this->mockcal, 'short'));
189 189
     }
190 190
     function testOrderedWeekdaysShort()
191 191
     {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             $day = array_shift($weekdayNames);
204 204
             array_push($weekdayNames, $day);
205 205
         }
206
-        $this->assertEqual($weekdayNames,Calendar_Util_Textual::orderedWeekdays($this->mockcal,'short'));
206
+        $this->assertEqual($weekdayNames, Calendar_Util_Textual::orderedWeekdays($this->mockcal, 'short'));
207 207
     }
208 208
 
209 209
 }
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/month_test.php 2 patches
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -17,17 +17,17 @@  discard block
 block discarded – undo
17 17
     }
18 18
     function setUp()
19 19
     {
20
-        $this->cal = new Calendar_Month(2003,10);
20
+        $this->cal = new Calendar_Month(2003, 10);
21 21
     }
22 22
     function testPrevMonth_Object()
23 23
     {
24 24
         $this->assertEqual(new Calendar_Month(2003, 9), $this->cal->prevMonth('object'));
25 25
     }
26
-    function testPrevDay ()
26
+    function testPrevDay()
27 27
     {
28
-        $this->assertEqual(30,$this->cal->prevDay());
28
+        $this->assertEqual(30, $this->cal->prevDay());
29 29
     }
30
-    function testPrevDay_Array ()
30
+    function testPrevDay_Array()
31 31
     {
32 32
         $this->assertEqual(
33 33
             array(
@@ -39,54 +39,54 @@  discard block
 block discarded – undo
39 39
                 'second' => 0),
40 40
             $this->cal->prevDay('array'));
41 41
     }
42
-    function testThisDay ()
42
+    function testThisDay()
43 43
     {
44
-        $this->assertEqual(1,$this->cal->thisDay());
44
+        $this->assertEqual(1, $this->cal->thisDay());
45 45
     }
46
-    function testNextDay ()
46
+    function testNextDay()
47 47
     {
48
-        $this->assertEqual(2,$this->cal->nextDay());
48
+        $this->assertEqual(2, $this->cal->nextDay());
49 49
     }
50
-    function testPrevHour ()
50
+    function testPrevHour()
51 51
     {
52
-        $this->assertEqual(23,$this->cal->prevHour());
52
+        $this->assertEqual(23, $this->cal->prevHour());
53 53
     }
54
-    function testThisHour ()
54
+    function testThisHour()
55 55
     {
56
-        $this->assertEqual(0,$this->cal->thisHour());
56
+        $this->assertEqual(0, $this->cal->thisHour());
57 57
     }
58
-    function testNextHour ()
58
+    function testNextHour()
59 59
     {
60
-        $this->assertEqual(1,$this->cal->nextHour());
60
+        $this->assertEqual(1, $this->cal->nextHour());
61 61
     }
62
-    function testPrevMinute ()
62
+    function testPrevMinute()
63 63
     {
64
-        $this->assertEqual(59,$this->cal->prevMinute());
64
+        $this->assertEqual(59, $this->cal->prevMinute());
65 65
     }
66
-    function testThisMinute ()
66
+    function testThisMinute()
67 67
     {
68
-        $this->assertEqual(0,$this->cal->thisMinute());
68
+        $this->assertEqual(0, $this->cal->thisMinute());
69 69
     }
70
-    function testNextMinute ()
70
+    function testNextMinute()
71 71
     {
72
-        $this->assertEqual(1,$this->cal->nextMinute());
72
+        $this->assertEqual(1, $this->cal->nextMinute());
73 73
     }
74
-    function testPrevSecond ()
74
+    function testPrevSecond()
75 75
     {
76
-        $this->assertEqual(59,$this->cal->prevSecond());
76
+        $this->assertEqual(59, $this->cal->prevSecond());
77 77
     }
78
-    function testThisSecond ()
78
+    function testThisSecond()
79 79
     {
80
-        $this->assertEqual(0,$this->cal->thisSecond());
80
+        $this->assertEqual(0, $this->cal->thisSecond());
81 81
     }
82
-    function testNextSecond ()
82
+    function testNextSecond()
83 83
     {
84
-        $this->assertEqual(1,$this->cal->nextSecond());
84
+        $this->assertEqual(1, $this->cal->nextSecond());
85 85
     }
86 86
     function testGetTimeStamp()
87 87
     {
88
-        $stamp = mktime(0,0,0,10,1,2003);
89
-        $this->assertEqual($stamp,$this->cal->getTimeStamp());
88
+        $stamp = mktime(0, 0, 0, 10, 1, 2003);
89
+        $this->assertEqual($stamp, $this->cal->getTimeStamp());
90 90
     }
91 91
 }
92 92
 
@@ -102,36 +102,36 @@  discard block
 block discarded – undo
102 102
     function testSize()
103 103
     {
104 104
         $this->cal->build();
105
-        $this->assertEqual(31,$this->cal->size());
105
+        $this->assertEqual(31, $this->cal->size());
106 106
     }
107 107
     function testFetch()
108 108
     {
109 109
         $this->cal->build();
110
-        $i=0;
111
-        while ( $Child = $this->cal->fetch() ) {
110
+        $i = 0;
111
+        while ($Child = $this->cal->fetch()) {
112 112
             ++$i;
113 113
         }
114
-        $this->assertEqual(31,$i);
114
+        $this->assertEqual(31, $i);
115 115
     }
116 116
     function testFetchAll()
117 117
     {
118 118
         $this->cal->build();
119 119
         $children = array();
120 120
         $i = 1;
121
-        while ( $Child = $this->cal->fetch() ) {
122
-            $children[$i]=$Child;
121
+        while ($Child = $this->cal->fetch()) {
122
+            $children[$i] = $Child;
123 123
             ++$i;
124 124
         }
125
-        $this->assertEqual($children,$this->cal->fetchAll());
125
+        $this->assertEqual($children, $this->cal->fetchAll());
126 126
     }
127 127
     function testSelection()
128 128
     {
129 129
         require_once(CALENDAR_ROOT . 'Day.php');
130
-        $selection = array(new Calendar_Day(2003,10,25));
130
+        $selection = array(new Calendar_Day(2003, 10, 25));
131 131
         $this->cal->build($selection);
132 132
         $i = 1;
133
-        while ( $Child = $this->cal->fetch() ) {
134
-            if ( $i == 25 )
133
+        while ($Child = $this->cal->fetch()) {
134
+            if ($i == 25)
135 135
                 break;
136 136
             ++$i;
137 137
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,8 +131,9 @@
 block discarded – undo
131 131
         $this->cal->build($selection);
132 132
         $i = 1;
133 133
         while ( $Child = $this->cal->fetch() ) {
134
-            if ( $i == 25 )
135
-                break;
134
+            if ( $i == 25 ) {
135
+                            break;
136
+            }
136 137
             ++$i;
137 138
         }
138 139
         $this->assertTrue($Child->isSelected());
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/month_weeks_test.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
     {
20 20
         $this->cal = new Calendar_Month_Weeks(2003, 10);
21 21
     }
22
-    function testPrevDay ()
22
+    function testPrevDay()
23 23
     {
24 24
         $this->assertEqual(30, $this->cal->prevDay());
25 25
     }
26
-    function testPrevDay_Array ()
26
+    function testPrevDay_Array()
27 27
     {
28 28
         $this->assertEqual(
29 29
             array(
@@ -35,54 +35,54 @@  discard block
 block discarded – undo
35 35
                 'second' => 0),
36 36
             $this->cal->prevDay('array'));
37 37
     }
38
-    function testThisDay ()
38
+    function testThisDay()
39 39
     {
40 40
         $this->assertEqual(1, $this->cal->thisDay());
41 41
     }
42
-    function testNextDay ()
42
+    function testNextDay()
43 43
     {
44 44
         $this->assertEqual(2, $this->cal->nextDay());
45 45
     }
46
-    function testPrevHour ()
46
+    function testPrevHour()
47 47
     {
48 48
         $this->assertEqual(23, $this->cal->prevHour());
49 49
     }
50
-    function testThisHour ()
50
+    function testThisHour()
51 51
     {
52 52
         $this->assertEqual(0, $this->cal->thisHour());
53 53
     }
54
-    function testNextHour ()
54
+    function testNextHour()
55 55
     {
56 56
         $this->assertEqual(1, $this->cal->nextHour());
57 57
     }
58
-    function testPrevMinute ()
58
+    function testPrevMinute()
59 59
     {
60 60
         $this->assertEqual(59, $this->cal->prevMinute());
61 61
     }
62
-    function testThisMinute ()
62
+    function testThisMinute()
63 63
     {
64 64
         $this->assertEqual(0, $this->cal->thisMinute());
65 65
     }
66
-    function testNextMinute ()
66
+    function testNextMinute()
67 67
     {
68 68
         $this->assertEqual(1, $this->cal->nextMinute());
69 69
     }
70
-    function testPrevSecond ()
70
+    function testPrevSecond()
71 71
     {
72 72
         $this->assertEqual(59, $this->cal->prevSecond());
73 73
     }
74
-    function testThisSecond ()
74
+    function testThisSecond()
75 75
     {
76 76
         $this->assertEqual(0, $this->cal->thisSecond());
77 77
     }
78
-    function testNextSecond ()
78
+    function testNextSecond()
79 79
     {
80 80
         $this->assertEqual(1, $this->cal->nextSecond());
81 81
     }
82 82
     function testGetTimeStamp()
83 83
     {
84
-        $stamp = mktime(0,0,0,10,1,2003);
85
-        $this->assertEqual($stamp,$this->cal->getTimeStamp());
84
+        $stamp = mktime(0, 0, 0, 10, 1, 2003);
85
+        $this->assertEqual($stamp, $this->cal->getTimeStamp());
86 86
     }
87 87
 }
88 88
 
@@ -98,17 +98,17 @@  discard block
 block discarded – undo
98 98
     function testSize()
99 99
     {
100 100
         $this->cal->build();
101
-        $this->assertEqual(5,$this->cal->size());
101
+        $this->assertEqual(5, $this->cal->size());
102 102
     }
103 103
 
104 104
     function testFetch()
105 105
     {
106 106
         $this->cal->build();
107
-        $i=0;
107
+        $i = 0;
108 108
         while ($Child = $this->cal->fetch()) {
109 109
             ++$i;
110 110
         }
111
-        $this->assertEqual(5,$i);
111
+        $this->assertEqual(5, $i);
112 112
     }
113 113
 /* Recusive dependency issue with SimpleTest
114 114
     function testFetchAll()
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/week_test.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -21,47 +21,47 @@  discard block
 block discarded – undo
21 21
         $this->cal = Calendar_Factory::create('Week', 2003, 10, 9);
22 22
         //print_r($this->cal);
23 23
     }
24
-    function testThisYear ()
24
+    function testThisYear()
25 25
     {
26 26
         $this->assertEqual(2003, $this->cal->thisYear());
27 27
 
28
-        $stamp = mktime(0,0,0,1,1,2003);
28
+        $stamp = mktime(0, 0, 0, 1, 1, 2003);
29 29
         $this->cal->setTimestamp($stamp);
30 30
         $this->assertEqual(2003, $this->cal->thisYear());
31 31
 
32
-        $stamp = mktime(0,0,0,12,31,2003);
32
+        $stamp = mktime(0, 0, 0, 12, 31, 2003);
33 33
         $this->cal->setTimestamp($stamp);
34 34
         $this->assertEqual(2004, $this->cal->thisYear());
35 35
 
36
-        $stamp = mktime(0,0,0,1,1,2005);
36
+        $stamp = mktime(0, 0, 0, 1, 1, 2005);
37 37
         $this->cal->setTimestamp($stamp);
38 38
         $this->assertEqual(2004, $this->cal->thisYear());
39 39
 
40
-        $stamp = mktime(0,0,0,12,31,2004);
40
+        $stamp = mktime(0, 0, 0, 12, 31, 2004);
41 41
         $this->cal->setTimestamp($stamp);
42 42
         $this->assertEqual(2004, $this->cal->thisYear());
43 43
 
44
-        $stamp = mktime(0,0,0,1,1,2005);
44
+        $stamp = mktime(0, 0, 0, 1, 1, 2005);
45 45
         $this->cal->setTimestamp($stamp);
46 46
         $this->assertEqual(2004, $this->cal->thisYear());
47 47
 
48
-        $stamp = mktime(0,0,0,12,31,2005);
48
+        $stamp = mktime(0, 0, 0, 12, 31, 2005);
49 49
         $this->cal->setTimestamp($stamp);
50 50
         $this->assertEqual(2005, $this->cal->thisYear());
51 51
 
52
-        $stamp = mktime(0,0,0,1,1,2006);
52
+        $stamp = mktime(0, 0, 0, 1, 1, 2006);
53 53
         $this->cal->setTimestamp($stamp);
54 54
         $this->assertEqual(2005, $this->cal->thisYear());
55 55
 
56
-        $stamp = mktime(0,0,0,12,31,2006);
56
+        $stamp = mktime(0, 0, 0, 12, 31, 2006);
57 57
         $this->cal->setTimestamp($stamp);
58 58
         $this->assertEqual(2006, $this->cal->thisYear());
59 59
     }
60
-    function testPrevDay ()
60
+    function testPrevDay()
61 61
     {
62 62
         $this->assertEqual(8, $this->cal->prevDay());
63 63
     }
64
-    function testPrevDay_Array ()
64
+    function testPrevDay_Array()
65 65
     {
66 66
         $this->assertEqual(
67 67
             array(
@@ -73,58 +73,58 @@  discard block
 block discarded – undo
73 73
                 'second' => 0),
74 74
             $this->cal->prevDay('array'));
75 75
     }
76
-    function testThisDay ()
76
+    function testThisDay()
77 77
     {
78 78
         $this->assertEqual(9, $this->cal->thisDay());
79 79
     }
80
-    function testNextDay ()
80
+    function testNextDay()
81 81
     {
82 82
         $this->assertEqual(10, $this->cal->nextDay());
83 83
     }
84
-    function testPrevHour ()
84
+    function testPrevHour()
85 85
     {
86 86
         $this->assertEqual(23, $this->cal->prevHour());
87 87
     }
88
-    function testThisHour ()
88
+    function testThisHour()
89 89
     {
90 90
         $this->assertEqual(0, $this->cal->thisHour());
91 91
     }
92
-    function testNextHour ()
92
+    function testNextHour()
93 93
     {
94 94
         $this->assertEqual(1, $this->cal->nextHour());
95 95
     }
96
-    function testPrevMinute ()
96
+    function testPrevMinute()
97 97
     {
98 98
         $this->assertEqual(59, $this->cal->prevMinute());
99 99
     }
100
-    function testThisMinute ()
100
+    function testThisMinute()
101 101
     {
102 102
         $this->assertEqual(0, $this->cal->thisMinute());
103 103
     }
104
-    function testNextMinute ()
104
+    function testNextMinute()
105 105
     {
106 106
         $this->assertEqual(1, $this->cal->nextMinute());
107 107
     }
108
-    function testPrevSecond ()
108
+    function testPrevSecond()
109 109
     {
110 110
         $this->assertEqual(59, $this->cal->prevSecond());
111 111
     }
112
-    function testThisSecond ()
112
+    function testThisSecond()
113 113
     {
114 114
         $this->assertEqual(0, $this->cal->thisSecond());
115 115
     }
116
-    function testNextSecond ()
116
+    function testNextSecond()
117 117
     {
118 118
         $this->assertEqual(1, $this->cal->nextSecond());
119 119
     }
120 120
     function testGetTimeStamp()
121 121
     {
122
-        $stamp = mktime(0,0,0,10,9,2003);
123
-        $this->assertEqual($stamp,$this->cal->getTimeStamp());
122
+        $stamp = mktime(0, 0, 0, 10, 9, 2003);
123
+        $this->assertEqual($stamp, $this->cal->getTimeStamp());
124 124
     }
125 125
     function testNewTimeStamp()
126 126
     {
127
-        $stamp = mktime(0,0,0,7,28,2004);
127
+        $stamp = mktime(0, 0, 0, 7, 28, 2004);
128 128
         $this->cal->setTimestamp($stamp);
129 129
         $this->assertEqual('30 2004', date('W Y', $this->cal->prevWeek(true)));
130 130
         $this->assertEqual('31 2004', date('W Y', $this->cal->thisWeek(true)));
@@ -133,47 +133,47 @@  discard block
 block discarded – undo
133 133
     function testPrevWeekInMonth()
134 134
     {
135 135
         $this->assertEqual(1, $this->cal->prevWeek());
136
-        $stamp = mktime(0,0,0,2,3,2005);
136
+        $stamp = mktime(0, 0, 0, 2, 3, 2005);
137 137
         $this->cal->setTimestamp($stamp);
138 138
         $this->assertEqual(0, $this->cal->prevWeek());
139 139
     }
140 140
     function testThisWeekInMonth()
141 141
     {
142 142
         $this->assertEqual(2, $this->cal->thisWeek());
143
-        $stamp = mktime(0,0,0,2,3,2005);
143
+        $stamp = mktime(0, 0, 0, 2, 3, 2005);
144 144
         $this->cal->setTimestamp($stamp);
145 145
         $this->assertEqual(1, $this->cal->thisWeek());
146
-        $stamp = mktime(0,0,0,1,1,2005);
146
+        $stamp = mktime(0, 0, 0, 1, 1, 2005);
147 147
         $this->cal->setTimestamp($stamp);
148 148
         $this->assertEqual(1, $this->cal->thisWeek());
149
-        $stamp = mktime(0,0,0,1,3,2005);
149
+        $stamp = mktime(0, 0, 0, 1, 3, 2005);
150 150
         $this->cal->setTimestamp($stamp);
151 151
         $this->assertEqual(2, $this->cal->thisWeek());
152 152
     }
153 153
     function testNextWeekInMonth()
154 154
     {
155 155
         $this->assertEqual(3, $this->cal->nextWeek());
156
-        $stamp = mktime(0,0,0,2,3,2005);
156
+        $stamp = mktime(0, 0, 0, 2, 3, 2005);
157 157
         $this->cal->setTimestamp($stamp);
158 158
         $this->assertEqual(2, $this->cal->nextWeek());
159 159
     }
160 160
     function testPrevWeekInYear()
161 161
     {
162 162
         $this->assertEqual(date('W', $this->cal->prevWeek('timestamp')), $this->cal->prevWeek('n_in_year'));
163
-        $stamp = mktime(0,0,0,1,1,2004);
163
+        $stamp = mktime(0, 0, 0, 1, 1, 2004);
164 164
         $this->cal->setTimestamp($stamp);
165 165
         $this->assertEqual(date('W', $this->cal->nextWeek('timestamp')), $this->cal->nextWeek('n_in_year'));
166 166
     }
167 167
     function testThisWeekInYear()
168 168
     {
169 169
         $this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year'));
170
-        $stamp = mktime(0,0,0,1,1,2004);
170
+        $stamp = mktime(0, 0, 0, 1, 1, 2004);
171 171
         $this->cal->setTimestamp($stamp);
172 172
         $this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year'));
173 173
     }
174 174
     function testFirstWeekInYear()
175 175
     {
176
-        $stamp = mktime(0,0,0,1,4,2004);
176
+        $stamp = mktime(0, 0, 0, 1, 4, 2004);
177 177
         $this->cal->setTimestamp($stamp);
178 178
         $this->assertEqual(1, $this->cal->thisWeek('n_in_year'));
179 179
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     function testFetch()
256 256
     {
257 257
         $this->cal->build();
258
-        $i=0;
258
+        $i = 0;
259 259
         while ($Child = $this->cal->fetch()) {
260 260
             ++$i;
261 261
         }
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
         $this->cal->build();
267 267
         $children = array();
268 268
         $i = 1;
269
-        while ( $Child = $this->cal->fetch() ) {
270
-            $children[$i]=$Child;
269
+        while ($Child = $this->cal->fetch()) {
270
+            $children[$i] = $Child;
271 271
             ++$i;
272 272
         }
273
-        $this->assertEqual($children,$this->cal->fetchAll());
273
+        $this->assertEqual($children, $this->cal->fetchAll());
274 274
     }
275 275
 
276 276
     function testSelection()
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/helper_test.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 require_once 'simple_include.php';
5 5
 require_once 'calendar_include.php';
6 6
 
7
-Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine');
8
-Mock::generate('Calendar_Second','Mock_Calendar_Second');
7
+Mock::generate('Calendar_Engine_Interface', 'Mock_Calendar_Engine');
8
+Mock::generate('Calendar_Second', 'Mock_Calendar_Second');
9 9
 
10 10
 /**
11 11
  * Class TestOfTableHelper
@@ -21,72 +21,72 @@  discard block
 block discarded – undo
21 21
     function setUp()
22 22
     {
23 23
         $this->mockengine = new Mock_Calendar_Engine($this);
24
-        $this->mockengine->setReturnValue('getMinYears',1970);
25
-        $this->mockengine->setReturnValue('getMaxYears',2037);
26
-        $this->mockengine->setReturnValue('getMonthsInYear',12);
27
-        $this->mockengine->setReturnValue('getDaysInMonth',31);
28
-        $this->mockengine->setReturnValue('getHoursInDay',24);
29
-        $this->mockengine->setReturnValue('getMinutesInHour',_EXTCAL_TS_MINUTE);
30
-        $this->mockengine->setReturnValue('getSecondsInMinute',_EXTCAL_TS_MINUTE);
31
-        $this->mockengine->setReturnValue('getWeekDays',array(0,1,2,3,4,5,6));
32
-        $this->mockengine->setReturnValue('getDaysInWeek',7);
33
-        $this->mockengine->setReturnValue('getFirstDayOfWeek',1);
34
-        $this->mockengine->setReturnValue('getFirstDayInMonth',3);
24
+        $this->mockengine->setReturnValue('getMinYears', 1970);
25
+        $this->mockengine->setReturnValue('getMaxYears', 2037);
26
+        $this->mockengine->setReturnValue('getMonthsInYear', 12);
27
+        $this->mockengine->setReturnValue('getDaysInMonth', 31);
28
+        $this->mockengine->setReturnValue('getHoursInDay', 24);
29
+        $this->mockengine->setReturnValue('getMinutesInHour', _EXTCAL_TS_MINUTE);
30
+        $this->mockengine->setReturnValue('getSecondsInMinute', _EXTCAL_TS_MINUTE);
31
+        $this->mockengine->setReturnValue('getWeekDays', array(0, 1, 2, 3, 4, 5, 6));
32
+        $this->mockengine->setReturnValue('getDaysInWeek', 7);
33
+        $this->mockengine->setReturnValue('getFirstDayOfWeek', 1);
34
+        $this->mockengine->setReturnValue('getFirstDayInMonth', 3);
35 35
         $this->mockcal = new Mock_Calendar_Second($this);
36
-        $this->mockcal->setReturnValue('thisYear',2003);
37
-        $this->mockcal->setReturnValue('thisMonth',10);
38
-        $this->mockcal->setReturnValue('thisDay',15);
39
-        $this->mockcal->setReturnValue('thisHour',13);
40
-        $this->mockcal->setReturnValue('thisMinute',30);
41
-        $this->mockcal->setReturnValue('thisSecond',45);
42
-        $this->mockcal->setReturnValue('getEngine',$this->mockengine);
36
+        $this->mockcal->setReturnValue('thisYear', 2003);
37
+        $this->mockcal->setReturnValue('thisMonth', 10);
38
+        $this->mockcal->setReturnValue('thisDay', 15);
39
+        $this->mockcal->setReturnValue('thisHour', 13);
40
+        $this->mockcal->setReturnValue('thisMinute', 30);
41
+        $this->mockcal->setReturnValue('thisSecond', 45);
42
+        $this->mockcal->setReturnValue('getEngine', $this->mockengine);
43 43
     }
44 44
     function testGetFirstDay()
45 45
     {
46 46
         for ($i = 0; $i <= 7; ++$i) {
47
-            $Helper = new Calendar_Table_Helper($this->mockcal,$i);
48
-            $this->assertEqual($Helper->getFirstDay(),$i);
47
+            $Helper = new Calendar_Table_Helper($this->mockcal, $i);
48
+            $this->assertEqual($Helper->getFirstDay(), $i);
49 49
         }
50 50
     }
51 51
     function testGetDaysOfWeekMonday()
52 52
     {
53 53
         $Helper = new Calendar_Table_Helper($this->mockcal);
54
-        $this->assertEqual($Helper->getDaysOfWeek(),array(1,2,3,4,5,6,0));
54
+        $this->assertEqual($Helper->getDaysOfWeek(), array(1, 2, 3, 4, 5, 6, 0));
55 55
     }
56 56
     function testGetDaysOfWeekSunday()
57 57
     {
58
-        $Helper = new Calendar_Table_Helper($this->mockcal,0);
59
-        $this->assertEqual($Helper->getDaysOfWeek(),array(0,1,2,3,4,5,6));
58
+        $Helper = new Calendar_Table_Helper($this->mockcal, 0);
59
+        $this->assertEqual($Helper->getDaysOfWeek(), array(0, 1, 2, 3, 4, 5, 6));
60 60
     }
61 61
     function testGetDaysOfWeekThursday()
62 62
     {
63
-        $Helper = new Calendar_Table_Helper($this->mockcal,4);
64
-        $this->assertEqual($Helper->getDaysOfWeek(),array(4,5,6,0,1,2,3));
63
+        $Helper = new Calendar_Table_Helper($this->mockcal, 4);
64
+        $this->assertEqual($Helper->getDaysOfWeek(), array(4, 5, 6, 0, 1, 2, 3));
65 65
     }
66 66
     function testGetNumWeeks()
67 67
     {
68 68
         $Helper = new Calendar_Table_Helper($this->mockcal);
69
-        $this->assertEqual($Helper->getNumWeeks(),5);
69
+        $this->assertEqual($Helper->getNumWeeks(), 5);
70 70
     }
71 71
     function testGetNumTableDaysInMonth()
72 72
     {
73 73
         $Helper = new Calendar_Table_Helper($this->mockcal);
74
-        $this->assertEqual($Helper->getNumTableDaysInMonth(),35);
74
+        $this->assertEqual($Helper->getNumTableDaysInMonth(), 35);
75 75
     }
76 76
     function testGetEmptyDaysBefore()
77 77
     {
78 78
         $Helper = new Calendar_Table_Helper($this->mockcal);
79
-        $this->assertEqual($Helper->getEmptyDaysBefore(),2);
79
+        $this->assertEqual($Helper->getEmptyDaysBefore(), 2);
80 80
     }
81 81
     function testGetEmptyDaysAfter()
82 82
     {
83 83
         $Helper = new Calendar_Table_Helper($this->mockcal);
84
-        $this->assertEqual($Helper->getEmptyDaysAfter(),33);
84
+        $this->assertEqual($Helper->getEmptyDaysAfter(), 33);
85 85
     }
86 86
     function testGetEmptyDaysAfterOffset()
87 87
     {
88 88
         $Helper = new Calendar_Table_Helper($this->mockcal);
89
-        $this->assertEqual($Helper->getEmptyDaysAfterOffset(),5);
89
+        $this->assertEqual($Helper->getEmptyDaysAfterOffset(), 5);
90 90
     }
91 91
 }
92 92
 
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pear/Calendar/tests/minute_test.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
     }
18 18
     function setUp()
19 19
     {
20
-        $this->cal = new Calendar_Minute(2003,10,25,13,32);
20
+        $this->cal = new Calendar_Minute(2003, 10, 25, 13, 32);
21 21
     }
22
-    function testPrevDay_Array ()
22
+    function testPrevDay_Array()
23 23
     {
24 24
         $this->assertEqual(
25 25
             array(
@@ -31,25 +31,25 @@  discard block
 block discarded – undo
31 31
                 'second' => 0),
32 32
             $this->cal->prevDay('array'));
33 33
     }
34
-    function testPrevSecond ()
34
+    function testPrevSecond()
35 35
     {
36
-        $this->assertEqual(59,$this->cal->prevSecond());
36
+        $this->assertEqual(59, $this->cal->prevSecond());
37 37
     }
38
-    function testThisSecond ()
38
+    function testThisSecond()
39 39
     {
40
-        $this->assertEqual(0,$this->cal->thisSecond());
40
+        $this->assertEqual(0, $this->cal->thisSecond());
41 41
     }
42
-    function testThisSecond_Timestamp ()
42
+    function testThisSecond_Timestamp()
43 43
     {
44 44
         $this->assertEqual($this->cal->cE->dateToStamp(
45 45
                 2003, 10, 25, 13, 32, 0),
46 46
             $this->cal->thisSecond('timestamp'));
47 47
     }
48
-    function testNextSecond ()
48
+    function testNextSecond()
49 49
     {
50
-        $this->assertEqual(1,$this->cal->nextSecond());
50
+        $this->assertEqual(1, $this->cal->nextSecond());
51 51
     }
52
-    function testNextSecond_Timestamp ()
52
+    function testNextSecond_Timestamp()
53 53
     {
54 54
         $this->assertEqual($this->cal->cE->dateToStamp(
55 55
                 2003, 10, 25, 13, 32, 1),
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     }
58 58
     function testGetTimeStamp()
59 59
     {
60
-        $stamp = mktime(13,32,0,10,25,2003);
61
-        $this->assertEqual($stamp,$this->cal->getTimeStamp());
60
+        $stamp = mktime(13, 32, 0, 10, 25, 2003);
61
+        $this->assertEqual($stamp, $this->cal->getTimeStamp());
62 62
     }
63 63
 }
64 64
 
@@ -74,36 +74,36 @@  discard block
 block discarded – undo
74 74
     function testSize()
75 75
     {
76 76
         $this->cal->build();
77
-        $this->assertEqual(_EXTCAL_TS_MINUTE,$this->cal->size());
77
+        $this->assertEqual(_EXTCAL_TS_MINUTE, $this->cal->size());
78 78
     }
79 79
     function testFetch()
80 80
     {
81 81
         $this->cal->build();
82
-        $i=0;
83
-        while ( $Child = $this->cal->fetch() ) {
82
+        $i = 0;
83
+        while ($Child = $this->cal->fetch()) {
84 84
             ++$i;
85 85
         }
86
-        $this->assertEqual(_EXTCAL_TS_MINUTE,$i);
86
+        $this->assertEqual(_EXTCAL_TS_MINUTE, $i);
87 87
     }
88 88
     function testFetchAll()
89 89
     {
90 90
         $this->cal->build();
91 91
         $children = array();
92 92
         $i = 0;
93
-        while ( $Child = $this->cal->fetch() ) {
94
-            $children[$i]=$Child;
93
+        while ($Child = $this->cal->fetch()) {
94
+            $children[$i] = $Child;
95 95
             ++$i;
96 96
         }
97
-        $this->assertEqual($children,$this->cal->fetchAll());
97
+        $this->assertEqual($children, $this->cal->fetchAll());
98 98
     }
99 99
     function testSelection()
100 100
     {
101 101
         require_once(CALENDAR_ROOT . 'Second.php');
102
-        $selection = array(new Calendar_Second(2003,10,25,13,32,43));
102
+        $selection = array(new Calendar_Second(2003, 10, 25, 13, 32, 43));
103 103
         $this->cal->build($selection);
104 104
         $i = 0;
105
-        while ( $Child = $this->cal->fetch() ) {
106
-            if ( $i == 43 )
105
+        while ($Child = $this->cal->fetch()) {
106
+            if ($i == 43)
107 107
                 break;
108 108
             ++$i;
109 109
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,9 @@
 block discarded – undo
103 103
         $this->cal->build($selection);
104 104
         $i = 0;
105 105
         while ( $Child = $this->cal->fetch() ) {
106
-            if ( $i == 43 )
107
-                break;
106
+            if ( $i == 43 ) {
107
+                            break;
108
+            }
108 109
             ++$i;
109 110
         }
110 111
         $this->assertTrue($Child->isSelected());
Please login to merge, or discard this patch.