NonDiscardingBinaryCodecTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testChecksThatRequiredValuesArePassed() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bip70\Test\Protobuf\Codec;
6
7
use Bip70\Protobuf\Codec\NonDiscardingBinaryCodec;
8
use Bip70\Protobuf\Proto\PaymentDetails;
9
use PHPUnit\Framework\TestCase;
10
11
class NonDiscardingBinaryCodecTest extends TestCase
12
{
13
    public function testChecksThatRequiredValuesArePassed()
14
    {
15
        $details = new PaymentDetails();
16
17
        $this->expectExceptionMessage("Message " . PaymentDetails::class . "'s field tag 3(time) is required but has no value");
18
19
        $details->serialize(new NonDiscardingBinaryCodec());
20
    }
21
}
22