Completed
Push — master ( ec393a...539bbb )
by Aimeos
12:50
created

Symfony2Test   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 33
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 14 3
A testTransform() 0 4 1
A testCreateStream() 0 4 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2016
6
 */
7
8
9
namespace Aimeos\MW\View\Helper\Response;
10
11
12
class Symfony2Test extends \PHPUnit_Framework_TestCase
13
{
14
	private $object;
15
	private $mock;
0 ignored issues
show
Unused Code introduced by
The property $mock is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
16
17
18
	protected function setUp()
19
	{
20
		if( !class_exists( '\Symfony\Component\HttpFoundation\Response' ) ) {
21
			$this->markTestSkipped( '\Symfony\Component\HttpFoundation\Response is not available' );
22
		}
23
24
		if( !class_exists( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory' ) ) {
25
			$this->markTestSkipped( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available' );
26
		}
27
28
		$view = new \Aimeos\MW\View\Standard();
29
		$request = new \Symfony\Component\HttpFoundation\Response( 'Content' );
30
		$this->object = new \Aimeos\MW\View\Helper\Response\Symfony2( $view, $request );
31
	}
32
33
34
	public function testTransform()
35
	{
36
		$this->assertInstanceOf( '\Aimeos\MW\View\Helper\Response\Symfony2', $this->object->transform() );
37
	}
38
39
40
	public function testCreateStream()
41
	{
42
		$this->assertInstanceOf( '\Psr\Http\Message\StreamInterface', $this->object->createStream( __FILE__ ) );
43
	}
44
}
45