Passed
Push — master ( 2823db...e46f60 )
by Alexander
10:02
created

BeforeSendTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2
1
<?php
2
3
namespace Yiisoft\Mailer\Unit\Event;
4
5
use Yiisoft\Mailer\Event\BeforeSend;
6
use Yiisoft\Mailer\Tests\TestCase;
7
8
class BeforeSendTest extends TestCase
9
{
10
    public function testSetup(): void
11
    {
12
        $message = $this->createMessage();
13
        $event = new BeforeSend($message);
14
        $this->assertEquals($message, $event->getMessage());
15
        $this->assertFalse($event->isPropagationStopped());
16
    }
17
18
    public function testStopPropagation(): void
19
    {
20
        $event = new BeforeSend($this->createMessage());
21
        $event->stopPropagation();
22
        $this->assertTrue($event->isPropagationStopped());
23
    }
24
}
25