CommitSequenceTest::testMakeEmpty()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/event-sourcing 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\EventStore\Commit;
10
11
use Daikon\EventSourcing\EventStore\Commit\CommitSequence;
12
use Daikon\EventSourcing\EventStore\Stream\Sequence;
13
use PHPUnit\Framework\TestCase;
14
15
final class CommitSequenceTest extends TestCase
16
{
17 1
    public function testMakeEmpty(): void
18
    {
19 1
        $commitSequence = CommitSequence::makeEmpty();
20 1
        $this->assertEquals([], $commitSequence->toNative());
21 1
    }
22
23 1
    public function testHas(): void
24
    {
25 1
        $sequence = Sequence::fromNative(2);
26 1
        $commitSequence = CommitSequence::makeEmpty();
27 1
        $this->assertFalse($commitSequence->has($sequence));
28 1
    }
29
}
30