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

Symfony2Test::testTransform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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