Completed
Push — master ( 179136...c23b75 )
by Aimeos
02:35
created
lib/custom/src/MW/View/Engine/Flow.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 *
28 28
 	 * @param \Neos\FluidAdaptor\View\StandaloneView $view Flow template view object
29 29
 	 */
30
-	public function __construct( \Neos\FluidAdaptor\View\StandaloneView $view )
30
+	public function __construct(\Neos\FluidAdaptor\View\StandaloneView $view)
31 31
 	{
32 32
 		$this->view = $view;
33 33
 	}
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 	 * @return string Output generated by the template
43 43
 	 * @throws \Aimeos\MW\View\Exception If the template isn't found
44 44
 	 */
45
-	public function render( \Aimeos\MW\View\Iface $view, $filename, array $values )
45
+	public function render(\Aimeos\MW\View\Iface $view, $filename, array $values)
46 46
 	{
47 47
 		$fluid = clone $this->view;
48 48
 
49
-		$fluid->setTemplatePathAndFilename( $filename );
50
-		$fluid->assign( '_aimeos_view', $view );
51
-		$fluid->assignMultiple( $values );
49
+		$fluid->setTemplatePathAndFilename($filename);
50
+		$fluid->assign('_aimeos_view', $view);
51
+		$fluid->assignMultiple($values);
52 52
 
53 53
 		return $fluid->render();
54 54
 	}
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Engine/FlowTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -16,32 +16,32 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$this->mock = $this->getMockBuilder( '\Neos\FluidAdaptor\View\StandaloneView' )
20
-			->setMethods( array( 'assign', 'assignMultiple', 'render', 'setTemplatePathAndFilename' ) )
19
+		$this->mock = $this->getMockBuilder('\Neos\FluidAdaptor\View\StandaloneView')
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( array() );
36
+		$v = new \Aimeos\MW\View\Standard(array());
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
 }
Please login to merge, or discard this patch.