@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | * @param \Aimeos\MW\View\Iface $view View instance with registered view helpers |
| 31 | 31 | * @param \Symfony\Component\HttpFoundation\Request $request Symfony2 request object |
| 32 | 32 | */ |
| 33 | - public function __construct( $view, \Symfony\Component\HttpFoundation\Request $request ) |
|
| 33 | + public function __construct($view, \Symfony\Component\HttpFoundation\Request $request) |
|
| 34 | 34 | { |
| 35 | 35 | $this->request = $request; |
| 36 | 36 | |
| 37 | 37 | $factory = new \Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory(); |
| 38 | - $psr7request = $factory->createRequest( $request ); |
|
| 38 | + $psr7request = $factory->createRequest($request); |
|
| 39 | 39 | |
| 40 | - parent::__construct( $view, $psr7request ); |
|
| 40 | + parent::__construct($view, $psr7request); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
@@ -59,6 +59,6 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function getTarget() |
| 61 | 61 | { |
| 62 | - return $this->request->get( '_route' ); |
|
| 62 | + return $this->request->get('_route'); |
|
| 63 | 63 | } |
| 64 | 64 | } |
@@ -27,11 +27,11 @@ |
||
| 27 | 27 | * @param \Aimeos\MW\View\Iface $view View instance with registered view helpers |
| 28 | 28 | * @param \Symfony\Component\HttpFoundation\Response $response Symfony2 response object |
| 29 | 29 | */ |
| 30 | - public function __construct( $view, \Symfony\Component\HttpFoundation\Response $response ) |
|
| 30 | + public function __construct($view, \Symfony\Component\HttpFoundation\Response $response) |
|
| 31 | 31 | { |
| 32 | 32 | $factory = new \Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory(); |
| 33 | - $psr7response = $factory->createResponse( $response ); |
|
| 33 | + $psr7response = $factory->createResponse($response); |
|
| 34 | 34 | |
| 35 | - parent::__construct( $view, $psr7response ); |
|
| 35 | + parent::__construct($view, $psr7response); |
|
| 36 | 36 | } |
| 37 | 37 | } |
@@ -15,35 +15,35 @@ |
||
| 15 | 15 | |
| 16 | 16 | protected function setUp() |
| 17 | 17 | { |
| 18 | - if( !class_exists( '\Symfony\Component\HttpFoundation\Request' ) ) { |
|
| 19 | - $this->markTestSkipped( '\Symfony\Component\HttpFoundation\Request is not available' ); |
|
| 18 | + if (!class_exists('\Symfony\Component\HttpFoundation\Request')) { |
|
| 19 | + $this->markTestSkipped('\Symfony\Component\HttpFoundation\Request is not available'); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - if( !class_exists( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory' ) ) { |
|
| 23 | - $this->markTestSkipped( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available' ); |
|
| 22 | + if (!class_exists('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory')) { |
|
| 23 | + $this->markTestSkipped('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | $view = new \Aimeos\MW\View\Standard(); |
| 27 | - $param = array( 'HTTP_HOST' => 'localhost', 'REMOTE_ADDR' => '127.0.0.1' ); |
|
| 28 | - $request = new \Symfony\Component\HttpFoundation\Request( array(), array(), array(), array(), array(), $param, 'Content' ); |
|
| 29 | - $this->object = new \Aimeos\MW\View\Helper\Request\Symfony2( $view, $request ); |
|
| 27 | + $param = array('HTTP_HOST' => 'localhost', 'REMOTE_ADDR' => '127.0.0.1'); |
|
| 28 | + $request = new \Symfony\Component\HttpFoundation\Request(array(), array(), array(), array(), array(), $param, 'Content'); |
|
| 29 | + $this->object = new \Aimeos\MW\View\Helper\Request\Symfony2($view, $request); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | public function testTransform() |
| 34 | 34 | { |
| 35 | - $this->assertInstanceOf( '\Aimeos\MW\View\Helper\Request\Symfony2', $this->object->transform() ); |
|
| 35 | + $this->assertInstanceOf('\Aimeos\MW\View\Helper\Request\Symfony2', $this->object->transform()); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | public function testGetClientAddress() |
| 40 | 40 | { |
| 41 | - $this->assertEquals( '127.0.0.1', $this->object->getClientAddress() ); |
|
| 41 | + $this->assertEquals('127.0.0.1', $this->object->getClientAddress()); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | |
| 45 | 45 | public function testGetTarget() |
| 46 | 46 | { |
| 47 | - $this->assertEquals( null, $this->object->getTarget() ); |
|
| 47 | + $this->assertEquals(null, $this->object->getTarget()); |
|
| 48 | 48 | } |
| 49 | 49 | } |
@@ -17,28 +17,28 @@ |
||
| 17 | 17 | |
| 18 | 18 | protected function setUp() |
| 19 | 19 | { |
| 20 | - if( !class_exists( '\Symfony\Component\HttpFoundation\Response' ) ) { |
|
| 21 | - $this->markTestSkipped( '\Symfony\Component\HttpFoundation\Response is not available' ); |
|
| 20 | + if (!class_exists('\Symfony\Component\HttpFoundation\Response')) { |
|
| 21 | + $this->markTestSkipped('\Symfony\Component\HttpFoundation\Response is not available'); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - if( !class_exists( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory' ) ) { |
|
| 25 | - $this->markTestSkipped( '\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available' ); |
|
| 24 | + if (!class_exists('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory')) { |
|
| 25 | + $this->markTestSkipped('\Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory is not available'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 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 ); |
|
| 29 | + $request = new \Symfony\Component\HttpFoundation\Response('Content'); |
|
| 30 | + $this->object = new \Aimeos\MW\View\Helper\Response\Symfony2($view, $request); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | public function testTransform() |
| 35 | 35 | { |
| 36 | - $this->assertInstanceOf( '\Aimeos\MW\View\Helper\Response\Symfony2', $this->object->transform() ); |
|
| 36 | + $this->assertInstanceOf('\Aimeos\MW\View\Helper\Response\Symfony2', $this->object->transform()); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | public function testCreateStream() |
| 41 | 41 | { |
| 42 | - $this->assertInstanceOf( '\Psr\Http\Message\StreamInterface', $this->object->createStream( __FILE__ ) ); |
|
| 42 | + $this->assertInstanceOf('\Psr\Http\Message\StreamInterface', $this->object->createStream(__FILE__)); |
|
| 43 | 43 | } |
| 44 | 44 | } |