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

CallDefinitionTest::shouldStoreRoutineName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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