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

TransactionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testBookableRelation() 0 13 1
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