Completed
Push — master ( fef923...c0df34 )
by Rafael
03:03
created

BooleanParserTest::getParseValueMap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
rs 9.4285
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
/**
4
 * LICENSE: This file is subject to the terms and conditions defined in
5
 * file 'LICENSE', which is part of this source code package.
6
 *
7
 * @copyright 2016 Copyright(c) - All rights reserved.
8
 */
9
10
namespace Rafrsr\LibArray2Object\Tests\Parser;
11
12
use Rafrsr\LibArray2Object\Parser\BooleanParser;
13
14
class BooleanParserTest extends ParserTester
15
{
16
    public function buildParser()
17
    {
18
        return new BooleanParser();
19
    }
20
21
    public function getTypes()
22
    {
23
        return ['boolean', 'bool'];
24
    }
25
26
    public function getParseValueMap()
27
    {
28
        return [
29
            'yes' => true,
30
            'YES' => true,
31
            'ok' => true,
32
            'true' => true,
33
            'some_string' => true,
34
            1 => true,
35
            -1 => true,
36
            'no' => false,
37
            'false' => false,
38
            'FALSE' => false,
39
            0 => false,
40
        ];
41
    }
42
}
43