‪TYPO3CMS  10.4
NormalizeCommandTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
23 
27 class ‪NormalizeCommandTest extends UnitTestCase
28 {
32  public static function ‪normalizeValidDataProvider(): array
33  {
34  return [
35  '@weekly' => ['@weekly', '0 0 * * 7'],
36  ' @weekly ' => [' @weekly ', '0 0 * * 7'],
37  '* * * * *' => ['* * * * *', '* * * * *'],
38  '30 4 1,15 * 5' => ['30 4 1,15 * 5', '30 4 1,15 * 5'],
39  '5 0 * * *' => ['5 0 * * *', '5 0 * * *'],
40  '15 14 1 * *' => ['15 14 1 * *', '15 14 1 * *'],
41  '0 22 * * 1-5' => ['0 22 * * 1-5', '0 22 * * 1,2,3,4,5'],
42  '23 0-23/2 * * *' => ['23 0-23/2 * * *', '23 0,2,4,6,8,10,12,14,16,18,20,22 * * *'],
43  '5 4 * * sun' => ['5 4 * * sun', '5 4 * * 7'],
44  '0-3/2,7 0,4 20-22, feb,mar-jun/2,7 1-3,sun' => [
45  '0-3/2,7 0,4 20-22 feb,mar-jun/2,7 1-3,sun',
46  '0,2,7 0,4 20,21,22 2,3,5,7 1,2,3,7'
47  ],
48  '0-20/10 * * * *' => ['0-20/10 * * * *', '0,10,20 * * * *'],
49  '* * 2 * *' => ['* * 2 * *', '* * 2 * *'],
50  '* * 2,7 * *' => ['* * 2,7 * *', '* * 2,7 * *'],
51  '* * 2-4,10 * *' => ['* * 2-4,10 * *', '* * 2,3,4,10 * *'],
52  '* * */14 * *' => ['* * */14 * *', '* * 1,15,29 * *'],
53  '* * 2,4-6/2,*/14 * *' => ['* * 2,4-6/2,*/14 * *', '* * 1,2,4,6,15,29 * *'],
54  '* * * * 1' => ['* * * * 1', '* * * * 1'],
55  '0 0 * * 0' => ['0 0 * * 0', '0 0 * * 7'],
56  '0 0 * * 7' => ['0 0 * * 7', '0 0 * * 7'],
57  '* * 1,2 * 1' => ['* * 1,2 * 1', '* * 1,2 * 1'],
58  '15 02 * * *' => ['15 02 * * *', '15 2 * * *'],
59  '08 02 * * *' => ['08 02 * * *', '8 2 * * *'],
60  '15 00 * * *' => ['15 00 * * *', '15 0 * * *']
61  ];
62  }
63 
70  public function ‪normalizeConvertsCronCommand($expression, $expected): void
71  {
72  $result = ‪NormalizeCommand::normalize($expression);
73  self::assertEquals($expected, $result);
74  }
75 
79  public static function ‪validSpecialKeywordsDataProvider(): array
80  {
81  return [
82  '@yearly' => ['@yearly', '0 0 1 1 *'],
83  '@annually' => ['@annually', '0 0 1 1 *'],
84  '@monthly' => ['@monthly', '0 0 1 * *'],
85  '@weekly' => ['@weekly', '0 0 * * 0'],
86  '@daily' => ['@daily', '0 0 * * *'],
87  '@midnight' => ['@midnight', '0 0 * * *'],
88  '@hourly' => ['@hourly', '0 * * * *']
89  ];
90  }
91 
98  public function ‪convertKeywordsToCronCommandConvertsValidKeywords($keyword, $expectedCronCommand): void
99  {
101  self::assertEquals($expectedCronCommand, $result);
102  }
103 
108  {
109  $invalidKeyword = 'foo';
111  self::assertEquals($invalidKeyword, $result);
112  }
113 
117  public function ‪normalizeFieldsValidDataProvider(): array
118  {
119  return [
120  '1-2 * * * *' => ['1-2 * * * *', '1,2 * * * *'],
121  '* 1-2 * * *' => ['* 1-2 * * *', '* 1,2 * * *'],
122  '* * 1-2 * *' => ['* * 1-2 * *', '* * 1,2 * *'],
123  '* * * 1-2 *' => ['* * * 1-2 *', '* * * 1,2 *'],
124  '* * * * 1-2' => ['* * * * 1-2', '* * * * 1,2']
125  ];
126  }
127 
134  public function ‪normalizeFieldsConvertsField($expression, $expected): void
135  {
137  self::assertEquals($expected, $result);
138  }
139 
144  {
145  return [
146  '* monthField' => ['*', true, '*'],
147  'string 1 monthField' => ['1', true, '1'],
148  'jan' => ['jan', true, '1'],
149  'feb/2' => ['feb/2', true, '2'],
150  'jan-feb/2' => ['jan-feb/2', true, '1'],
151  '1-2 monthField' => ['1-2', true, '1,2'],
152  '1-3/2,feb,may,6' => ['1-3/2,feb,may,6', true, '1,2,3,5,6'],
153  '*/4' => ['*/4', true, '1,5,9'],
154  '* !monthField' => ['*', false, '*'],
155  'string 1, !monthField' => ['1', false, '1'],
156  'fri' => ['fri', false, '5'],
157  'sun' => ['sun', false, '7'],
158  'string 0 for sunday' => ['0', false, '7'],
159  '0,1' => ['0,1', false, '1,7'],
160  '*/3' => ['*/3', false, '1,4,7'],
161  'tue/2' => ['tue/2', false, '2'],
162  '1-2 !monthField' => ['1-2', false, '1,2'],
163  'tue-fri/2' => ['tue-fri/2', false, '2,4'],
164  '1-3/2,tue,fri,6' => ['1-3/2,tue,fri,6', false, '1,2,3,5,6']
165  ];
166  }
167 
176  $expression,
177  $isMonthField,
178  $expected
179  ): void {
180  $result = ‪NormalizeCommandAccessibleProxy::normalizeMonthAndWeekdayField($expression, $isMonthField);
181  self::assertSame($expected, $result);
182  }
183 
188  {
189  return [
190  'mon' => ['mon', true, 1291083486],
191  '1-2/mon' => ['1-2/mon', true, 1291414957],
192  '0,1' => ['0,1', true, 1291083486],
193  'feb' => ['feb', false, 1291163589],
194  '1-2/feb' => ['1-2/feb', false, 1291414957],
195  '0-fri/2,7' => ['0-fri/2,7', false, 1291237145]
196  ];
197  }
198 
207  $expression,
208  $isMonthField,
209  $expectedExceptionCode
210  ): void {
211  $this->expectException(\InvalidArgumentException::class);
212  $this->expectExceptionCode($expectedExceptionCode);
214  }
215 
219  public static function ‪normalizeIntegerFieldValidDataProvider(): array
220  {
221  return [
222  '*' => ['*', '*'],
223  'string 2' => ['2', '2'],
224  'integer 3' => [3, '3'],
225  'list of values' => ['1,2,3', '1,2,3'],
226  'unsorted list of values' => ['3,1,5', '1,3,5'],
227  'duplicate values' => ['0-2/2,2', '0,2'],
228  'additional field between steps' => ['1-3/2,2', '1,2,3'],
229  '2-4' => ['2-4', '2,3,4'],
230  'simple step 4/4' => ['4/4', '4'],
231  'step 2-7/5' => ['2-7/5', '2,7'],
232  'steps 4-12/4' => ['4-12/4', '4,8,12'],
233  '0-59/20' => ['0-59/20', '0,20,40'],
234  '*/20' => ['*/20', '0,20,40']
235  ];
236  }
237 
244  public function ‪normalizeIntegerFieldReturnsNormalizedListForValidExpression($expression, $expected): void
245  {
247  self::assertSame($expected, $result);
248  }
249 
253  public static function ‪normalizeIntegerFieldInvalidDataProvider(): array
254  {
255  return [
256  'string foo' => ['foo', 0, 59, 1291429389],
257  'empty string' => ['', 0, 59, 1291429389],
258  '4-3' => ['4-3', 0, 59, 1291237145],
259  '/2' => ['/2', 0, 59, 1291234985],
260  '/' => ['/', 0, 59, 1291234985],
261  'left bound too low' => ['2-4', 3, 4, 1291470084],
262  'right bound too high' => ['2-4', 2, 3, 1291470170],
263  'left and right bound' => ['2-5', 2, 4, 1291470170],
264  'element in list is lower than allowed' => ['2,1,4', 2, 4, 1291470084],
265  'element in list is higher than allowed' => ['2,5,4', 1, 4, 1291470170]
266  ];
267  }
268 
278  $expression,
279  $lowerBound,
280  $upperBound,
281  $expectedExceptionCode
282  ): void {
283  $this->expectException(\InvalidArgumentException::class);
284  $this->expectExceptionCode($expectedExceptionCode);
285 
286  ‪NormalizeCommandAccessibleProxy::normalizeIntegerField($expression, $lowerBound, $upperBound);
287  }
288 
293  {
294  $result = ‪NormalizeCommandAccessibleProxy::splitFields('12,13 * 1-12/2,14 jan fri');
295  $expectedResult = [
296  0 => '12,13',
297  1 => '*',
298  2 => '1-12/2,14',
299  3 => 'jan',
300  4 => 'fri'
301  ];
302  self::assertSame($expectedResult, $result);
303  }
304 
308  public static function ‪invalidCronCommandFieldsDataProvider(): array
309  {
310  return [
311  'empty string' => [''],
312  'foo' => ['foo'],
313  'integer 4' => [4],
314  'four fields' => ['* * * *'],
315  'six fields' => ['* * * * * *']
316  ];
317  }
318 
325  {
326  $this->expectException(\InvalidArgumentException::class);
327  $this->expectExceptionCode(1291227373);
329  }
330 
334  public static function ‪validRangeDataProvider(): array
335  {
336  return [
337  'single value' => ['3', '3'],
338  'integer 3' => [3, '3'],
339  '0-0' => ['0-0', '0'],
340  '4-4' => ['4-4', '4'],
341  '0-3' => ['0-3', '0,1,2,3'],
342  '4-5' => ['4-5', '4,5']
343  ];
344  }
345 
352  public function ‪convertRangeToListOfValuesReturnsCorrectListForValidRanges($range, $expected): void
353  {
355  self::assertSame($expected, $result);
356  }
357 
361  public static function ‪invalidRangeDataProvider(): array
362  {
363  return [
364  'empty string' => ['', 1291234985],
365  'string' => ['foo', 1291237668],
366  'single dash' => ['-', 1291237668],
367  'left part is string' => ['foo-5', 1291237668],
368  'right part is string' => ['5-foo', 1291237668],
369  'range of strings' => ['foo-bar', 1291237668],
370  'string five minus' => ['5-', 1291237668],
371  'string minus five' => ['-5', 1291237668],
372  'more than one dash' => ['2-3-4', 1291234986],
373  'left part bigger than right part' => ['6-3', 1291237145]
374  ];
375  }
376 
383  public function ‪convertRangeToListOfValuesThrowsExceptionForInvalidRanges($range, $expectedExceptionCode): void
384  {
385  $this->expectException(\InvalidArgumentException::class);
386  $this->expectExceptionCode($expectedExceptionCode);
388  }
389 
393  public static function ‪validStepsDataProvider(): array
394  {
395  return [
396  '2/2' => ['2/2', '2'],
397  '2,3,4/2' => ['2,3,4/2', '2,4'],
398  '1,2,3,4,5,6,7/3' => ['1,2,3,4,5,6,7/3', '1,4,7'],
399  '0,1,2,3,4,5,6/3' => ['0,1,2,3,4,5,6/3', '0,3,6']
400  ];
401  }
402 
409  public function ‪reduceListOfValuesByStepValueReturnsCorrectListOfValues($stepExpression, $expected): void
410  {
412  self::assertSame($expected, $result);
413  }
414 
418  public static function ‪invalidStepsDataProvider(): array
419  {
420  return [
421  'empty string' => ['', 1291234987],
422  'slash only' => ['/', 1291414955],
423  'left part empty' => ['/2', 1291414955],
424  'right part empty' => ['2/', 1291414956],
425  'multiples slashes' => ['1/2/3', 1291242168],
426  '2-2' => ['2-2', 1291414956],
427  '2.3/2' => ['2.3/2', 1291414958],
428  '2,3,4/2.3' => ['2,3,4/2.3', 1291414957],
429  '2,3,4/2,3' => ['2,3,4/2,3', 1291414957]
430  ];
431  }
432 
440  $stepExpression,
441  $expectedExceptionCode
442  ): void {
443  $this->expectException(\InvalidArgumentException::class);
444  $this->expectExceptionCode($expectedExceptionCode);
445 
447  }
448 
453  {
455  self::assertSame('2', $result);
456  }
457 
462  {
464  self::assertSame('5', $result);
465  }
466 
471  {
473  self::assertSame('2', $result);
474  }
475 
479  public static function ‪validMonthNamesDataProvider(): array
480  {
481  return [
482  'jan' => ['jan', 1],
483  'feb' => ['feb', 2],
484  'MaR' => ['MaR', 3],
485  'aPr' => ['aPr', 4],
486  'MAY' => ['MAY', 5],
487  'jun' => ['jun', 6],
488  'jul' => ['jul', 7],
489  'aug' => ['aug', 8],
490  'sep' => ['sep', 9],
491  'oct' => ['oct', 10],
492  'nov' => ['nov', 11],
493  'dec' => ['dec', 12],
494  'string 7' => ['7', 7],
495  'integer 7' => [7, 7],
496  'string 07' => ['07', 7],
497  'integer 07' => [7, 7]
498  ];
499  }
500 
507  public function ‪normalizeMonthConvertsName($monthName, $expectedInteger): void
508  {
510  self::assertEquals($expectedInteger, $result);
511  }
512 
519  public function ‪normalizeMonthReturnsInteger($monthName, $expectedInteger): void
520  {
522  self::assertIsInt($result);
523  }
524 
528  public static function ‪invalidMonthNamesDataProvider(): array
529  {
530  return [
531  'sep-' => ['sep-', 1291083486],
532  '-September-' => ['-September-', 1291083486],
533  ',sep' => [',sep', 1291083486],
534  ',September,' => [',September,', 1291083486],
535  'sep/' => ['sep/', 1291083486],
536  '/sep' => ['/sep', 1291083486],
537  '/September/' => ['/September/', 1291083486],
538  'foo' => ['foo', 1291083486],
539  'Tuesday' => ['Tuesday', 1291083486],
540  'Tue' => ['Tue', 1291083486],
541  'string 0' => ['0', 1291083486],
542  'integer 0' => [0, 1291083486],
543  'string seven' => ['seven', 1291083486],
544  'string 13' => ['13', 1291083486],
545  'integer 13' => [13, 1291083486],
546  'integer 100' => [100, 1291083486],
547  'integer 2010' => [2010, 1291083486],
548  'string minus 7' => ['-7', 1291083486],
549  'negative integer 7' => [-7, 1291083486]
550  ];
551  }
552 
560  $invalidMonthName,
561  $expectedExceptionCode
562  ): void {
563  $this->expectException(\InvalidArgumentException::class);
564  $this->expectExceptionCode($expectedExceptionCode);
565 
567  }
568 
572  public static function ‪validWeekdayDataProvider(): array
573  {
574  return [
575  'string 1' => ['1', 1],
576  'string 2' => ['2', 2],
577  'string 02' => ['02', 2],
578  'integer 02' => [2, 2],
579  'string 3' => ['3', 3],
580  'string 4' => ['4', 4],
581  'string 5' => ['5', 5],
582  'integer 5' => [5, 5],
583  'string 6' => ['6', 6],
584  'string 7' => ['7', 7],
585  'string 0' => ['0', 7],
586  'integer 0' => [0, 7],
587  'mon' => ['mon', 1],
588  'monday' => ['monday', 1],
589  'tue' => ['tue', 2],
590  'tuesday' => ['tuesday', 2],
591  'WED' => ['WED', 3],
592  'WEDnesday' => ['WEDnesday', 3],
593  'tHu' => ['tHu', 4],
594  'Thursday' => ['Thursday', 4],
595  'fri' => ['fri', 5],
596  'friday' => ['friday', 5],
597  'sat' => ['sat', 6],
598  'saturday' => ['saturday', 6],
599  'sun' => ['sun', 7],
600  'sunday' => ['sunday', 7]
601  ];
602  }
603 
610  public function ‪normalizeWeekdayConvertsName($weekday, $expectedInteger): void
611  {
613  self::assertEquals($expectedInteger, $result);
614  }
615 
622  public function ‪normalizeWeekdayReturnsInteger($weekday, $expectedInteger): void
623  {
625  self::assertIsInt($result);
626  }
627 
631  public static function ‪invalidWeekdayDataProvider(): array
632  {
633  return [
634  '-fri' => ['-fri'],
635  'fri-' => ['fri-'],
636  '-friday-' => ['-friday-'],
637  '/fri' => ['/fri'],
638  'fri/' => ['fri/'],
639  '/friday/' => ['/friday/'],
640  ',fri' => [',fri'],
641  ',friday,' => [',friday,'],
642  'string minus 1' => ['-1'],
643  'integer -1' => [-1],
644  'string seven' => ['seven'],
645  'string 8' => ['8'],
646  'string 29' => ['29'],
647  'string 2010' => ['2010'],
648  'Jan' => ['Jan'],
649  'January' => ['January'],
650  'MARCH' => ['MARCH']
651  ];
652  }
653 
660  {
661  $this->expectException(\InvalidArgumentException::class);
662  $this->expectExceptionCode(1291163589);
663 
665  }
666 }
‪TYPO3\CMS\Scheduler\CronCommand\NormalizeCommand\normalize
‪static string normalize($cronCommand)
Definition: NormalizeCommand.php:40
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\validStepsDataProvider
‪static array validStepsDataProvider()
Definition: NormalizeCommandTest.php:393
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\reduceListOfValuesByStepValueReturnsCorrectListOfValues
‪reduceListOfValuesByStepValueReturnsCorrectListOfValues($stepExpression, $expected)
Definition: NormalizeCommandTest.php:409
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeWeekdayThrowsExceptionForInvalidWeekdayRepresentation
‪normalizeWeekdayThrowsExceptionForInvalidWeekdayRepresentation($weekday)
Definition: NormalizeCommandTest.php:659
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\validRangeDataProvider
‪static array validRangeDataProvider()
Definition: NormalizeCommandTest.php:334
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy
Definition: NormalizeCommandAccessibleProxy.php:24
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\normalizeMonthAndWeekdayField
‪static normalizeMonthAndWeekdayField($expression, $isMonthField=true)
Definition: NormalizeCommandAccessibleProxy.php:35
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeWeekdayReturnsInteger
‪normalizeWeekdayReturnsInteger($weekday, $expectedInteger)
Definition: NormalizeCommandTest.php:622
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest
Definition: NormalizeCommandTest.php:28
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\convertKeywordsToCronCommandConvertsValidKeywords
‪convertKeywordsToCronCommandConvertsValidKeywords($keyword, $expectedCronCommand)
Definition: NormalizeCommandTest.php:98
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\normalizeFields
‪static normalizeFields($cronCommand)
Definition: NormalizeCommandAccessibleProxy.php:30
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\invalidStepsDataProvider
‪static array invalidStepsDataProvider()
Definition: NormalizeCommandTest.php:418
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeValidDataProvider
‪static array normalizeValidDataProvider()
Definition: NormalizeCommandTest.php:32
‪TYPO3\CMS\Scheduler\CronCommand\NormalizeCommand
Definition: NormalizeCommand.php:28
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeWeekdayConvertsName
‪normalizeWeekdayConvertsName($weekday, $expectedInteger)
Definition: NormalizeCommandTest.php:610
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayFieldInvalidDataProvider
‪static array normalizeMonthAndWeekdayFieldInvalidDataProvider()
Definition: NormalizeCommandTest.php:187
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\convertRangeToListOfValues
‪static convertRangeToListOfValues($range)
Definition: NormalizeCommandAccessibleProxy.php:50
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthReturnsInteger
‪normalizeMonthReturnsInteger($monthName, $expectedInteger)
Definition: NormalizeCommandTest.php:519
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\convertRangeToListOfValuesThrowsExceptionForInvalidRanges
‪convertRangeToListOfValuesThrowsExceptionForInvalidRanges($range, $expectedExceptionCode)
Definition: NormalizeCommandTest.php:383
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\reduceListOfValuesByStepValue
‪static reduceListOfValuesByStepValue($stepExpression)
Definition: NormalizeCommandAccessibleProxy.php:55
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayNormalizesAWeekday
‪normalizeMonthAndWeekdayNormalizesAWeekday()
Definition: NormalizeCommandTest.php:461
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\validMonthNamesDataProvider
‪static array validMonthNamesDataProvider()
Definition: NormalizeCommandTest.php:479
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeIntegerFieldValidDataProvider
‪static array normalizeIntegerFieldValidDataProvider()
Definition: NormalizeCommandTest.php:219
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeIntegerFieldInvalidDataProvider
‪static array normalizeIntegerFieldInvalidDataProvider()
Definition: NormalizeCommandTest.php:253
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\invalidMonthNamesDataProvider
‪static array invalidMonthNamesDataProvider()
Definition: NormalizeCommandTest.php:528
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeConvertsCronCommand
‪normalizeConvertsCronCommand($expression, $expected)
Definition: NormalizeCommandTest.php:70
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayNormalizesAMonth
‪normalizeMonthAndWeekdayNormalizesAMonth()
Definition: NormalizeCommandTest.php:452
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\reduceListOfValuesByStepValueThrowsExceptionForInvalidStepExpressions
‪reduceListOfValuesByStepValueThrowsExceptionForInvalidStepExpressions( $stepExpression, $expectedExceptionCode)
Definition: NormalizeCommandTest.php:439
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\normalizeIntegerField
‪static normalizeIntegerField($expression, $lowerBound=0, $upperBound=59)
Definition: NormalizeCommandAccessibleProxy.php:40
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\splitFieldsReturnsIntegerArrayWithFieldsSplitByWhitespace
‪splitFieldsReturnsIntegerArrayWithFieldsSplitByWhitespace()
Definition: NormalizeCommandTest.php:292
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\invalidRangeDataProvider
‪static array invalidRangeDataProvider()
Definition: NormalizeCommandTest.php:361
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthThrowsExceptionForInvalidMonthRepresentation
‪normalizeMonthThrowsExceptionForInvalidMonthRepresentation( $invalidMonthName, $expectedExceptionCode)
Definition: NormalizeCommandTest.php:559
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthConvertsName
‪normalizeMonthConvertsName($monthName, $expectedInteger)
Definition: NormalizeCommandTest.php:507
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeIntegerFieldThrowsExceptionForInvalidExpressions
‪normalizeIntegerFieldThrowsExceptionForInvalidExpressions( $expression, $lowerBound, $upperBound, $expectedExceptionCode)
Definition: NormalizeCommandTest.php:277
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayFieldValidDataProvider
‪static array normalizeMonthAndWeekdayFieldValidDataProvider()
Definition: NormalizeCommandTest.php:143
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeFieldsValidDataProvider
‪array normalizeFieldsValidDataProvider()
Definition: NormalizeCommandTest.php:117
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeFieldsConvertsField
‪normalizeFieldsConvertsField($expression, $expected)
Definition: NormalizeCommandTest.php:134
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\invalidWeekdayDataProvider
‪static array invalidWeekdayDataProvider()
Definition: NormalizeCommandTest.php:631
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\validWeekdayDataProvider
‪static array validWeekdayDataProvider()
Definition: NormalizeCommandTest.php:572
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\normalizeMonthAndWeekday
‪static normalizeMonthAndWeekday($expression, $isMonth=true)
Definition: NormalizeCommandAccessibleProxy.php:60
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\normalizeMonth
‪static normalizeMonth($month)
Definition: NormalizeCommandAccessibleProxy.php:65
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\convertKeywordsToCronCommand
‪static convertKeywordsToCronCommand($cronCommand)
Definition: NormalizeCommandAccessibleProxy.php:25
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeIntegerFieldReturnsNormalizedListForValidExpression
‪normalizeIntegerFieldReturnsNormalizedListForValidExpression($expression, $expected)
Definition: NormalizeCommandTest.php:244
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\splitFieldsThrowsExceptionIfCronCommandDoesNotContainFiveFields
‪splitFieldsThrowsExceptionIfCronCommandDoesNotContainFiveFields($cronCommand)
Definition: NormalizeCommandTest.php:324
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\validSpecialKeywordsDataProvider
‪static array validSpecialKeywordsDataProvider()
Definition: NormalizeCommandTest.php:79
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\invalidCronCommandFieldsDataProvider
‪static array invalidCronCommandFieldsDataProvider()
Definition: NormalizeCommandTest.php:308
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\convertRangeToListOfValuesReturnsCorrectListForValidRanges
‪convertRangeToListOfValuesReturnsCorrectListForValidRanges($range, $expected)
Definition: NormalizeCommandTest.php:352
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\splitFields
‪static splitFields($cronCommand)
Definition: NormalizeCommandAccessibleProxy.php:45
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayFieldThrowsExceptionForInvalidExpression
‪normalizeMonthAndWeekdayFieldThrowsExceptionForInvalidExpression( $expression, $isMonthField, $expectedExceptionCode)
Definition: NormalizeCommandTest.php:206
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\convertKeywordsToCronCommandReturnsUnchangedCommandIfKeywordWasNotFound
‪convertKeywordsToCronCommandReturnsUnchangedCommandIfKeywordWasNotFound()
Definition: NormalizeCommandTest.php:107
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayFieldReturnsNormalizedListForValidExpression
‪normalizeMonthAndWeekdayFieldReturnsNormalizedListForValidExpression( $expression, $isMonthField, $expected)
Definition: NormalizeCommandTest.php:175
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\AccessibleProxies\NormalizeCommandAccessibleProxy\normalizeWeekday
‪static normalizeWeekday($weekday)
Definition: NormalizeCommandAccessibleProxy.php:70
‪TYPO3\CMS\Scheduler\Tests\Unit\CronCommand\NormalizeCommandTest\normalizeMonthAndWeekdayLeavesValueUnchanged
‪normalizeMonthAndWeekdayLeavesValueUnchanged()
Definition: NormalizeCommandTest.php:470