Completed
Push — master ( 99dfa7...cc4116 )
by Aimeos
12:53
created
lib/custom/src/MW/View/Helper/Request/Flow.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 	 * @param \TYPO3\Flow\Http\Request $request Flow request object
33 33
 	 * @param array $files Uploaded files from $_FILES
34 34
 	 */
35
-	public function __construct( \Aimeos\MW\View\Iface $view, \TYPO3\Flow\Http\Request $request, array $files )
35
+	public function __construct(\Aimeos\MW\View\Iface $view, \TYPO3\Flow\Http\Request $request, array $files)
36 36
 	{
37
-		\Aimeos\MW\View\Helper\Base::__construct( $view );
37
+		\Aimeos\MW\View\Helper\Base::__construct($view);
38 38
 
39 39
 		$this->request = $request;
40 40
 		$this->files = $files;
@@ -99,6 +99,6 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function getUploadedFiles()
101 101
 	{
102
-		return $this->createUploadedFiles( $this->files );
102
+		return $this->createUploadedFiles($this->files);
103 103
 	}
104 104
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Helper/Request/FlowTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	protected function setUp()
23 23
 	{
24
-		if( !class_exists( '\TYPO3\Flow\Http\Request' ) ) {
25
-			$this->markTestSkipped( '\TYPO3\Flow\Http\Request is not available' );
24
+		if (!class_exists('\TYPO3\Flow\Http\Request')) {
25
+			$this->markTestSkipped('\TYPO3\Flow\Http\Request is not available');
26 26
 		}
27 27
 
28
-		$this->mock = $this->getMockBuilder( '\TYPO3\Flow\Http\Request' )
29
-			->setConstructorArgs( array( array(), array(), array(), array() ) )->getMock();
28
+		$this->mock = $this->getMockBuilder('\TYPO3\Flow\Http\Request')
29
+			->setConstructorArgs(array(array(), array(), array(), array()))->getMock();
30 30
 
31 31
 		$view = new \Aimeos\MW\View\Standard();
32
-		$this->object = new \Aimeos\MW\View\Helper\Request\Flow( $view, $this->mock, array() );
32
+		$this->object = new \Aimeos\MW\View\Helper\Request\Flow($view, $this->mock, array());
33 33
 	}
34 34
 
35 35
 
@@ -41,37 +41,37 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	protected function tearDown()
43 43
 	{
44
-		unset( $this->object, $this->mock );
44
+		unset($this->object, $this->mock);
45 45
 	}
46 46
 
47 47
 
48 48
 	public function testTransform()
49 49
 	{
50
-		$this->assertInstanceOf( '\\Aimeos\\MW\\View\\Helper\\Request\\Flow', $this->object->transform() );
50
+		$this->assertInstanceOf('\\Aimeos\\MW\\View\\Helper\\Request\\Flow', $this->object->transform());
51 51
 	}
52 52
 
53 53
 
54 54
 	public function testGetBody()
55 55
 	{
56
-		$this->mock->expects( $this->once() )->method( 'getContent' )
57
-			->will( $this->returnValue( 'body' ) );
56
+		$this->mock->expects($this->once())->method('getContent')
57
+			->will($this->returnValue('body'));
58 58
 
59
-		$this->assertEquals( 'body', $this->object->transform()->getBody() );
59
+		$this->assertEquals('body', $this->object->transform()->getBody());
60 60
 	}
61 61
 
62 62
 
63 63
 	public function testGetClientAddress()
64 64
 	{
65
-		$this->mock->expects( $this->once() )->method( 'getClientIpAddress' )
66
-			->will( $this->returnValue( '127.0.0.1' ) );
65
+		$this->mock->expects($this->once())->method('getClientIpAddress')
66
+			->will($this->returnValue('127.0.0.1'));
67 67
 
68
-		$this->assertEquals( '127.0.0.1', $this->object->transform()->getClientAddress() );
68
+		$this->assertEquals('127.0.0.1', $this->object->transform()->getClientAddress());
69 69
 	}
70 70
 
71 71
 
72 72
 	public function testGetTarget()
73 73
 	{
74
-		$this->assertEquals( null, $this->object->transform()->getTarget() );
74
+		$this->assertEquals(null, $this->object->transform()->getTarget());
75 75
 	}
76 76
 
77 77
 
@@ -79,6 +79,6 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		$files = $this->object->transform()->getUploadedFiles();
81 81
 
82
-		$this->assertEquals( array(), $files );
82
+		$this->assertEquals(array(), $files);
83 83
 	}
84 84
 }
Please login to merge, or discard this patch.