Completed
Push — master ( dd8846...82fafa )
by Amine
03:04
created

HelloWorldTest::test_it_prints_hello_world()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php namespace Tarsana\Command\Examples\Tests;
2
3
use Tarsana\Command\Examples\HelloWorld;
4
use Tarsana\Tester\CommandTestCase;
5
6
7
class HelloWorldTest extends CommandTestCase {
8
9
    public function test_it_prints_hello_world()
10
    {
11
        $this->withStdin("Amine\n")
12
             ->command(new HelloWorld)
13
             ->prints("Your name:")
14
             ->prints("Hello Amine<br>");
15
    }
16
17
    public function test_it_shows_hello_world_version()
18
    {
19
        $this->command(new HelloWorld, ['--version'])
20
             ->printsExactly("<info>Hello World</info> version <info>1.0.0-alpha</info><br>");
21
    }
22
23
}
24