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 ( a5b504...99f733 )
by Dejan
02:54
created

UnixTest::userAgentOsDataProvider()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 28
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
namespace Fam\Util\UserAgentParser;
3
4
use PHPUnit\Framework\TestCase;
5
6
class UnixTest extends TestCase
7
{
8
    /**
9
     *
10
     * @var Unix
11
     */
12
    private $subject;
13
14
    protected function setUp()
15
    {
16
        parent::setUp();
17
18
        $this->subject = new Unix();
19
    }
20
21
    /**
22
     * @test
23
     * @dataProvider userAgentOsDataProvider
24
     */
25
    public function match_WithValidValue($userAgent)
0 ignored issues
show
Coding Style introduced by
Method name "UnixTest::match_WithValidValue" is not in camel caps format
Loading history...
26
    {
27
        $this->assertTrue($this->subject->match($userAgent));
28
    }
29
30
    /**
31
     * @test
32
     */
33
    public function match_WithInvalidValue()
0 ignored issues
show
Coding Style introduced by
Method name "UnixTest::match_WithInvalidValue" is not in camel caps format
Loading history...
34
    {
35
        $this->assertFalse($this->subject->match("Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c"));
36
    }
37
38
    /**
39
     * @test
40
     */
41
    public function getName_returnsUnix()
0 ignored issues
show
Coding Style introduced by
Method name "UnixTest::getName_returnsUnix" is not in camel caps format
Loading history...
42
    {
43
        $this->assertEquals("unix", $this->subject->getName());
44
    }
45
46
    public function userAgentOsDataProvider()
47
    {
48
        return [
49
            [
50
                "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.2) (KHTML, like Gecko)",
51
            ],
52
53
            [
54
                "Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD 2.6) (KHTML, like Gecko)",
55
            ],
56
57
            [
58
                "Mozilla/5.0 (compatible; Konqueror/3.2; NetBSD 2.6) (KHTML, like Gecko)",
59
            ],
60
61
            [
62
                "Mozilla/5.0 (compatible; Konqueror/3.2; IRIX 2.6) (KHTML, like Gecko)",
63
            ],
64
65
            [
66
                "Mozilla/5.0 (compatible; Konqueror/3.2; SunOS 2.6) (KHTML, like Gecko)",
67
            ],
68
69
            [
70
                "Mozilla/5.0 (compatible; Konqueror/3.2; Unix 2.6) (KHTML, like Gecko)",
71
            ],
72
        ];
73
    }
74
}
75