Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function testDateIndexNameWithNonDefaultOptions(): void |
||
34 | { |
||
35 | $processor = new DateIndexNameProcessor('date1', 'M'); |
||
36 | $processor->setTimezone('Europe/Rome'); |
||
37 | $processor->setLocale('ITALIAN'); |
||
38 | $processor->setIndexNamePrefix('myindex-'); |
||
39 | $processor->setDateFormats(['dd/MM/yyyy hh:mm:ss', 'ISO8601', 'UNIX', 'UNIX_MS']); |
||
40 | |||
41 | $expected = [ |
||
42 | 'date_index_name' => [ |
||
43 | 'field' => 'date1', |
||
44 | 'date_rounding' => 'M', |
||
45 | 'timezone' => 'Europe/Rome', |
||
46 | 'locale' => 'ITALIAN', |
||
47 | 'date_formats' => ['dd/MM/yyyy hh:mm:ss', 'ISO8601', 'UNIX', 'UNIX_MS'], |
||
48 | 'index_name_prefix' => 'myindex-', |
||
49 | ], |
||
50 | ]; |
||
51 | |||
52 | $this->assertEquals($expected, $processor->toArray()); |
||
53 | } |
||
54 | } |
||
55 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.