GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 5892ba...e25f6a )
by Baptiste
03:37 queued 29s
created

OSXTest   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 1
Metric Value
eloc 14
c 4
b 0
f 1
dl 0
loc 46
rs 10
wmc 9

7 Methods

Rating   Name   Duplication   Size   Complexity  
A testInterface() 0 3 1
A testMemory() 0 7 2
A testProcesses() 0 3 1
A testDisk() 0 3 1
A testLoadAverage() 0 3 1
A testTmp() 0 6 1
A testCpu() 0 7 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Tests\Innmind\Server\Status\Servers;
5
6
use Innmind\Server\Status\{
7
    Servers\OSX,
8
    Server,
9
    Server\Cpu,
10
    Server\Memory,
11
    Server\LoadAverage,
12
    Server\Processes,
13
    Server\Disk
14
};
15
use Innmind\TimeContinuum\Earth\Clock;
16
use Innmind\Url\Path;
17
use PHPUnit\Framework\TestCase;
18
19
class OSXTest extends TestCase
20
{
21
    public function testInterface()
22
    {
23
        $this->assertInstanceOf(Server::class, new OSX(new Clock));
24
    }
25
26
    public function testCpu()
27
    {
28
        if (PHP_OS !== 'Darwin') {
29
            return;
30
        }
31
32
        $this->assertInstanceOf(Cpu::class, (new OSX(new Clock))->cpu());
33
    }
34
35
    public function testMemory()
36
    {
37
        if (PHP_OS !== 'Darwin') {
38
            return;
39
        }
40
41
        $this->assertInstanceOf(Memory::class, (new OSX(new Clock))->memory());
42
    }
43
44
    public function testProcesses()
45
    {
46
        $this->assertInstanceOf(Processes::class, (new OSX(new Clock))->processes());
47
    }
48
49
    public function testLoadAverage()
50
    {
51
        $this->assertInstanceOf(LoadAverage::class, (new OSX(new Clock))->loadAverage());
52
    }
53
54
    public function testDisk()
55
    {
56
        $this->assertInstanceOf(Disk::class, (new OSX(new Clock))->disk());
57
    }
58
59
    public function testTmp()
60
    {
61
        $server = new OSX(new Clock);
62
63
        $this->assertInstanceOf(Path::class, $server->tmp());
64
        $this->assertSame(\sys_get_temp_dir(), $server->tmp()->toString());
65
    }
66
}
67