Completed
Push — master ( f019ba...e16295 )
by Joachim
03:16
created

WebhookExchangeTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGettersSetters() 0 20 1
1
<?php
2
3
namespace Loevgaard\DandomainAltapayBundle\Tests\Entity;
4
5
use Loevgaard\DandomainAltapayBundle\Entity\WebhookExchange;
6
use PHPUnit\Framework\TestCase;
7
8
class WebhookExchangeTest extends TestCase
9
{
10
    public function testGettersSetters()
11
    {
12
        $url = 'https://www.example.com';
13
14
        $entity = new WebhookExchange($url);
15
16
        $this->assertSame(null, $entity->getId());
17
        $this->assertSame($url, $entity->getUrl());
18
        $this->assertSame(0, $entity->getLastEventId());
19
20
        $entity
21
            ->setId(10)
22
            ->setLastEventId(1)
23
            ->setUrl('https://www.example.dk')
24
        ;
25
26
        $this->assertSame(10, $entity->getId());
27
        $this->assertSame('https://www.example.dk', $entity->getUrl());
28
        $this->assertSame(1, $entity->getLastEventId());
29
    }
30
}
31