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

WebhookExchangeTest::testGettersSetters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 13
nc 1
nop 0
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