StdinTest::testGetArgs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * PHP SAPI Library
4
 * Copyright (C) 2020 Christian Neff
5
 *
6
 * Permission to use, copy, modify, and/or distribute this software for
7
 * any purpose with or without fee is hereby granted, provided that the
8
 * above copyright notice and this permission notice appear in all copies.
9
 */
10
11
namespace Secondtruth\SAPI\Tests\Input;
12
13
use Secondtruth\SAPI\Input\Stdin;
14
use PHPUnit\Framework\TestCase;
15
16
class StdinTest extends TestCase
17
{
18
    public function testGetArgs()
19
    {
20
        $input = new Stdin(['foo', 'bar', '--baz']);
21
22
        $this->assertEquals(['foo', 'bar', '--baz'], $input->getArgs());
23
    }
24
25
    public function testGetArgsCount()
26
    {
27
        $input = new Stdin(['foo', 'bar', '--baz']);
28
29
        $this->assertEquals(3, $input->getArgsCount());
30
    }
31
}
32