testChecksThatRequiredValuesArePassed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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