LoopTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
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 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testLoop() 0 11 1
1
<?php
2
3
namespace AsyncPHP\Process\Tests;
4
5
use AsyncPHP\Process\PosixHandler;
6
use PHPUnit_Framework_TestCase;
7
8
class LoopTest extends PHPUnit_Framework_TestCase
9
{
10
    public function testLoop()
11
    {
12
        $loop = new PosixHandler();
13
        $loop->start("loop", "php -r 'while (true) { sleep(1); }'", true);
14
15
        $this->assertTrue($loop->running("loop"));
16
17
        $loop->stop("loop");
18
19
        $this->assertFalse($loop->running("loop"));
20
    }
21
}
22