@@ -16,32 +16,32 @@ |
||
16 | 16 | |
17 | 17 | protected function setUp() |
18 | 18 | { |
19 | - $this->mock = $this->getMockBuilder( \Neos\FluidAdaptor\View\StandaloneView::class ) |
|
20 | - ->setMethods( array( 'assign', 'assignMultiple', 'render', 'setTemplatePathAndFilename' ) ) |
|
19 | + $this->mock = $this->getMockBuilder(\Neos\FluidAdaptor\View\StandaloneView::class) |
|
20 | + ->setMethods(array('assign', 'assignMultiple', 'render', 'setTemplatePathAndFilename')) |
|
21 | 21 | ->disableOriginalConstructor() |
22 | 22 | ->getMock(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\MW\View\Engine\Flow( $this->mock ); |
|
24 | + $this->object = new \Aimeos\MW\View\Engine\Flow($this->mock); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function tearDown() |
29 | 29 | { |
30 | - unset( $this->object, $this->mock ); |
|
30 | + unset($this->object, $this->mock); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
34 | 34 | public function testRender() |
35 | 35 | { |
36 | - $v = new \Aimeos\MW\View\Standard( [] ); |
|
36 | + $v = new \Aimeos\MW\View\Standard([]); |
|
37 | 37 | |
38 | - $this->mock->expects( $this->once() )->method( 'setTemplatePathAndFilename' ); |
|
39 | - $this->mock->expects( $this->once() )->method( 'assignMultiple' ); |
|
40 | - $this->mock->expects( $this->once() )->method( 'assign' ); |
|
41 | - $this->mock->expects( $this->once() )->method( 'render' ) |
|
42 | - ->will( $this->returnValue( 'test' ) ); |
|
38 | + $this->mock->expects($this->once())->method('setTemplatePathAndFilename'); |
|
39 | + $this->mock->expects($this->once())->method('assignMultiple'); |
|
40 | + $this->mock->expects($this->once())->method('assign'); |
|
41 | + $this->mock->expects($this->once())->method('render') |
|
42 | + ->will($this->returnValue('test')); |
|
43 | 43 | |
44 | - $result = $this->object->render( $v, 'filepath', array( 'key' => 'value' ) ); |
|
45 | - $this->assertEquals( 'test', $result ); |
|
44 | + $result = $this->object->render($v, 'filepath', array('key' => 'value')); |
|
45 | + $this->assertEquals('test', $result); |
|
46 | 46 | } |
47 | 47 | } |
@@ -14,41 +14,41 @@ |
||
14 | 14 | |
15 | 15 | protected function setUp() |
16 | 16 | { |
17 | - if( !class_exists( '\Neos\Flow\Http\Request' ) ) { |
|
18 | - $this->markTestSkipped( '\Neos\Flow\Http\Request is not available' ); |
|
17 | + if (!class_exists('\Neos\Flow\Http\Request')) { |
|
18 | + $this->markTestSkipped('\Neos\Flow\Http\Request is not available'); |
|
19 | 19 | } |
20 | 20 | |
21 | - if( !class_exists( '\Zend\Diactoros\ServerRequestFactory' ) ) { |
|
22 | - $this->markTestSkipped( '\Zend\Diactoros\ServerRequestFactory is not available' ); |
|
21 | + if (!class_exists('\Zend\Diactoros\ServerRequestFactory')) { |
|
22 | + $this->markTestSkipped('\Zend\Diactoros\ServerRequestFactory is not available'); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | $view = new \Aimeos\MW\View\Standard(); |
26 | - $server = array( 'REMOTE_ADDR' => '127.0.0.1' ); |
|
27 | - $request = new \Neos\Flow\Http\Request( [], [], [], $server ); |
|
28 | - $this->object = new \Aimeos\MW\View\Helper\Request\Flow( $view, $request, [], [], [], [], $server ); |
|
26 | + $server = array('REMOTE_ADDR' => '127.0.0.1'); |
|
27 | + $request = new \Neos\Flow\Http\Request([], [], [], $server); |
|
28 | + $this->object = new \Aimeos\MW\View\Helper\Request\Flow($view, $request, [], [], [], [], $server); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
32 | 32 | protected function tearDown() |
33 | 33 | { |
34 | - unset( $this->object, $this->mock ); |
|
34 | + unset($this->object, $this->mock); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testTransform() |
39 | 39 | { |
40 | - $this->assertInstanceOf( \Aimeos\MW\View\Helper\Request\Flow::class, $this->object->transform() ); |
|
40 | + $this->assertInstanceOf(\Aimeos\MW\View\Helper\Request\Flow::class, $this->object->transform()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
44 | 44 | public function testGetClientAddress() |
45 | 45 | { |
46 | - $this->assertEquals( '127.0.0.1', $this->object->getClientAddress() ); |
|
46 | + $this->assertEquals('127.0.0.1', $this->object->getClientAddress()); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
50 | 50 | public function testGetTarget() |
51 | 51 | { |
52 | - $this->assertEquals( null, $this->object->getTarget() ); |
|
52 | + $this->assertEquals(null, $this->object->getTarget()); |
|
53 | 53 | } |
54 | 54 | } |
@@ -16,23 +16,23 @@ |
||
16 | 16 | |
17 | 17 | protected function setUp() |
18 | 18 | { |
19 | - if( !class_exists( '\Zend\Diactoros\Response' ) ) { |
|
20 | - $this->markTestSkipped( '\Zend\Diactoros\Response is not available' ); |
|
19 | + if (!class_exists('\Zend\Diactoros\Response')) { |
|
20 | + $this->markTestSkipped('\Zend\Diactoros\Response is not available'); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $view = new \Aimeos\MW\View\Standard(); |
24 | - $this->object = new \Aimeos\MW\View\Helper\Response\Flow( $view ); |
|
24 | + $this->object = new \Aimeos\MW\View\Helper\Response\Flow($view); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function tearDown() |
29 | 29 | { |
30 | - unset( $this->object ); |
|
30 | + unset($this->object); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
34 | 34 | public function testTransform() |
35 | 35 | { |
36 | - $this->assertInstanceOf( \Aimeos\MW\View\Helper\Response\Flow::class, $this->object->transform() ); |
|
36 | + $this->assertInstanceOf(\Aimeos\MW\View\Helper\Response\Flow::class, $this->object->transform()); |
|
37 | 37 | } |
38 | 38 | } |
@@ -17,38 +17,38 @@ |
||
17 | 17 | |
18 | 18 | protected function setUp() |
19 | 19 | { |
20 | - if( class_exists( 'Neos\Cache\Frontend\StringFrontend' ) === false ) { |
|
21 | - $this->markTestSkipped( 'Class \\Neos\\Cache\\Frontend\\StringFrontend not found' ); |
|
20 | + if (class_exists('Neos\Cache\Frontend\StringFrontend') === false) { |
|
21 | + $this->markTestSkipped('Class \\Neos\\Cache\\Frontend\\StringFrontend not found'); |
|
22 | 22 | } |
23 | 23 | |
24 | - $localeItem = $this->getMockBuilder( \Aimeos\MShop\Locale\Item\Standard::class ) |
|
25 | - ->setMethods( ['getSiteId']) |
|
24 | + $localeItem = $this->getMockBuilder(\Aimeos\MShop\Locale\Item\Standard::class) |
|
25 | + ->setMethods(['getSiteId']) |
|
26 | 26 | ->getMock(); |
27 | 27 | |
28 | - $this->mock = $this->getMockBuilder( 'Neos\Cache\Frontend\StringFrontend' ) |
|
28 | + $this->mock = $this->getMockBuilder('Neos\Cache\Frontend\StringFrontend') |
|
29 | 29 | ->disableOriginalConstructor() |
30 | 30 | ->getMock(); |
31 | 31 | |
32 | 32 | $context = \TestHelper::getContext(); |
33 | - $context->setLocale( $localeItem ); |
|
33 | + $context->setLocale($localeItem); |
|
34 | 34 | |
35 | - $this->object = new \Aimeos\MAdmin\Cache\Proxy\Flow( $context, $this->mock ); |
|
35 | + $this->object = new \Aimeos\MAdmin\Cache\Proxy\Flow($context, $this->mock); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | protected function tearDown() |
40 | 40 | { |
41 | - unset( $this->mock, $this->object ); |
|
41 | + unset($this->mock, $this->object); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testGetObject() |
46 | 46 | { |
47 | - $class = new \ReflectionClass( \Aimeos\MAdmin\Cache\Proxy\Flow::class ); |
|
48 | - $method = $class->getMethod( 'getObject' ); |
|
49 | - $method->setAccessible( true ); |
|
47 | + $class = new \ReflectionClass(\Aimeos\MAdmin\Cache\Proxy\Flow::class); |
|
48 | + $method = $class->getMethod('getObject'); |
|
49 | + $method->setAccessible(true); |
|
50 | 50 | |
51 | - $result = $method->invokeArgs( $this->object, [] ); |
|
52 | - $this->assertInstanceOf( \Aimeos\MW\Cache\Iface::class, $result ); |
|
51 | + $result = $method->invokeArgs($this->object, []); |
|
52 | + $this->assertInstanceOf(\Aimeos\MW\Cache\Iface::class, $result); |
|
53 | 53 | } |
54 | 54 | } |