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
Pull Request — master (#52)
by Simone
03:32
created

SaltTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hp$0 ➔ testIsEqualByDefault() 0 21 1
testIsEqualByDefault() 0 21 ?
A hp$0 ➔ getName() 0 2 1
1
<?php
2
3
use Mado\QueryBundle\Objects\Salt;
4
use PHPUnit\Framework\TestCase;
5
6
/**
7
 * @coversDefaultClass \Mado\QueryBundle\Objects\Salt
8
 */
9
class SaltTest extends TestCase
10
{
11
    /**
12
     * @covers ::__construct
13
     * @covers ::generateSaltForName
14
     * @covers ::getSalt
15
     */
16
    public function testIsEqualByDefault()
17
    {
18
        $this->queryBuilder = $this
19
            ->getMockBuilder('Doctrine\ORM\QueryBuilder')
20
            ->disableOriginalConstructor()
21
            ->getMock();
22
        $this->queryBuilder->expects($this->once())
0 ignored issues
show
Bug Best Practice introduced by
The property queryBuilder does not exist on SaltTest. Did you maybe forget to declare it?
Loading history...
23
            ->method('getParameters')
24
            ->will($this->returnValue([
25
                new class { public function getName() {
26
                    return 'field_foo';
27
                }}
28
            ]));
29
30
        $salt = new Salt($this->queryBuilder);
0 ignored issues
show
Bug introduced by
The property queryBuilder does not seem to exist on SaltTest.
Loading history...
31
32
        $salt->generateSaltForName('foo');
33
34
        $this->assertRegExp(
35
            '/_[0-9]{3}/',
36
            $salt->getSalt()
37
        );
38
    }
39
}
40