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

EventInfoTest::tearDownAfterClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
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
	}