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

HelloWorldTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_it_prints_hello_world() 0 7 1
A test_it_shows_hello_world_version() 0 5 1
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