@@ -27,11 +27,11 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $this->assertEqual(new Calendar_Year(2003), $this->cal->thisYear('object')); |
| 29 | 29 | } |
| 30 | - function testPrevMonth () |
|
| 30 | + function testPrevMonth() |
|
| 31 | 31 | { |
| 32 | - $this->assertEqual(12,$this->cal->prevMonth()); |
|
| 32 | + $this->assertEqual(12, $this->cal->prevMonth()); |
|
| 33 | 33 | } |
| 34 | - function testPrevMonth_Array () |
|
| 34 | + function testPrevMonth_Array() |
|
| 35 | 35 | { |
| 36 | 36 | $this->assertEqual( |
| 37 | 37 | array( |
@@ -43,19 +43,19 @@ discard block |
||
| 43 | 43 | 'second' => 0), |
| 44 | 44 | $this->cal->prevMonth('array')); |
| 45 | 45 | } |
| 46 | - function testThisMonth () |
|
| 46 | + function testThisMonth() |
|
| 47 | 47 | { |
| 48 | - $this->assertEqual(1,$this->cal->thisMonth()); |
|
| 48 | + $this->assertEqual(1, $this->cal->thisMonth()); |
|
| 49 | 49 | } |
| 50 | - function testNextMonth () |
|
| 50 | + function testNextMonth() |
|
| 51 | 51 | { |
| 52 | - $this->assertEqual(2,$this->cal->nextMonth()); |
|
| 52 | + $this->assertEqual(2, $this->cal->nextMonth()); |
|
| 53 | 53 | } |
| 54 | - function testPrevDay () |
|
| 54 | + function testPrevDay() |
|
| 55 | 55 | { |
| 56 | - $this->assertEqual(31,$this->cal->prevDay()); |
|
| 56 | + $this->assertEqual(31, $this->cal->prevDay()); |
|
| 57 | 57 | } |
| 58 | - function testPrevDay_Array () |
|
| 58 | + function testPrevDay_Array() |
|
| 59 | 59 | { |
| 60 | 60 | $this->assertEqual( |
| 61 | 61 | array( |
@@ -67,54 +67,54 @@ discard block |
||
| 67 | 67 | 'second' => 0), |
| 68 | 68 | $this->cal->prevDay('array')); |
| 69 | 69 | } |
| 70 | - function testThisDay () |
|
| 70 | + function testThisDay() |
|
| 71 | 71 | { |
| 72 | - $this->assertEqual(1,$this->cal->thisDay()); |
|
| 72 | + $this->assertEqual(1, $this->cal->thisDay()); |
|
| 73 | 73 | } |
| 74 | - function testNextDay () |
|
| 74 | + function testNextDay() |
|
| 75 | 75 | { |
| 76 | - $this->assertEqual(2,$this->cal->nextDay()); |
|
| 76 | + $this->assertEqual(2, $this->cal->nextDay()); |
|
| 77 | 77 | } |
| 78 | - function testPrevHour () |
|
| 78 | + function testPrevHour() |
|
| 79 | 79 | { |
| 80 | - $this->assertEqual(23,$this->cal->prevHour()); |
|
| 80 | + $this->assertEqual(23, $this->cal->prevHour()); |
|
| 81 | 81 | } |
| 82 | - function testThisHour () |
|
| 82 | + function testThisHour() |
|
| 83 | 83 | { |
| 84 | - $this->assertEqual(0,$this->cal->thisHour()); |
|
| 84 | + $this->assertEqual(0, $this->cal->thisHour()); |
|
| 85 | 85 | } |
| 86 | - function testNextHour () |
|
| 86 | + function testNextHour() |
|
| 87 | 87 | { |
| 88 | - $this->assertEqual(1,$this->cal->nextHour()); |
|
| 88 | + $this->assertEqual(1, $this->cal->nextHour()); |
|
| 89 | 89 | } |
| 90 | - function testPrevMinute () |
|
| 90 | + function testPrevMinute() |
|
| 91 | 91 | { |
| 92 | - $this->assertEqual(59,$this->cal->prevMinute()); |
|
| 92 | + $this->assertEqual(59, $this->cal->prevMinute()); |
|
| 93 | 93 | } |
| 94 | - function testThisMinute () |
|
| 94 | + function testThisMinute() |
|
| 95 | 95 | { |
| 96 | - $this->assertEqual(0,$this->cal->thisMinute()); |
|
| 96 | + $this->assertEqual(0, $this->cal->thisMinute()); |
|
| 97 | 97 | } |
| 98 | - function testNextMinute () |
|
| 98 | + function testNextMinute() |
|
| 99 | 99 | { |
| 100 | - $this->assertEqual(1,$this->cal->nextMinute()); |
|
| 100 | + $this->assertEqual(1, $this->cal->nextMinute()); |
|
| 101 | 101 | } |
| 102 | - function testPrevSecond () |
|
| 102 | + function testPrevSecond() |
|
| 103 | 103 | { |
| 104 | - $this->assertEqual(59,$this->cal->prevSecond()); |
|
| 104 | + $this->assertEqual(59, $this->cal->prevSecond()); |
|
| 105 | 105 | } |
| 106 | - function testThisSecond () |
|
| 106 | + function testThisSecond() |
|
| 107 | 107 | { |
| 108 | - $this->assertEqual(0,$this->cal->thisSecond()); |
|
| 108 | + $this->assertEqual(0, $this->cal->thisSecond()); |
|
| 109 | 109 | } |
| 110 | - function testNextSecond () |
|
| 110 | + function testNextSecond() |
|
| 111 | 111 | { |
| 112 | - $this->assertEqual(1,$this->cal->nextSecond()); |
|
| 112 | + $this->assertEqual(1, $this->cal->nextSecond()); |
|
| 113 | 113 | } |
| 114 | 114 | function testGetTimeStamp() |
| 115 | 115 | { |
| 116 | - $stamp = mktime(0,0,0,1,1,2003); |
|
| 117 | - $this->assertEqual($stamp,$this->cal->getTimeStamp()); |
|
| 116 | + $stamp = mktime(0, 0, 0, 1, 1, 2003); |
|
| 117 | + $this->assertEqual($stamp, $this->cal->getTimeStamp()); |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | |
@@ -130,36 +130,36 @@ discard block |
||
| 130 | 130 | function testSize() |
| 131 | 131 | { |
| 132 | 132 | $this->cal->build(); |
| 133 | - $this->assertEqual(12,$this->cal->size()); |
|
| 133 | + $this->assertEqual(12, $this->cal->size()); |
|
| 134 | 134 | } |
| 135 | 135 | function testFetch() |
| 136 | 136 | { |
| 137 | 137 | $this->cal->build(); |
| 138 | - $i=0; |
|
| 139 | - while ( $Child = $this->cal->fetch() ) { |
|
| 138 | + $i = 0; |
|
| 139 | + while ($Child = $this->cal->fetch()) { |
|
| 140 | 140 | ++$i; |
| 141 | 141 | } |
| 142 | - $this->assertEqual(12,$i); |
|
| 142 | + $this->assertEqual(12, $i); |
|
| 143 | 143 | } |
| 144 | 144 | function testFetchAll() |
| 145 | 145 | { |
| 146 | 146 | $this->cal->build(); |
| 147 | 147 | $children = array(); |
| 148 | 148 | $i = 1; |
| 149 | - while ( $Child = $this->cal->fetch() ) { |
|
| 150 | - $children[$i]=$Child; |
|
| 149 | + while ($Child = $this->cal->fetch()) { |
|
| 150 | + $children[$i] = $Child; |
|
| 151 | 151 | ++$i; |
| 152 | 152 | } |
| 153 | - $this->assertEqual($children,$this->cal->fetchAll()); |
|
| 153 | + $this->assertEqual($children, $this->cal->fetchAll()); |
|
| 154 | 154 | } |
| 155 | 155 | function testSelection() |
| 156 | 156 | { |
| 157 | 157 | require_once(CALENDAR_ROOT . 'Month.php'); |
| 158 | - $selection = array(new Calendar_Month(2003,10)); |
|
| 158 | + $selection = array(new Calendar_Month(2003, 10)); |
|
| 159 | 159 | $this->cal->build($selection); |
| 160 | 160 | $i = 1; |
| 161 | - while ( $Child = $this->cal->fetch() ) { |
|
| 162 | - if ( $i == 10 ) |
|
| 161 | + while ($Child = $this->cal->fetch()) { |
|
| 162 | + if ($i == 10) |
|
| 163 | 163 | break; |
| 164 | 164 | ++$i; |
| 165 | 165 | } |
@@ -159,8 +159,9 @@ |
||
| 159 | 159 | $this->cal->build($selection); |
| 160 | 160 | $i = 1; |
| 161 | 161 | while ( $Child = $this->cal->fetch() ) { |
| 162 | - if ( $i == 10 ) |
|
| 163 | - break; |
|
| 162 | + if ( $i == 10 ) { |
|
| 163 | + break; |
|
| 164 | + } |
|
| 164 | 165 | ++$i; |
| 165 | 166 | } |
| 166 | 167 | $this->assertTrue($Child->isSelected()); |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | $this->cal = Calendar_Factory::create('Week', 2003, 10, 9); |
| 22 | 22 | //print_r($this->cal); |
| 23 | 23 | } |
| 24 | - function testPrevDay () |
|
| 24 | + function testPrevDay() |
|
| 25 | 25 | { |
| 26 | 26 | $this->assertEqual(8, $this->cal->prevDay()); |
| 27 | 27 | } |
| 28 | - function testPrevDay_Array () |
|
| 28 | + function testPrevDay_Array() |
|
| 29 | 29 | { |
| 30 | 30 | $this->assertEqual( |
| 31 | 31 | array( |
@@ -37,58 +37,58 @@ discard block |
||
| 37 | 37 | 'second' => 0), |
| 38 | 38 | $this->cal->prevDay('array')); |
| 39 | 39 | } |
| 40 | - function testThisDay () |
|
| 40 | + function testThisDay() |
|
| 41 | 41 | { |
| 42 | 42 | $this->assertEqual(9, $this->cal->thisDay()); |
| 43 | 43 | } |
| 44 | - function testNextDay () |
|
| 44 | + function testNextDay() |
|
| 45 | 45 | { |
| 46 | 46 | $this->assertEqual(10, $this->cal->nextDay()); |
| 47 | 47 | } |
| 48 | - function testPrevHour () |
|
| 48 | + function testPrevHour() |
|
| 49 | 49 | { |
| 50 | 50 | $this->assertEqual(23, $this->cal->prevHour()); |
| 51 | 51 | } |
| 52 | - function testThisHour () |
|
| 52 | + function testThisHour() |
|
| 53 | 53 | { |
| 54 | 54 | $this->assertEqual(0, $this->cal->thisHour()); |
| 55 | 55 | } |
| 56 | - function testNextHour () |
|
| 56 | + function testNextHour() |
|
| 57 | 57 | { |
| 58 | 58 | $this->assertEqual(1, $this->cal->nextHour()); |
| 59 | 59 | } |
| 60 | - function testPrevMinute () |
|
| 60 | + function testPrevMinute() |
|
| 61 | 61 | { |
| 62 | 62 | $this->assertEqual(59, $this->cal->prevMinute()); |
| 63 | 63 | } |
| 64 | - function testThisMinute () |
|
| 64 | + function testThisMinute() |
|
| 65 | 65 | { |
| 66 | 66 | $this->assertEqual(0, $this->cal->thisMinute()); |
| 67 | 67 | } |
| 68 | - function testNextMinute () |
|
| 68 | + function testNextMinute() |
|
| 69 | 69 | { |
| 70 | 70 | $this->assertEqual(1, $this->cal->nextMinute()); |
| 71 | 71 | } |
| 72 | - function testPrevSecond () |
|
| 72 | + function testPrevSecond() |
|
| 73 | 73 | { |
| 74 | 74 | $this->assertEqual(59, $this->cal->prevSecond()); |
| 75 | 75 | } |
| 76 | - function testThisSecond () |
|
| 76 | + function testThisSecond() |
|
| 77 | 77 | { |
| 78 | 78 | $this->assertEqual(0, $this->cal->thisSecond()); |
| 79 | 79 | } |
| 80 | - function testNextSecond () |
|
| 80 | + function testNextSecond() |
|
| 81 | 81 | { |
| 82 | 82 | $this->assertEqual(1, $this->cal->nextSecond()); |
| 83 | 83 | } |
| 84 | 84 | function testGetTimeStamp() |
| 85 | 85 | { |
| 86 | - $stamp = mktime(0,0,0,10,9,2003); |
|
| 87 | - $this->assertEqual($stamp,$this->cal->getTimeStamp()); |
|
| 86 | + $stamp = mktime(0, 0, 0, 10, 9, 2003); |
|
| 87 | + $this->assertEqual($stamp, $this->cal->getTimeStamp()); |
|
| 88 | 88 | } |
| 89 | 89 | function testNewTimeStamp() |
| 90 | 90 | { |
| 91 | - $stamp = mktime(0,0,0,7,28,2004); |
|
| 91 | + $stamp = mktime(0, 0, 0, 7, 28, 2004); |
|
| 92 | 92 | $this->cal->setTimestamp($stamp); |
| 93 | 93 | $this->assertEqual('29 2004', date('W Y', $this->cal->prevWeek(true))); |
| 94 | 94 | $this->assertEqual('30 2004', date('W Y', $this->cal->thisWeek(true))); |
@@ -97,47 +97,47 @@ discard block |
||
| 97 | 97 | function testPrevWeekInMonth() |
| 98 | 98 | { |
| 99 | 99 | $this->assertEqual(1, $this->cal->prevWeek()); |
| 100 | - $stamp = mktime(0,0,0,2,3,2005); |
|
| 100 | + $stamp = mktime(0, 0, 0, 2, 3, 2005); |
|
| 101 | 101 | $this->cal->setTimestamp($stamp); |
| 102 | 102 | $this->assertEqual(0, $this->cal->prevWeek()); |
| 103 | 103 | } |
| 104 | 104 | function testThisWeekInMonth() |
| 105 | 105 | { |
| 106 | 106 | $this->assertEqual(2, $this->cal->thisWeek()); |
| 107 | - $stamp = mktime(0,0,0,2,3,2005); |
|
| 107 | + $stamp = mktime(0, 0, 0, 2, 3, 2005); |
|
| 108 | 108 | $this->cal->setTimestamp($stamp); |
| 109 | 109 | $this->assertEqual(1, $this->cal->thisWeek()); |
| 110 | - $stamp = mktime(0,0,0,1,1,2005); |
|
| 110 | + $stamp = mktime(0, 0, 0, 1, 1, 2005); |
|
| 111 | 111 | $this->cal->setTimestamp($stamp); |
| 112 | 112 | $this->assertEqual(1, $this->cal->thisWeek()); |
| 113 | - $stamp = mktime(0,0,0,1,3,2005); |
|
| 113 | + $stamp = mktime(0, 0, 0, 1, 3, 2005); |
|
| 114 | 114 | $this->cal->setTimestamp($stamp); |
| 115 | 115 | $this->assertEqual(2, $this->cal->thisWeek()); |
| 116 | 116 | } |
| 117 | 117 | function testNextWeekInMonth() |
| 118 | 118 | { |
| 119 | 119 | $this->assertEqual(3, $this->cal->nextWeek()); |
| 120 | - $stamp = mktime(0,0,0,2,3,2005); |
|
| 120 | + $stamp = mktime(0, 0, 0, 2, 3, 2005); |
|
| 121 | 121 | $this->cal->setTimestamp($stamp); |
| 122 | 122 | $this->assertEqual(2, $this->cal->nextWeek()); |
| 123 | 123 | } |
| 124 | 124 | function testPrevWeekInYear() |
| 125 | 125 | { |
| 126 | 126 | $this->assertEqual(date('W', $this->cal->prevWeek('timestamp')), $this->cal->prevWeek('n_in_year')); |
| 127 | - $stamp = mktime(0,0,0,1,1,2004); |
|
| 127 | + $stamp = mktime(0, 0, 0, 1, 1, 2004); |
|
| 128 | 128 | $this->cal->setTimestamp($stamp); |
| 129 | 129 | $this->assertEqual(date('W', $this->cal->nextWeek('timestamp')), $this->cal->nextWeek('n_in_year')); |
| 130 | 130 | } |
| 131 | 131 | function testThisWeekInYear() |
| 132 | 132 | { |
| 133 | 133 | $this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year')); |
| 134 | - $stamp = mktime(0,0,0,1,1,2004); |
|
| 134 | + $stamp = mktime(0, 0, 0, 1, 1, 2004); |
|
| 135 | 135 | $this->cal->setTimestamp($stamp); |
| 136 | 136 | $this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year')); |
| 137 | 137 | } |
| 138 | 138 | function testFirstWeekInYear() |
| 139 | 139 | { |
| 140 | - $stamp = mktime(0,0,0,1,4,2004); |
|
| 140 | + $stamp = mktime(0, 0, 0, 1, 4, 2004); |
|
| 141 | 141 | $this->cal->setTimestamp($stamp); |
| 142 | 142 | $this->assertEqual(1, $this->cal->thisWeek('n_in_year')); |
| 143 | 143 | } |
@@ -183,21 +183,21 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | function testPrevWeekObject() |
| 185 | 185 | { |
| 186 | - $testWeek = Calendar_Factory::create('Week', 2003,9,28); |
|
| 186 | + $testWeek = Calendar_Factory::create('Week', 2003, 9, 28); |
|
| 187 | 187 | $Week = $this->cal->prevWeek('object'); |
| 188 | - $this->assertEqual($testWeek->getTimeStamp(),$Week->getTimeStamp()); |
|
| 188 | + $this->assertEqual($testWeek->getTimeStamp(), $Week->getTimeStamp()); |
|
| 189 | 189 | } |
| 190 | 190 | function testThisWeekObject() |
| 191 | 191 | { |
| 192 | - $testWeek = Calendar_Factory::create('Week', 2003,10,5); |
|
| 192 | + $testWeek = Calendar_Factory::create('Week', 2003, 10, 5); |
|
| 193 | 193 | $Week = $this->cal->thisWeek('object'); |
| 194 | - $this->assertEqual($testWeek->getTimeStamp(),$Week->getTimeStamp()); |
|
| 194 | + $this->assertEqual($testWeek->getTimeStamp(), $Week->getTimeStamp()); |
|
| 195 | 195 | } |
| 196 | 196 | function testNextWeekObject() |
| 197 | 197 | { |
| 198 | - $testWeek = Calendar_Factory::create('Week', 2003,10,12); |
|
| 198 | + $testWeek = Calendar_Factory::create('Week', 2003, 10, 12); |
|
| 199 | 199 | $Week = $this->cal->nextWeek('object'); |
| 200 | - $this->assertEqual($testWeek->getTimeStamp(),$Week->getTimeStamp()); |
|
| 200 | + $this->assertEqual($testWeek->getTimeStamp(), $Week->getTimeStamp()); |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | function testFetch() |
| 220 | 220 | { |
| 221 | 221 | $this->cal->build(); |
| 222 | - $i=0; |
|
| 222 | + $i = 0; |
|
| 223 | 223 | while ($Child = $this->cal->fetch()) { |
| 224 | 224 | ++$i; |
| 225 | 225 | } |
@@ -230,11 +230,11 @@ discard block |
||
| 230 | 230 | $this->cal->build(); |
| 231 | 231 | $children = array(); |
| 232 | 232 | $i = 1; |
| 233 | - while ( $Child = $this->cal->fetch() ) { |
|
| 234 | - $children[$i]=$Child; |
|
| 233 | + while ($Child = $this->cal->fetch()) { |
|
| 234 | + $children[$i] = $Child; |
|
| 235 | 235 | ++$i; |
| 236 | 236 | } |
| 237 | - $this->assertEqual($children,$this->cal->fetchAll()); |
|
| 237 | + $this->assertEqual($children, $this->cal->fetchAll()); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | function testSelection() |
@@ -14,23 +14,23 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @param string $name |
| 16 | 16 | */ |
| 17 | - function TestOfCalendar($name='Test of Calendar') |
|
| 17 | + function TestOfCalendar($name = 'Test of Calendar') |
|
| 18 | 18 | { |
| 19 | 19 | $this->UnitTestCase($name); |
| 20 | 20 | } |
| 21 | 21 | function setUp() |
| 22 | 22 | { |
| 23 | - $this->cal = new Calendar(2003,10,25,13,32,43); |
|
| 23 | + $this->cal = new Calendar(2003, 10, 25, 13, 32, 43); |
|
| 24 | 24 | } |
| 25 | 25 | function tearDown() |
| 26 | 26 | { |
| 27 | 27 | unset($this->cal); |
| 28 | 28 | } |
| 29 | - function testPrevYear () |
|
| 29 | + function testPrevYear() |
|
| 30 | 30 | { |
| 31 | - $this->assertEqual(2002,$this->cal->prevYear()); |
|
| 31 | + $this->assertEqual(2002, $this->cal->prevYear()); |
|
| 32 | 32 | } |
| 33 | - function testPrevYear_Array () |
|
| 33 | + function testPrevYear_Array() |
|
| 34 | 34 | { |
| 35 | 35 | $this->assertEqual( |
| 36 | 36 | array( |
@@ -42,19 +42,19 @@ discard block |
||
| 42 | 42 | 'second' => 0), |
| 43 | 43 | $this->cal->prevYear('array')); |
| 44 | 44 | } |
| 45 | - function testThisYear () |
|
| 45 | + function testThisYear() |
|
| 46 | 46 | { |
| 47 | - $this->assertEqual(2003,$this->cal->thisYear()); |
|
| 47 | + $this->assertEqual(2003, $this->cal->thisYear()); |
|
| 48 | 48 | } |
| 49 | - function testNextYear () |
|
| 49 | + function testNextYear() |
|
| 50 | 50 | { |
| 51 | - $this->assertEqual(2004,$this->cal->nextYear()); |
|
| 51 | + $this->assertEqual(2004, $this->cal->nextYear()); |
|
| 52 | 52 | } |
| 53 | - function testPrevMonth () |
|
| 53 | + function testPrevMonth() |
|
| 54 | 54 | { |
| 55 | - $this->assertEqual(9,$this->cal->prevMonth()); |
|
| 55 | + $this->assertEqual(9, $this->cal->prevMonth()); |
|
| 56 | 56 | } |
| 57 | - function testPrevMonth_Array () |
|
| 57 | + function testPrevMonth_Array() |
|
| 58 | 58 | { |
| 59 | 59 | $this->assertEqual( |
| 60 | 60 | array( |
@@ -66,19 +66,19 @@ discard block |
||
| 66 | 66 | 'second' => 0), |
| 67 | 67 | $this->cal->prevMonth('array')); |
| 68 | 68 | } |
| 69 | - function testThisMonth () |
|
| 69 | + function testThisMonth() |
|
| 70 | 70 | { |
| 71 | - $this->assertEqual(10,$this->cal->thisMonth()); |
|
| 71 | + $this->assertEqual(10, $this->cal->thisMonth()); |
|
| 72 | 72 | } |
| 73 | - function testNextMonth () |
|
| 73 | + function testNextMonth() |
|
| 74 | 74 | { |
| 75 | - $this->assertEqual(11,$this->cal->nextMonth()); |
|
| 75 | + $this->assertEqual(11, $this->cal->nextMonth()); |
|
| 76 | 76 | } |
| 77 | - function testPrevDay () |
|
| 77 | + function testPrevDay() |
|
| 78 | 78 | { |
| 79 | - $this->assertEqual(24,$this->cal->prevDay()); |
|
| 79 | + $this->assertEqual(24, $this->cal->prevDay()); |
|
| 80 | 80 | } |
| 81 | - function testPrevDay_Array () |
|
| 81 | + function testPrevDay_Array() |
|
| 82 | 82 | { |
| 83 | 83 | $this->assertEqual( |
| 84 | 84 | array( |
@@ -90,60 +90,60 @@ discard block |
||
| 90 | 90 | 'second' => 0), |
| 91 | 91 | $this->cal->prevDay('array')); |
| 92 | 92 | } |
| 93 | - function testThisDay () |
|
| 93 | + function testThisDay() |
|
| 94 | 94 | { |
| 95 | - $this->assertEqual(25,$this->cal->thisDay()); |
|
| 95 | + $this->assertEqual(25, $this->cal->thisDay()); |
|
| 96 | 96 | } |
| 97 | - function testNextDay () |
|
| 97 | + function testNextDay() |
|
| 98 | 98 | { |
| 99 | - $this->assertEqual(26,$this->cal->nextDay()); |
|
| 99 | + $this->assertEqual(26, $this->cal->nextDay()); |
|
| 100 | 100 | } |
| 101 | - function testPrevHour () |
|
| 101 | + function testPrevHour() |
|
| 102 | 102 | { |
| 103 | - $this->assertEqual(12,$this->cal->prevHour()); |
|
| 103 | + $this->assertEqual(12, $this->cal->prevHour()); |
|
| 104 | 104 | } |
| 105 | - function testThisHour () |
|
| 105 | + function testThisHour() |
|
| 106 | 106 | { |
| 107 | - $this->assertEqual(13,$this->cal->thisHour()); |
|
| 107 | + $this->assertEqual(13, $this->cal->thisHour()); |
|
| 108 | 108 | } |
| 109 | - function testNextHour () |
|
| 109 | + function testNextHour() |
|
| 110 | 110 | { |
| 111 | - $this->assertEqual(14,$this->cal->nextHour()); |
|
| 111 | + $this->assertEqual(14, $this->cal->nextHour()); |
|
| 112 | 112 | } |
| 113 | - function testPrevMinute () |
|
| 113 | + function testPrevMinute() |
|
| 114 | 114 | { |
| 115 | - $this->assertEqual(31,$this->cal->prevMinute()); |
|
| 115 | + $this->assertEqual(31, $this->cal->prevMinute()); |
|
| 116 | 116 | } |
| 117 | - function testThisMinute () |
|
| 117 | + function testThisMinute() |
|
| 118 | 118 | { |
| 119 | - $this->assertEqual(32,$this->cal->thisMinute()); |
|
| 119 | + $this->assertEqual(32, $this->cal->thisMinute()); |
|
| 120 | 120 | } |
| 121 | - function testNextMinute () |
|
| 121 | + function testNextMinute() |
|
| 122 | 122 | { |
| 123 | - $this->assertEqual(33,$this->cal->nextMinute()); |
|
| 123 | + $this->assertEqual(33, $this->cal->nextMinute()); |
|
| 124 | 124 | } |
| 125 | - function testPrevSecond () |
|
| 125 | + function testPrevSecond() |
|
| 126 | 126 | { |
| 127 | - $this->assertEqual(42,$this->cal->prevSecond()); |
|
| 127 | + $this->assertEqual(42, $this->cal->prevSecond()); |
|
| 128 | 128 | } |
| 129 | - function testThisSecond () |
|
| 129 | + function testThisSecond() |
|
| 130 | 130 | { |
| 131 | - $this->assertEqual(43,$this->cal->thisSecond()); |
|
| 131 | + $this->assertEqual(43, $this->cal->thisSecond()); |
|
| 132 | 132 | } |
| 133 | - function testNextSecond () |
|
| 133 | + function testNextSecond() |
|
| 134 | 134 | { |
| 135 | - $this->assertEqual(44,$this->cal->nextSecond()); |
|
| 135 | + $this->assertEqual(44, $this->cal->nextSecond()); |
|
| 136 | 136 | } |
| 137 | 137 | function testSetTimeStamp() |
| 138 | 138 | { |
| 139 | - $stamp = mktime(13,32,43,10,25,2003); |
|
| 139 | + $stamp = mktime(13, 32, 43, 10, 25, 2003); |
|
| 140 | 140 | $this->cal->setTimeStamp($stamp); |
| 141 | - $this->assertEqual($stamp,$this->cal->getTimeStamp()); |
|
| 141 | + $this->assertEqual($stamp, $this->cal->getTimeStamp()); |
|
| 142 | 142 | } |
| 143 | 143 | function testGetTimeStamp() |
| 144 | 144 | { |
| 145 | - $stamp = mktime(13,32,43,10,25,2003); |
|
| 146 | - $this->assertEqual($stamp,$this->cal->getTimeStamp()); |
|
| 145 | + $stamp = mktime(13, 32, 43, 10, 25, 2003); |
|
| 146 | + $this->assertEqual($stamp, $this->cal->getTimeStamp()); |
|
| 147 | 147 | } |
| 148 | 148 | function testIsToday() |
| 149 | 149 | { |
@@ -20,27 +20,27 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | function testGetSecondsInMinute() |
| 22 | 22 | { |
| 23 | - $this->assertEqual($this->engine->getSecondsInMinute(),_EXTCAL_TS_MINUTE); |
|
| 23 | + $this->assertEqual($this->engine->getSecondsInMinute(), _EXTCAL_TS_MINUTE); |
|
| 24 | 24 | } |
| 25 | 25 | function testGetMinutesInHour() |
| 26 | 26 | { |
| 27 | - $this->assertEqual($this->engine->getMinutesInHour(),_EXTCAL_TS_MINUTE); |
|
| 27 | + $this->assertEqual($this->engine->getMinutesInHour(), _EXTCAL_TS_MINUTE); |
|
| 28 | 28 | } |
| 29 | 29 | function testGetHoursInDay() |
| 30 | 30 | { |
| 31 | - $this->assertEqual($this->engine->getHoursInDay(),24); |
|
| 31 | + $this->assertEqual($this->engine->getHoursInDay(), 24); |
|
| 32 | 32 | } |
| 33 | 33 | function testGetFirstDayOfWeek() |
| 34 | 34 | { |
| 35 | - $this->assertEqual($this->engine->getFirstDayOfWeek(),1); |
|
| 35 | + $this->assertEqual($this->engine->getFirstDayOfWeek(), 1); |
|
| 36 | 36 | } |
| 37 | 37 | function testGetWeekDays() |
| 38 | 38 | { |
| 39 | - $this->assertEqual($this->engine->getWeekDays(),array(0,1,2,3,4,5,6)); |
|
| 39 | + $this->assertEqual($this->engine->getWeekDays(), array(0, 1, 2, 3, 4, 5, 6)); |
|
| 40 | 40 | } |
| 41 | 41 | function testGetDaysInWeek() |
| 42 | 42 | { |
| 43 | - $this->assertEqual($this->engine->getDaysInWeek(),7); |
|
| 43 | + $this->assertEqual($this->engine->getDaysInWeek(), 7); |
|
| 44 | 44 | } |
| 45 | 45 | function testGetWeekNInYear() |
| 46 | 46 | { |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | function testGetWeeksInMonth3() |
| 66 | 66 | { |
| 67 | 67 | // Unusual cases that can cause fails (shows up with example 21.php) |
| 68 | - $this->assertEqual($this->engine->getWeeksInMonth(2004,2,1),5); |
|
| 69 | - $this->assertEqual($this->engine->getWeeksInMonth(2004,8,1),6); |
|
| 68 | + $this->assertEqual($this->engine->getWeeksInMonth(2004, 2, 1), 5); |
|
| 69 | + $this->assertEqual($this->engine->getWeeksInMonth(2004, 8, 1), 6); |
|
| 70 | 70 | } |
| 71 | 71 | function testGetDayOfWeek() |
| 72 | 72 | { |
@@ -74,54 +74,54 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | function testGetFirstDayInMonth() |
| 76 | 76 | { |
| 77 | - $this->assertEqual($this->engine->getFirstDayInMonth(2003,10),3); |
|
| 77 | + $this->assertEqual($this->engine->getFirstDayInMonth(2003, 10), 3); |
|
| 78 | 78 | } |
| 79 | 79 | function testGetDaysInMonth() |
| 80 | 80 | { |
| 81 | - $this->assertEqual($this->engine->getDaysInMonth(2003,10),31); |
|
| 81 | + $this->assertEqual($this->engine->getDaysInMonth(2003, 10), 31); |
|
| 82 | 82 | } |
| 83 | 83 | function testGetMinYears() |
| 84 | 84 | { |
| 85 | - $this->assertEqual($this->engine->getMinYears(),0); |
|
| 85 | + $this->assertEqual($this->engine->getMinYears(), 0); |
|
| 86 | 86 | } |
| 87 | 87 | function testGetMaxYears() |
| 88 | 88 | { |
| 89 | - $this->assertEqual($this->engine->getMaxYears(),9999); |
|
| 89 | + $this->assertEqual($this->engine->getMaxYears(), 9999); |
|
| 90 | 90 | } |
| 91 | 91 | function testDateToStamp() |
| 92 | 92 | { |
| 93 | 93 | $stamp = '2003-10-15 13:30:45'; |
| 94 | - $this->assertEqual($this->engine->dateToStamp(2003,10,15,13,30,45),$stamp); |
|
| 94 | + $this->assertEqual($this->engine->dateToStamp(2003, 10, 15, 13, 30, 45), $stamp); |
|
| 95 | 95 | } |
| 96 | 96 | function testStampToSecond() |
| 97 | 97 | { |
| 98 | 98 | $stamp = '2003-10-15 13:30:45'; |
| 99 | - $this->assertEqual($this->engine->stampToSecond($stamp),45); |
|
| 99 | + $this->assertEqual($this->engine->stampToSecond($stamp), 45); |
|
| 100 | 100 | } |
| 101 | 101 | function testStampToMinute() |
| 102 | 102 | { |
| 103 | 103 | $stamp = '2003-10-15 13:30:45'; |
| 104 | - $this->assertEqual($this->engine->stampToMinute($stamp),30); |
|
| 104 | + $this->assertEqual($this->engine->stampToMinute($stamp), 30); |
|
| 105 | 105 | } |
| 106 | 106 | function testStampToHour() |
| 107 | 107 | { |
| 108 | 108 | $stamp = '2003-10-15 13:30:45'; |
| 109 | - $this->assertEqual($this->engine->stampToHour($stamp),13); |
|
| 109 | + $this->assertEqual($this->engine->stampToHour($stamp), 13); |
|
| 110 | 110 | } |
| 111 | 111 | function testStampToDay() |
| 112 | 112 | { |
| 113 | 113 | $stamp = '2003-10-15 13:30:45'; |
| 114 | - $this->assertEqual($this->engine->stampToDay($stamp),15); |
|
| 114 | + $this->assertEqual($this->engine->stampToDay($stamp), 15); |
|
| 115 | 115 | } |
| 116 | 116 | function testStampToMonth() |
| 117 | 117 | { |
| 118 | 118 | $stamp = '2003-10-15 13:30:45'; |
| 119 | - $this->assertEqual($this->engine->stampToMonth($stamp),10); |
|
| 119 | + $this->assertEqual($this->engine->stampToMonth($stamp), 10); |
|
| 120 | 120 | } |
| 121 | 121 | function testStampToYear() |
| 122 | 122 | { |
| 123 | 123 | $stamp = '2003-10-15 13:30:45'; |
| 124 | - $this->assertEqual($this->engine->stampToYear($stamp),2003); |
|
| 124 | + $this->assertEqual($this->engine->stampToYear($stamp), 2003); |
|
| 125 | 125 | } |
| 126 | 126 | function testAdjustDate() |
| 127 | 127 | { |
@@ -18,22 +18,22 @@ |
||
| 18 | 18 | function testFragments() |
| 19 | 19 | { |
| 20 | 20 | $Uri = new Calendar_Decorator_Uri($this->mockcal); |
| 21 | - $Uri->setFragments('year','month','day','hour','minute','second'); |
|
| 22 | - $this->assertEqual('year=&month=&day=&hour=&minute=&second=',$Uri->this('second')); |
|
| 21 | + $Uri->setFragments('year', 'month', 'day', 'hour', 'minute', 'second'); |
|
| 22 | + $this->assertEqual('year=&month=&day=&hour=&minute=&second=', $Uri->this('second')); |
|
| 23 | 23 | } |
| 24 | 24 | function testScalarFragments() |
| 25 | 25 | { |
| 26 | 26 | $Uri = new Calendar_Decorator_Uri($this->mockcal); |
| 27 | - $Uri->setFragments('year','month','day','hour','minute','second'); |
|
| 27 | + $Uri->setFragments('year', 'month', 'day', 'hour', 'minute', 'second'); |
|
| 28 | 28 | $Uri->setScalar(); |
| 29 | - $this->assertEqual('&&&&&',$Uri->this('second')); |
|
| 29 | + $this->assertEqual('&&&&&', $Uri->this('second')); |
|
| 30 | 30 | } |
| 31 | 31 | function testSetSeperator() |
| 32 | 32 | { |
| 33 | 33 | $Uri = new Calendar_Decorator_Uri($this->mockcal); |
| 34 | - $Uri->setFragments('year','month','day','hour','minute','second'); |
|
| 34 | + $Uri->setFragments('year', 'month', 'day', 'hour', 'minute', 'second'); |
|
| 35 | 35 | $Uri->setSeparator('/'); |
| 36 | - $this->assertEqual('year=/month=/day=/hour=/minute=/second=',$Uri->this('second')); |
|
| 36 | + $this->assertEqual('year=/month=/day=/hour=/minute=/second=', $Uri->this('second')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | function setUp() |
| 19 | 19 | { |
| 20 | - $this->cal = new Calendar_Hour(2003,10,25,13); |
|
| 20 | + $this->cal = new Calendar_Hour(2003, 10, 25, 13); |
|
| 21 | 21 | } |
| 22 | - function testPrevDay_Array () |
|
| 22 | + function testPrevDay_Array() |
|
| 23 | 23 | { |
| 24 | 24 | $this->assertEqual( |
| 25 | 25 | array( |
@@ -31,34 +31,34 @@ discard block |
||
| 31 | 31 | 'second' => 0), |
| 32 | 32 | $this->cal->prevDay('array')); |
| 33 | 33 | } |
| 34 | - function testPrevMinute () |
|
| 34 | + function testPrevMinute() |
|
| 35 | 35 | { |
| 36 | - $this->assertEqual(59,$this->cal->prevMinute()); |
|
| 36 | + $this->assertEqual(59, $this->cal->prevMinute()); |
|
| 37 | 37 | } |
| 38 | - function testThisMinute () |
|
| 38 | + function testThisMinute() |
|
| 39 | 39 | { |
| 40 | - $this->assertEqual(0,$this->cal->thisMinute()); |
|
| 40 | + $this->assertEqual(0, $this->cal->thisMinute()); |
|
| 41 | 41 | } |
| 42 | - function testNextMinute () |
|
| 42 | + function testNextMinute() |
|
| 43 | 43 | { |
| 44 | - $this->assertEqual(1,$this->cal->nextMinute()); |
|
| 44 | + $this->assertEqual(1, $this->cal->nextMinute()); |
|
| 45 | 45 | } |
| 46 | - function testPrevSecond () |
|
| 46 | + function testPrevSecond() |
|
| 47 | 47 | { |
| 48 | - $this->assertEqual(59,$this->cal->prevSecond()); |
|
| 48 | + $this->assertEqual(59, $this->cal->prevSecond()); |
|
| 49 | 49 | } |
| 50 | - function testThisSecond () |
|
| 50 | + function testThisSecond() |
|
| 51 | 51 | { |
| 52 | - $this->assertEqual(0,$this->cal->thisSecond()); |
|
| 52 | + $this->assertEqual(0, $this->cal->thisSecond()); |
|
| 53 | 53 | } |
| 54 | - function testNextSecond () |
|
| 54 | + function testNextSecond() |
|
| 55 | 55 | { |
| 56 | - $this->assertEqual(1,$this->cal->nextSecond()); |
|
| 56 | + $this->assertEqual(1, $this->cal->nextSecond()); |
|
| 57 | 57 | } |
| 58 | 58 | function testGetTimeStamp() |
| 59 | 59 | { |
| 60 | - $stamp = mktime(13,0,0,10,25,2003); |
|
| 61 | - $this->assertEqual($stamp,$this->cal->getTimeStamp()); |
|
| 60 | + $stamp = mktime(13, 0, 0, 10, 25, 2003); |
|
| 61 | + $this->assertEqual($stamp, $this->cal->getTimeStamp()); |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -74,36 +74,36 @@ discard block |
||
| 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 . 'Minute.php'); |
| 102 | - $selection = array(new Calendar_Minute(2003,10,25,13,32)); |
|
| 102 | + $selection = array(new Calendar_Minute(2003, 10, 25, 13, 32)); |
|
| 103 | 103 | $this->cal->build($selection); |
| 104 | 104 | $i = 0; |
| 105 | - while ( $Child = $this->cal->fetch() ) { |
|
| 106 | - if ( $i == 32 ) |
|
| 105 | + while ($Child = $this->cal->fetch()) { |
|
| 106 | + if ($i == 32) |
|
| 107 | 107 | break; |
| 108 | 108 | ++$i; |
| 109 | 109 | } |
@@ -103,8 +103,9 @@ |
||
| 103 | 103 | $this->cal->build($selection); |
| 104 | 104 | $i = 0; |
| 105 | 105 | while ( $Child = $this->cal->fetch() ) { |
| 106 | - if ( $i == 32 ) |
|
| 107 | - break; |
|
| 106 | + if ( $i == 32 ) { |
|
| 107 | + break; |
|
| 108 | + } |
|
| 108 | 109 | ++$i; |
| 109 | 110 | } |
| 110 | 111 | $this->assertTrue($Child->isSelected()); |
@@ -20,27 +20,27 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | function testGetSecondsInMinute() |
| 22 | 22 | { |
| 23 | - $this->assertEqual($this->engine->getSecondsInMinute(),_EXTCAL_TS_MINUTE); |
|
| 23 | + $this->assertEqual($this->engine->getSecondsInMinute(), _EXTCAL_TS_MINUTE); |
|
| 24 | 24 | } |
| 25 | 25 | function testGetMinutesInHour() |
| 26 | 26 | { |
| 27 | - $this->assertEqual($this->engine->getMinutesInHour(),_EXTCAL_TS_MINUTE); |
|
| 27 | + $this->assertEqual($this->engine->getMinutesInHour(), _EXTCAL_TS_MINUTE); |
|
| 28 | 28 | } |
| 29 | 29 | function testGetHoursInDay() |
| 30 | 30 | { |
| 31 | - $this->assertEqual($this->engine->getHoursInDay(),24); |
|
| 31 | + $this->assertEqual($this->engine->getHoursInDay(), 24); |
|
| 32 | 32 | } |
| 33 | 33 | function testGetFirstDayOfWeek() |
| 34 | 34 | { |
| 35 | - $this->assertEqual($this->engine->getFirstDayOfWeek(),1); |
|
| 35 | + $this->assertEqual($this->engine->getFirstDayOfWeek(), 1); |
|
| 36 | 36 | } |
| 37 | 37 | function testGetWeekDays() |
| 38 | 38 | { |
| 39 | - $this->assertEqual($this->engine->getWeekDays(),array(0,1,2,3,4,5,6)); |
|
| 39 | + $this->assertEqual($this->engine->getWeekDays(), array(0, 1, 2, 3, 4, 5, 6)); |
|
| 40 | 40 | } |
| 41 | 41 | function testGetDaysInWeek() |
| 42 | 42 | { |
| 43 | - $this->assertEqual($this->engine->getDaysInWeek(),7); |
|
| 43 | + $this->assertEqual($this->engine->getDaysInWeek(), 7); |
|
| 44 | 44 | } |
| 45 | 45 | function testGetWeekNInYear() |
| 46 | 46 | { |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | function testGetWeeksInMonth3() |
| 66 | 66 | { |
| 67 | 67 | // Unusual cases that can cause fails (shows up with example 21.php) |
| 68 | - $this->assertEqual($this->engine->getWeeksInMonth(2004,2,1),5); |
|
| 69 | - $this->assertEqual($this->engine->getWeeksInMonth(2004,8,1),6); |
|
| 68 | + $this->assertEqual($this->engine->getWeeksInMonth(2004, 2, 1), 5); |
|
| 69 | + $this->assertEqual($this->engine->getWeeksInMonth(2004, 8, 1), 6); |
|
| 70 | 70 | } |
| 71 | 71 | function testGetDayOfWeek() |
| 72 | 72 | { |
@@ -74,55 +74,55 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | function testGetFirstDayInMonth() |
| 76 | 76 | { |
| 77 | - $this->assertEqual($this->engine->getFirstDayInMonth(2003,10),3); |
|
| 77 | + $this->assertEqual($this->engine->getFirstDayInMonth(2003, 10), 3); |
|
| 78 | 78 | } |
| 79 | 79 | function testGetDaysInMonth() |
| 80 | 80 | { |
| 81 | - $this->assertEqual($this->engine->getDaysInMonth(2003,10),31); |
|
| 81 | + $this->assertEqual($this->engine->getDaysInMonth(2003, 10), 31); |
|
| 82 | 82 | } |
| 83 | 83 | function testGetMinYears() |
| 84 | 84 | { |
| 85 | 85 | $test = strpos(PHP_OS, 'WIN') >= 0 ? 1970 : 1902; |
| 86 | - $this->assertEqual($this->engine->getMinYears(),$test); |
|
| 86 | + $this->assertEqual($this->engine->getMinYears(), $test); |
|
| 87 | 87 | } |
| 88 | 88 | function testGetMaxYears() |
| 89 | 89 | { |
| 90 | - $this->assertEqual($this->engine->getMaxYears(),2037); |
|
| 90 | + $this->assertEqual($this->engine->getMaxYears(), 2037); |
|
| 91 | 91 | } |
| 92 | 92 | function testDateToStamp() |
| 93 | 93 | { |
| 94 | - $stamp = mktime(0,0,0,10,15,2003); |
|
| 95 | - $this->assertEqual($this->engine->dateToStamp(2003,10,15,0,0,0),$stamp); |
|
| 94 | + $stamp = mktime(0, 0, 0, 10, 15, 2003); |
|
| 95 | + $this->assertEqual($this->engine->dateToStamp(2003, 10, 15, 0, 0, 0), $stamp); |
|
| 96 | 96 | } |
| 97 | 97 | function testStampToSecond() |
| 98 | 98 | { |
| 99 | - $stamp = mktime(13,30,45,10,15,2003); |
|
| 100 | - $this->assertEqual($this->engine->stampToSecond($stamp),45); |
|
| 99 | + $stamp = mktime(13, 30, 45, 10, 15, 2003); |
|
| 100 | + $this->assertEqual($this->engine->stampToSecond($stamp), 45); |
|
| 101 | 101 | } |
| 102 | 102 | function testStampToMinute() |
| 103 | 103 | { |
| 104 | - $stamp = mktime(13,30,45,10,15,2003); |
|
| 105 | - $this->assertEqual($this->engine->stampToMinute($stamp),30); |
|
| 104 | + $stamp = mktime(13, 30, 45, 10, 15, 2003); |
|
| 105 | + $this->assertEqual($this->engine->stampToMinute($stamp), 30); |
|
| 106 | 106 | } |
| 107 | 107 | function testStampToHour() |
| 108 | 108 | { |
| 109 | - $stamp = mktime(13,30,45,10,15,2003); |
|
| 110 | - $this->assertEqual($this->engine->stampToHour($stamp),13); |
|
| 109 | + $stamp = mktime(13, 30, 45, 10, 15, 2003); |
|
| 110 | + $this->assertEqual($this->engine->stampToHour($stamp), 13); |
|
| 111 | 111 | } |
| 112 | 112 | function testStampToDay() |
| 113 | 113 | { |
| 114 | - $stamp = mktime(13,30,45,10,15,2003); |
|
| 115 | - $this->assertEqual($this->engine->stampToDay($stamp),15); |
|
| 114 | + $stamp = mktime(13, 30, 45, 10, 15, 2003); |
|
| 115 | + $this->assertEqual($this->engine->stampToDay($stamp), 15); |
|
| 116 | 116 | } |
| 117 | 117 | function testStampToMonth() |
| 118 | 118 | { |
| 119 | - $stamp = mktime(13,30,45,10,15,2003); |
|
| 120 | - $this->assertEqual($this->engine->stampToMonth($stamp),10); |
|
| 119 | + $stamp = mktime(13, 30, 45, 10, 15, 2003); |
|
| 120 | + $this->assertEqual($this->engine->stampToMonth($stamp), 10); |
|
| 121 | 121 | } |
| 122 | 122 | function testStampToYear() |
| 123 | 123 | { |
| 124 | - $stamp = mktime(13,30,45,10,15,2003); |
|
| 125 | - $this->assertEqual($this->engine->stampToYear($stamp),2003); |
|
| 124 | + $stamp = mktime(13, 30, 45, 10, 15, 2003); |
|
| 125 | + $this->assertEqual($this->engine->stampToYear($stamp), 2003); |
|
| 126 | 126 | } |
| 127 | 127 | function testIsToday() |
| 128 | 128 | { |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | } |
| 18 | 18 | function setUp() |
| 19 | 19 | { |
| 20 | - $this->cal = new Calendar_Second(2003,10,25,13,32,43); |
|
| 20 | + $this->cal = new Calendar_Second(2003, 10, 25, 13, 32, 43); |
|
| 21 | 21 | } |
| 22 | - function testPrevDay_Array () |
|
| 22 | + function testPrevDay_Array() |
|
| 23 | 23 | { |
| 24 | 24 | $this->assertEqual( |
| 25 | 25 | array( |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | require_once 'simple_include.php'; |
| 5 | 5 | require_once 'calendar_include.php'; |
| 6 | 6 | |
| 7 | -Mock::generate('Calendar_Day','Mock_Calendar_Day'); |
|
| 8 | -Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine'); |
|
| 7 | +Mock::generate('Calendar_Day', 'Mock_Calendar_Day'); |
|
| 8 | +Mock::generate('Calendar_Engine_Interface', 'Mock_Calendar_Engine'); |
|
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Class TestOfUtilUri |
@@ -22,13 +22,13 @@ discard block |
||
| 22 | 22 | function setUp() |
| 23 | 23 | { |
| 24 | 24 | $this->MockCal = new Mock_Calendar_Day($this); |
| 25 | - $this->MockCal->setReturnValue('getEngine',new Mock_Calendar_Engine($this)); |
|
| 25 | + $this->MockCal->setReturnValue('getEngine', new Mock_Calendar_Engine($this)); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | function testFragments() |
| 29 | 29 | { |
| 30 | - $Uri = new Calendar_Util_Uri('y','m','d','h','m','s'); |
|
| 31 | - $Uri->setFragments('year','month','day','hour','minute','second'); |
|
| 30 | + $Uri = new Calendar_Util_Uri('y', 'm', 'd', 'h', 'm', 's'); |
|
| 31 | + $Uri->setFragments('year', 'month', 'day', 'hour', 'minute', 'second'); |
|
| 32 | 32 | $this->assertEqual( |
| 33 | 33 | 'year=&month=&day=&hour=&minute=&second=', |
| 34 | 34 | $Uri->this($this->MockCal, 'second') |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | function testScalarFragments() |
| 38 | 38 | { |
| 39 | - $Uri = new Calendar_Util_Uri('year','month','day','hour','minute','second'); |
|
| 39 | + $Uri = new Calendar_Util_Uri('year', 'month', 'day', 'hour', 'minute', 'second'); |
|
| 40 | 40 | $Uri->scalar = true; |
| 41 | 41 | $this->assertEqual( |
| 42 | 42 | '&&&&&', |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | function testSetSeperator() |
| 47 | 47 | { |
| 48 | - $Uri = new Calendar_Util_Uri('year','month','day','hour','minute','second'); |
|
| 48 | + $Uri = new Calendar_Util_Uri('year', 'month', 'day', 'hour', 'minute', 'second'); |
|
| 49 | 49 | $Uri->separator = '/'; |
| 50 | 50 | $this->assertEqual( |
| 51 | 51 | 'year=/month=/day=/hour=/minute=/second=', |