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

WindowsTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 60
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A match_WithValidValue() 0 4 1
A match_WithInvalidValue() 0 4 1
A getName_returnsWindows() 0 4 1
A userAgentOsDataProvider() 0 20 1
1
<?php
2
namespace Fam\Util\UserAgentParser;
3
4
use PHPUnit\Framework\TestCase;
5
6
class WindowsTest extends TestCase
7
{
8
    /**
9
     * @var Windows
10
     */
11
    private $subject;
12
13
    protected function setUp()
14
    {
15
        parent::setUp();
16
17
        $this->subject = new Windows();
18
    }
19
20
    /**
21
     * @test
22
     * @dataProvider userAgentOsDataProvider
23
     */
24
    public function match_WithValidValue($userAgent)
0 ignored issues
show
Coding Style introduced by
Method name "WindowsTest::match_WithValidValue" is not in camel caps format
Loading history...
25
    {
26
        $this->assertTrue($this->subject->match($userAgent));
27
    }
28
29
    /**
30
     * @test
31
     */
32
    public function match_WithInvalidValue()
0 ignored issues
show
Coding Style introduced by
Method name "WindowsTest::match_WithInvalidValue" is not in camel caps format
Loading history...
33
    {
34
        $this->assertFalse($this->subject->match("Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c"));
35
    }
36
37
    /**
38
     * @test
39
     */
40
    public function getName_returnsWindows()
0 ignored issues
show
Coding Style introduced by
Method name "WindowsTest::getName_returnsWindows" is not in camel caps format
Loading history...
41
    {
42
        $this->assertEquals("windows", $this->subject->getName());
43
    }
44
45
    public function userAgentOsDataProvider()
46
    {
47
        return [
48
            [
49
                "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)",
50
            ],
51
52
            [
53
                "Mozilla/4.0 (compatible; MSIE 6.0; win98 5.0)",
54
            ],
55
56
            [
57
                "Mozilla/4.0 (compatible; MSIE 6.0; win95 5.0)",
58
            ],
59
60
            [
61
                "Mozilla/4.0 (compatible; MSIE 6.0; win 9x 5.0)",
62
            ],
63
        ];
64
    }
65
}
66