LocaleTest::test_getOption()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Locale\Tests;
4
5
use Nip\Locale\Locale;
6
7
/**
8
 * Class LocaleTest
9
 * @package Nip\Locale\Tests
10
 */
11
class LocaleTest extends AbstractTest
12
{
13
    public function test_getOption()
14
    {
15
        $locale = new Locale();
16
        static::assertSame('d/m/Y H:m', $locale->getOption(['time','dateTimeFormat'], 'ro_RO'));
0 ignored issues
show
Bug introduced by
'ro_RO' of type string is incompatible with the type boolean expected by parameter $locale of Nip\Locale\Locale::getOption(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

16
        static::assertSame('d/m/Y H:m', $locale->getOption(['time','dateTimeFormat'], /** @scrutinizer ignore-type */ 'ro_RO'));
Loading history...
17
        static::assertSame('H:m', $locale->getOption(['time','timeFormat'], 'ro_RO'));
18
    }
19
}
20