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 (#41)
by Simone
03:26
created

FilteringObjectTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 62
rs 10
c 0
b 0
f 0
wmc 5
1
<?php
2
3
namespace Mado\QueryBundle\Tests\Objects;
4
5
use Mado\QueryBundle\Objects\FilteringObject;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * @coversDefaultClass \Mado\QueryBundle\Objects\FilteringObject
10
 */
11
class FilteringObjectTest extends TestCase
12
{
13
    /**
14
     * @covers ::__construct
15
     * @covers ::fromFilter
16
     * @covers ::hasOperator
17
     */
18
    public function testContainsOperatorInSecondPartOfFilter()
19
    {
20
        $fo = FilteringObject::fromFilter('foo|op');
21
22
        $this->assertSame(true, $fo->hasOperator());
23
    }
24
25
    /**
26
     * @covers ::__construct
27
     * @covers ::fromFilter
28
     * @covers ::hasOperator
29
     */
30
    public function testHasNoOperatorIfFilterDoesNotContainThePipe()
31
    {
32
        $fo = FilteringObject::fromFilter('foo');
33
34
        $this->assertSame(false, $fo->hasOperator());
35
    }
36
37
    /**
38
     * @covers ::__construct
39
     * @covers ::fromFilter
40
     * @covers ::getOperatorSign
41
     * @covers ::getOperator
42
     */
43
    public function testProvideOperatorsSign()
44
    {
45
        $fo = FilteringObject::fromFilter('foo');
46
47
        $this->assertSame('=', $fo->getOperatorSign());
48
    }
49
50
    /**
51
     * @covers ::__construct
52
     * @covers ::fromFilter
53
     * @covers ::getOperatorSign
54
     * @covers ::getOperator
55
     */
56
    public function testProvideOperators()
57
    {
58
        $fo = FilteringObject::fromFilter('foo|eq');
59
60
        $this->assertSame('eq', $fo->getOperator());
61
    }
62
63
    /**
64
     * @covers ::__construct
65
     * @covers ::fromFilter
66
     * @covers ::getFieldName
67
     */
68
    public function testProvideFilterName()
69
    {
70
        $fo = FilteringObject::fromFilter('foo');
71
72
        $this->assertSame('foo', $fo->getFieldName());
73
    }
74
}
75