NullEventListenerTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 12 1
A testExecute() 0 8 1
A testIsPropagationStopped() 0 8 1
1
<?php
2
3
namespace Onoi\EventDispatcher\Tests\Listener;
4
5
use Onoi\EventDispatcher\Listener\NullEventListener;
6
7
/**
8
 * @covers \Onoi\EventDispatcher\Listener\NullEventListener
9
 *
10
 * @group onoi-event-dispatcher
11
 *
12
 * @license GNU GPL v2+
13
 * @since 1.0
14
 *
15
 * @author mwjames
16
 */
17
class NullEventListenerTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testCanConstruct() {
20
21
		$this->assertInstanceOf(
22
			'\Onoi\EventDispatcher\EventListener',
23
			new NullEventListener()
24
		);
25
26
		$this->assertInstanceOf(
27
			'\Onoi\EventDispatcher\Listener\NullEventListener',
28
			new NullEventListener()
29
		);
30
	}
31
32
	public function testExecute() {
33
34
		$instance = new NullEventListener();
35
36
		$this->assertNull(
37
			$instance->execute()
38
		);
39
	}
40
41
	public function testIsPropagationStopped() {
42
43
		$instance = new NullEventListener();
44
45
		$this->assertFalse(
46
			$instance->isPropagationStopped()
47
		);
48
	}
49
50
}
51