|
@@ 31-38 (lines=8) @@
|
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
/** @test */ |
| 31 |
|
public function it_can_find_a_list_by_its_name() |
| 32 |
|
{ |
| 33 |
|
$list = $this->newsletterListCollection->findByName('list2'); |
| 34 |
|
|
| 35 |
|
$this->assertInstanceOf(NewsletterList::class, $list); |
| 36 |
|
|
| 37 |
|
$this->assertEquals(2, $list->getId()); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
/** @test */ |
| 41 |
|
public function it_will_use_the_default_list_when_not_specifing_a_listname() |
|
@@ 41-48 (lines=8) @@
|
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
/** @test */ |
| 41 |
|
public function it_will_use_the_default_list_when_not_specifing_a_listname() |
| 42 |
|
{ |
| 43 |
|
$list = $this->newsletterListCollection->findByName(''); |
| 44 |
|
|
| 45 |
|
$this->assertInstanceOf(NewsletterList::class, $list); |
| 46 |
|
|
| 47 |
|
$this->assertEquals(3, $list->getId()); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
/** @test */ |
| 51 |
|
public function it_will_throw_an_exception_when_using_a_default_list_that_does_not_exist() |