Completed
Push — master ( 4e5ef4...37558b )
by De Cramer
02:05
created

ConstantTest::getRule()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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