Completed
Push — master ( 088bf6...a47832 )
by Martijn
02:41
created

StatementTest::testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
class StatementTest extends SwaggerGen_TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
6
	/**
7
	 * @covers \SwaggerGen\Statement::__construct
8
	 */
9
	public function testConstructor()
10
	{
11
		$object = new \SwaggerGen\Statement('command', 'some data');
12
13
		$this->assertInstanceOf('\SwaggerGen\Statement', $object);
14
		$this->assertSame('command', $object->getCommand());
15
		$this->assertSame('some data', $object->getData());
16
	}
17
	/**
18
	 * @covers \SwaggerGen\Statement::__construct
19
	 */
20
	public function testConstructor_File()
21
	{
22
		$object = new \SwaggerGen\Statement('command', 'some data', 'file', 123);
23
		$this->assertInstanceOf('\SwaggerGen\Statement', $object);
24
25
		$this->assertSame('command', $object->getCommand());
26
		$this->assertSame('some data', $object->getData());
27
		$this->assertSame('file', $object->getFile());
28
		$this->assertSame(123, $object->getLine());
29
	}	
30
}
31