ProcessorCounterTest::testToString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4286
cc 1
eloc 5
nc 1
nop 0
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