Failed Conditions
Push — master ( 481507...cfb9d3 )
by
unknown
12:41
created

TransactionTest::testBookableRelation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 13
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApplicationTest\Model;
6
7
use Application\Model\Bookable;
8
use Application\Model\Transaction;
9
use PHPUnit\Framework\TestCase;
10
11
class TransactionTest extends TestCase
12
{
13
    public function testBookableRelation(): void
14
    {
15
        $bookable = new Bookable();
16
17
        $transaction = new Transaction();
18
19
        $transaction->setBookable($bookable);
20
21
        self::assertCount(1, $bookable->getTransactions());
22
23
        $transaction->setBookable(null);
24
25
        self::assertCount(0, $bookable->getTransactions());
26
    }
27
}
28