Passed
Pull Request — develop (#19)
by Paulius
02:32
created

TestResultFieldsTrait::testGetFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
namespace Dokobit\Gateway\Tests\Result;
3
4
trait TestResultFieldsTrait
5
{
6
    /**
7
     * @dataProvider expectedFields
8
     */
9
    public function testGetFields($name)
10
    {
11
        $result = $this->method->getFields();
12
13
        $this->assertContains($name, $result);
0 ignored issues
show
Bug introduced by
It seems like assertContains() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        $this->/** @scrutinizer ignore-call */ 
14
               assertContains($name, $result);
Loading history...
14
    }
15
16
    /**
17
     * @dataProvider expectedFields
18
     */
19
    public function testSettersAndGetters($name, $value = 'foo')
20
    {
21
        $this->assertSetterExists($name, $this->method, $value);
0 ignored issues
show
Bug introduced by
It seems like assertSetterExists() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        $this->/** @scrutinizer ignore-call */ 
22
               assertSetterExists($name, $this->method, $value);
Loading history...
22
        $this->assertGetterExists($name, $this->method, $value);
0 ignored issues
show
Bug introduced by
It seems like assertGetterExists() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        $this->/** @scrutinizer ignore-call */ 
23
               assertGetterExists($name, $this->method, $value);
Loading history...
23
    }
24
}
25