Completed
Push — master ( 203e38...2cdd54 )
by Gerrit
13:04
created

CallDefinitionTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 48
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 11 1
A shouldStoreObjectReference() 0 4 1
A shouldStoreRoutineName() 0 4 1
A shouldStoreArgumentMapping() 0 7 1
1
<?php
2
/**
3
 * Copyright (C) 2017  Gerrit Addiks.
4
 * This package (including this file) was released under the terms of the GPL-3.0.
5
 * You should have received a copy of the GNU General Public License along with this program.
6
 * If not, see <http://www.gnu.org/licenses/> or send me a mail so i can send you a copy.
7
 * @license GPL-3.0
8
 * @author Gerrit Addiks <[email protected]>
9
 */
10
11
namespace Addiks\RDMBundle\Tests\Mapping;
12
13
use PHPUnit\Framework\TestCase;
14
use Addiks\RDMBundle\Mapping\CallDefinition;
15
use Addiks\RDMBundle\Mapping\MappingInterface;
16
17
final class CallDefinitionTest extends TestCase
18
{
19
20
    /**
21
     * @var CallDefinition
22
     */
23
    private $callDefinition;
24
25
    public function setUp()
26
    {
27
        $this->callDefinition = new CallDefinition(
28
            "someRoutineName",
29
            "someObjectReference",
30
            [
31
                $this->createMock(MappingInterface::class),
32
                $this->createMock(MappingInterface::class),
33
            ]
34
        );
35
    }
36
37
    /**
38
     * @test
39
     */
40
    public function shouldStoreObjectReference()
41
    {
42
        $this->assertEquals("someObjectReference", $this->callDefinition->getObjectReference());
43
    }
44
45
    /**
46
     * @test
47
     */
48
    public function shouldStoreRoutineName()
49
    {
50
        $this->assertEquals("someRoutineName", $this->callDefinition->getRoutineName());
51
    }
52
53
    /**
54
     * @test
55
     */
56
    public function shouldStoreArgumentMapping()
57
    {
58
        $this->assertEquals([
59
            $this->createMock(MappingInterface::class),
60
            $this->createMock(MappingInterface::class),
61
        ], $this->callDefinition->getArgumentMappings());
62
    }
63
64
}
65