Passed
Push — master ( b40bc2...29ef41 )
by Mr
07:40
created

PaymentServiceMapTest::testConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/money-interop 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\PaymentServiceInterface;
12
use Daikon\Money\Service\PaymentServiceMap;
13
use PHPUnit\Framework\TestCase;
14
15
final class PaymentServiceMapTest extends TestCase
16
{
17 1
    public function testConstruct(): void
18
    {
19 1
        $service = $this->createMock(PaymentServiceInterface::class);
20 1
        $unwrappedMap = (new PaymentServiceMap(['a' => $service]))->unwrap();
21 1
        $this->assertNotSame($service, $unwrappedMap['a']);
22 1
        $this->assertEquals($service, $unwrappedMap['a']);
23 1
    }
24
}
25