SmsReplyCallbackEventTest::test__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 12
rs 10
c 1
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the smsmode-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\SmsModeBundle\Tests\Event;
13
14
use WBW\Bundle\SmsModeBundle\Event\SmsReplyCallbackEvent;
15
use WBW\Bundle\SmsModeBundle\Tests\AbstractTestCase;
16
use WBW\Library\SmsMode\Model\SmsReplyCallback;
17
18
/**
19
 * SMS reply callback event test.
20
 *
21
 * @author webeweb <https://github.com/webeweb>
22
 * @package WBW\Bundle\SmsModeBundle\Tests\Event
23
 */
24
class SmsReplyCallbackEventTest extends AbstractTestCase {
25
26
    /**
27
     * Test __construct()
28
     *
29
     * @return void
30
     */
31
    public function test__construct(): void {
32
33
        $this->assertEquals("wbw.smsmode.event.sms_reply_callback", SmsReplyCallbackEvent::EVENT_NAME);
34
35
        // Set a SMS reply callback mock.
36
        $smsReplyCallback = new SmsReplyCallback();
37
38
        $obj = new SmsReplyCallbackEvent($smsReplyCallback);
39
40
        $this->assertEquals(SmsReplyCallbackEvent::EVENT_NAME, $obj->getEventName());
41
42
        $this->assertSame($smsReplyCallback, $obj->getSmsReplyCallback());
43
    }
44
}
45