ProcessorCounterTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetCpuCount() 0 8 1
A testToString() 0 8 1
1
<?php
2
/**
3
 * File ProcessorCounterTest.php
4
 *
5
 * @author Edward Pfremmer <[email protected]>
6
 */
7
namespace Epfremme\ProcessQueue\Tests\System;
8
9
use Epfremme\ProcessQueue\System\ProcessorCounter;
10
11
/**
12
 * Class ProcessorCounterTest
13
 *
14
 * @package Epfremme\ProcessQueue\Tests\System
15
 */
16
class ProcessorCounterTest extends \PHPUnit_Framework_TestCase
17
{
18
    public function testGetCpuCount()
19
    {
20
        $processorCounter = new ProcessorCounter();
21
        $processorCount = $processorCounter->getCpuCount();
22
23
        $this->assertInternalType('integer', $processorCount);
24
        $this->assertGreaterThan(0, $processorCount);
25
    }
26
27
    public function testToString()
28
    {
29
        $processorCounter = new ProcessorCounter();
30
        $processorCount = (string) $processorCounter;
31
32
        $this->assertInternalType('string', $processorCount);
33
        $this->assertGreaterThan(0, $processorCount);
34
    }
35
}
36