Passed
Push — master ( c92ce9...2387c7 )
by Gerrit
02:07
created

LiteralArgumentTest::shouldResolveNullLiteral()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Copyright (C) 2017  Gerrit Addiks.
4
 * This package (including this file) was released under the terms of the GPL-3.0.
5
 * You should have received a copy of the GNU General Public License along with this program.
6
 * If not, see <http://www.gnu.org/licenses/> or send me a mail so i can send you a copy.
7
 * @license GPL-3.0
8
 * @author Gerrit Addiks <[email protected]>
9
 */
10
11
namespace Addiks\SymfonyGenerics\Tests\Unit\Arguments;
12
13
use PHPUnit\Framework\TestCase;
14
use Addiks\SymfonyGenerics\Arguments\LiteralArgument;
15
16
final class LiteralArgumentTest extends TestCase
17
{
18
19
    /**
20
     * @test
21
     */
22
    public function shouldResolveLiteral()
23
    {
24
        $argument = new LiteralArgument("some-literal");
25
        $this->assertEquals("some-literal", $argument->resolve());
26
    }
27
28
    /**
29
     * @test
30
     */
31
    public function shouldResolveTrueLiteral()
32
    {
33
        $argument = new LiteralArgument("true");
34
        $this->assertEquals(true, $argument->resolve());
35
    }
36
37
    /**
38
     * @test
39
     */
40
    public function shouldResolveFalseLiteral()
41
    {
42
        $argument = new LiteralArgument("false");
43
        $this->assertEquals(false, $argument->resolve());
44
    }
45
46
    /**
47
     * @test
48
     */
49
    public function shouldResolveNullLiteral()
50
    {
51
        $argument = new LiteralArgument("null");
52
        $this->assertEquals(null, $argument->resolve());
53
    }
54
55
}
56