Completed
Push — master ( 4e5ef4...37558b )
by De Cramer
02:05
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
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
    public function testConstants()
18
    {
19
        $this->assertRuleResults(['test' => 'toto 1'], [], ['value' => 'test'], 'test');
20
        $this->assertRuleResults(['test' => 'toto 1'], [], ['value' => ['1' => ['toto']]], ['1' => ['toto']]);
21
    }
22
23
    protected function getRule()
24
    {
25
        return new Constant(new NullLogger());
26
    }
27
}
28