| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function dpParseValueByContent() |
||
| 12 | { |
||
| 13 | $dateTime = \date_create_immutable_from_format('* Y-m-d H:i:s e', time()); |
||
| 14 | |||
| 15 | $testCases = [ |
||
| 16 | [['test', 'yes'], true], |
||
| 17 | [['test', 'no'], false], |
||
| 18 | [['test', '0'], 0], |
||
| 19 | [['test', 'test'], 'test'], |
||
| 20 | [['test', '0123'], '0123'], |
||
| 21 | [['test', '1234'], 1234], |
||
| 22 | [['test', '18446744073709551615'], '18446744073709551615'], |
||
| 23 | [['Timestamp', (string)$dateTime], $dateTime], |
||
| 24 | [['Environment', 'FOO=bar BAZ=foo'], ['FOO' => 'bar', 'BAZ' => 'foo']], |
||
| 25 | ]; |
||
| 26 | |||
| 27 | // To cover codecoverage |
||
| 28 | foreach (Parser::getArrayTypes() as $arrayType) { |
||
| 29 | $testCases[] = [[$arrayType, 'test1 test2'], ['test1', 'test2']]; |
||
| 30 | } |
||
| 31 | |||
| 32 | return $testCases; |
||
| 33 | } |
||
| 34 | |||
| 45 |