Completed
Push — master ( 610136...82575c )
by De Cramer
06:15 queued 03:00
created

ConstantTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRule() 0 3 1
A testConstants() 0 4 1
1
<?php
2
/**
3
 * File ConstantTest.php
4
 *
5
 * @author    de Cramer Oliver<[email protected]>
6
 * @copyright 2018 Smile
7
 */
8
9
namespace Oliverde8\Component\RuleEngine\Tests\Rules;
10
11
use Oliverde8\Component\RuleEngine\Rules\Constant;
12
use Psr\Log\NullLogger;
13
14
class ConstantTest extends AbstractRule
15
{
16
17 1
    public function testConstants()
18
    {
19 1
        $this->assertRuleResults(['test' => 'toto 1'], [], ['value' => 'test'], 'test');
20 1
        $this->assertRuleResults(['test' => 'toto 1'], [], ['value' => ['1' => ['toto']]], ['1' => ['toto']]);
21 1
    }
22
23 2
    protected function getRule()
24
    {
25 2
        return new Constant(new NullLogger());
26
    }
27
}
28