Completed
Push — master ( 33f856...2c02d9 )
by Aimeos
10:22
created
lib/custom/tests/MW/View/Engine/BladeTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		if( !class_exists( '\Illuminate\View\Factory' ) ) {
20
-			$this->markTestSkipped( '\Illuminate\View\Factory is not available' );
19
+		if (!class_exists('\Illuminate\View\Factory')) {
20
+			$this->markTestSkipped('\Illuminate\View\Factory is not available');
21 21
 		}
22 22
 
23
-		$this->mock = $this->getMockBuilder( '\Illuminate\View\Factory' )
24
-			->setMethods( array( 'file' ) )
23
+		$this->mock = $this->getMockBuilder('\Illuminate\View\Factory')
24
+			->setMethods(array('file'))
25 25
 			->disableOriginalConstructor()
26 26
 			->getMock();
27 27
 
28
-		$this->object = new \Aimeos\MW\View\Engine\Blade( $this->mock );
28
+		$this->object = new \Aimeos\MW\View\Engine\Blade($this->mock);
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 testRender()
39 39
 	{
40
-		$view = $this->getMockBuilder( '\Illuminate\View\View' )
41
-			->setMethods( array( 'render' ) )
40
+		$view = $this->getMockBuilder('\Illuminate\View\View')
41
+			->setMethods(array('render'))
42 42
 			->disableOriginalConstructor()
43 43
 			->getMock();
44 44
 
45
-		$view->expects( $this->once() )->method( 'render' )
46
-			->will( $this->returnValue( 'test' ) );
45
+		$view->expects($this->once())->method('render')
46
+			->will($this->returnValue('test'));
47 47
 
48
-		$this->mock->expects( $this->once() )->method( 'file' )
49
-			->will( $this->returnValue( $view) );
48
+		$this->mock->expects($this->once())->method('file')
49
+			->will($this->returnValue($view));
50 50
 
51
-		$result = $this->object->render( 'filepath', array( 'key' => 'value' ) );
52
-		$this->assertEquals( 'test', $result );
51
+		$result = $this->object->render('filepath', array('key' => 'value'));
52
+		$this->assertEquals('test', $result);
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.
lib/custom/src/MW/View/Engine/Blade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 *
28 28
 	 * @param \Illuminate\View\Factory $factory Laravel view factory
29 29
 	 */
30
-	public function __construct( \Illuminate\View\Factory $factory )
30
+	public function __construct(\Illuminate\View\Factory $factory)
31 31
 	{
32 32
 		$this->factory = $factory;
33 33
 	}
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 	 * @return string Output generated by the template
42 42
 	 * @throws \Aimeos\MW\View\Exception If the template isn't found
43 43
 	 */
44
-	public function render( $filename, array $values )
44
+	public function render($filename, array $values)
45 45
 	{
46
-		return $this->factory->file( $filename, $values )->render();
46
+		return $this->factory->file($filename, $values)->render();
47 47
 	}
48 48
 }
Please login to merge, or discard this patch.