Passed
Push — master ( 22ccfd...5bc476 )
by Aimeos
12:34
created

StandardTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
eloc 8
c 2
b 0
f 0
dl 0
loc 33
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testBody() 0 3 1
A tearDown() 0 3 1
A testId() 0 3 1
A setUp() 0 4 1
A testToString() 0 3 1
1
<?php
2
3
namespace Aimeos\Base\MQueue\Message;
4
5
6
class StandardTest extends \PHPUnit\Framework\TestCase
7
{
8
	private $object;
9
10
11
	protected function setUp() : void
12
	{
13
		$row = array( 'id' => 1, 'message' => 'test', 'cname', 'unittest', 'rtime' => '2000-01-01 00:00:00' );
14
		$this->object = new \Aimeos\Base\MQueue\Message\Standard( $row );
15
	}
16
17
18
	protected function tearDown() : void
19
	{
20
		unset( $this->object );
21
	}
22
23
24
	public function testId()
25
	{
26
		$this->assertEquals( '1', $this->object->getId() );
27
	}
28
29
30
	public function testBody()
31
	{
32
		$this->assertEquals( 'test', $this->object->getBody() );
33
	}
34
35
36
	public function testToString()
37
	{
38
		$this->assertEquals( 'test', (string) $this->object );
39
	}
40
}
41