Passed
Push — master ( c6d69a...dbe157 )
by Mr
02:16
created

MoneyServiceMapTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstruct() 0 6 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/value-object project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
 namespace Daikon\Tests\Money\Service;
10
11
use Daikon\Money\Service\MoneyServiceInterface;
12
use Daikon\Money\Service\MoneyServiceMap;
13
use PHPUnit\Framework\TestCase;
14
15
final class MoneyServiceMapTest extends TestCase
16
{
17 1
    public function testConstruct(): void
18
    {
19 1
        $service = $this->createMock(MoneyServiceInterface::class);
20 1
        $unwrappedMap = (new MoneyServiceMap(['a' => $service]))->unwrap();
21 1
        $this->assertNotSame($service, $unwrappedMap['a']);
22 1
        $this->assertEquals($service, $unwrappedMap['a']);
23 1
    }
24
}
25