NewsletterListTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A it_can_determine_the_name_of_the_list() 0 4 1
A it_can_determine_the_id_of_the_list() 0 4 1
1
<?php
2
3
namespace Spatie\Newsletter\Test;
4
5
use PHPUnit\Framework\TestCase;
6
use Spatie\Newsletter\NewsletterList;
7
8
class NewsletterListTest extends TestCase
9
{
10
    protected $newsletterList;
11
12
    public function setUp(): void
13
    {
14
        parent::setUp();
15
16
        $this->newsletterList = new NewsletterList('subscriber', ['id' => 'abc123']);
17
    }
18
19
    /** @test */
20
    public function it_can_determine_the_name_of_the_list()
21
    {
22
        $this->assertSame('subscriber', $this->newsletterList->getName());
23
    }
24
25
    /** @test */
26
    public function it_can_determine_the_id_of_the_list()
27
    {
28
        $this->assertSame('abc123', $this->newsletterList->getId());
29
    }
30
}
31