EchoTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testEcho() 0 12 1
1
<?php
2
3
namespace AsyncPHP\Process\Tests;
4
5
use AsyncPHP\Process\PosixHandler;
6
use PHPUnit_Framework_TestCase;
7
8
class EchoTest extends PHPUnit_Framework_TestCase
9
{
10
    public function testEcho()
11
    {
12
        $echo = new PosixHandler();
13
14
        ob_start();
15
        $echo->start("echo", "whoami");
16
        $name = trim(ob_get_contents());
17
        ob_end_clean();
18
19
        $this->assertEquals(trim(`whoami`), $name);
20
        $this->assertFalse($echo->running("echo"));
21
    }
22
}
23