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
Branch master (bd52da)
by Andrey
04:54 queued 01:45
created

HandlerPropertiesFromArrayTraitTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 29
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testHandleFromArray() 0 8 1
A provideArrayCommand() 0 8 1
1
<?php
2
3
/**
4
 * (c) itmedia.by <[email protected]>
5
 */
6
7
namespace Itmedia\CommandBusBundle\Tests\Command;
8
9
use Itmedia\CommandBusBundle\Tests\Stub\TestCommand;
10
use PHPUnit\Framework\TestCase;
11
use Symfony\Component\Validator\Constraints\NotBlank;
12
13
class HandlerPropertiesFromArrayTraitTest extends TestCase
14
{
15
16
17
    /**
18
     * @param $data
19
     * @param $email
20
     * @param $username
21
     *
22
     * @dataProvider provideArrayCommand
23
     */
24
    public function testHandleFromArray($data, $username, $email)
25
    {
26
        $command = new TestCommand();
27
        $command->handleFromArray($data);
28
29
        $this->assertEquals($command->getEmail(), $email);
30
        $this->assertEquals($command->getUsername(), $username);
31
    }
32
33
    public function provideArrayCommand()
34
    {
35
        return [
36
            [['username' => 'User', 'email' => '[email protected]'], 'User', '[email protected]'],
37
            [['username' => 'User', 'email' => '[email protected]', 'other_key' => 1], 'User', '[email protected]'],
38
            [['email' => '[email protected]'], null, '[email protected]'],
39
        ];
40
    }
41
}
42