Skip to content

Commit

Permalink
Add test case for one cpu core again.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Apr 18, 2020
1 parent c5686f3 commit f0e4db1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/lib/DefaultOsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public function testGetCPUName(): void {
$this->assertEquals('Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (4 cores)', $this->os->getCPUName());
}

public function testGetCPUNameOneCore(): void {
$this->os->method('readContent')
->with('/proc/cpuinfo')
->willReturn(file_get_contents(__DIR__ . '/../data/cpuinfo_one_core'));

$this->assertEquals('Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (1 core)', $this->os->getCPUName());
}

public function testGetCPUNameNoData(): void {
$this->os->method('readContent')
->with('/proc/cpuinfo')
Expand Down

0 comments on commit f0e4db1

Please sign in to comment.