Test Failed
Push — 1.0.0-dev ( c7a39c...6c2ad2 )
by nguereza
03:29
created

EventInfoTest   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 21
c 1
b 1
f 0
dl 0
loc 53
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDownAfterClass() 0 2 1
A setUpBeforeClass() 0 2 1
A testDefaultValue() 0 6 1
A tearDown() 0 2 1
A testStopValueIsSetToTue() 0 6 1
A setUp() 0 2 1
A testReturnBackValueIsSetToTrue() 0 6 1
A testPayloadValueIsSet() 0 6 1
1
<?php 
2
3
	use PHPUnit\Framework\TestCase;
4
5
	class EventInfoTest extends TestCase
6
	{	
7
	
8
		public static function setUpBeforeClass()
9
		{
10
		
11
		}
12
		
13
		public static function tearDownAfterClass()
14
		{
15
			
16
		}
17
		
18
		protected function setUp()
19
		{
20
		}
21
22
		protected function tearDown()
23
		{
24
		}
25
26
		
27
		
28
		public function testDefaultValue(){
29
			$e = new EventInfo('foo');
30
			$this->assertSame($e->name, 'foo');
31
			$this->assertSame($e->payload, array());
32
			$this->assertFalse($e->returnBack);
33
			$this->assertFalse($e->stop);
34
		}
35
		
36
		public function testPayloadValueIsSet(){
37
			$e = new EventInfo('foo', array('bar'));
38
			$this->assertSame($e->name, 'foo');
39
			$this->assertSame($e->payload, array('bar'));
40
			$this->assertFalse($e->returnBack);
41
			$this->assertFalse($e->stop);
42
		}
43
		
44
		public function testReturnBackValueIsSetToTrue(){
45
			$e = new EventInfo('foo', array('bar'), true);
46
			$this->assertSame($e->name, 'foo');
47
			$this->assertSame($e->payload, array('bar'));
48
			$this->assertTrue($e->returnBack);
49
			$this->assertFalse($e->stop);
50
		}
51
		
52
		public function testStopValueIsSetToTue(){
53
			$e = new EventInfo('foo', array('bar'), true, true);
54
			$this->assertSame($e->name, 'foo');
55
			$this->assertSame($e->payload, array('bar'));
56
			$this->assertTrue($e->returnBack);
57
			$this->assertTrue($e->stop);
58
		}
59
	}