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.
Completed
Push — master ( fee33a...ddc175 )
by Jan-Petter
02:52
created

MatchTest::generateDataForTest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 8

Duplication

Lines 15
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 15
loc 15
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
namespace vipnytt\UserAgentParser\Tests;
3
4
use vipnytt\UserAgentParser;
5
6
/**
7
 * Class MatchTest
8
 *
9
 * @package vipnytt\UserAgentParser\Tests
10
 */
11 View Code Duplication
class MatchTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @dataProvider generateDataForTest
15
     * @param string $userAgent
16
     * @param array $array
17
     */
18
    public function testMatch($userAgent, $array)
19
    {
20
        $parser = new UserAgentParser($userAgent);
21
        $this->assertInstanceOf('vipnytt\UserAgentParser', $parser);
22
        $this->assertNotFalse($parser->match($array));
23
    }
24
25
    /**
26
     * Generate test data
27
     * @return array
28
     */
29
    public
30
    function generateDataForTest()
31
    {
32
        return [
33
            [
34
                'googlebot-news/2.1',
35
                [
36
                    'googlebot-news',
37
                    'googlebot-images',
38
                    'googlebot-news/2.0',
39
                    'googlebot',
40
                ]
41
            ]
42
        ];
43
    }
44
}
45