Passed
Pull Request — master (#420)
by
unknown
09:02 queued 06:37
created

RuleWithOptionsTestTrait::beforeTestOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Tests\Rule\Base;
6
7
use Yiisoft\Validator\RuleWithOptionsInterface;
8
9
trait RuleWithOptionsTestTrait
10
{
11
    abstract public function dataOptions(): array;
12
13
    /**
14
     * @dataProvider dataOptions
15
     */
16
    public function testOptions(RuleWithOptionsInterface $rule, array $expectedOptions): void
17
    {
18
        $options = $rule->getOptions();
19
        $this->assertSame($expectedOptions, $options);
0 ignored issues
show
Bug introduced by
It seems like assertSame() 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

19
        $this->/** @scrutinizer ignore-call */ 
20
               assertSame($expectedOptions, $options);
Loading history...
20
    }
21
}
22