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

Fam_Util_UserAgentParser_OperaTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 38
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A OperaTest::setUp() 0 6 1
A OperaTest::match_WithValidValue() 0 4 1
A OperaTest::match_WithInvalidValue() 0 4 1
A OperaTest::getName_IsEqualsFirefox() 0 4 1
1
<?php
2
namespace Fam\Util\UserAgentParser;
3
4
use PHPUnit\Framework\TestCase;
5
6
class OperaTest extends TestCase
7
{
8
    /**
9
     * @var Firefox
10
     */
11
    private $subject;
12
13
    protected function setUp()
14
    {
15
        parent::setUp();
16
17
        $this->subject = new \Fam\Util\UserAgentParser\Opera();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Fam\Util\UserAgentParser\Opera() of type object<Fam\Util\UserAgentParser\Opera> is incompatible with the declared type object<Fam\Util\UserAgentParser\Firefox> of property $subject.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
18
    }
19
20
    /**
21
     * @test
22
     */
23
    public function match_WithValidValue()
0 ignored issues
show
Coding Style introduced by
Method name "OperaTest::match_WithValidValue" is not in camel caps format
Loading history...
24
    {
25
        $this->assertTrue($this->subject->match("Opera/9.99 (Windows NT 5.1; U; pl) Presto/9.9.9"));
26
    }
27
28
    /**
29
     * @test
30
     */
31
    public function match_WithInvalidValue()
0 ignored issues
show
Coding Style introduced by
Method name "OperaTest::match_WithInvalidValue" is not in camel caps format
Loading history...
32
    {
33
        $this->assertFalse($this->subject->match("Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c"));
34
    }
35
36
    /**
37
     * @test
38
     */
39
    public function getName_IsEqualsFirefox()
0 ignored issues
show
Coding Style introduced by
Method name "OperaTest::getName_IsEqualsFirefox" is not in camel caps format
Loading history...
40
    {
41
        $this->assertEquals('opera', $this->subject->getName());
42
    }
43
}
44