@@ -21,18 +21,18 @@ discard block |
||
21 | 21 | */ |
22 | 22 | protected function setUp() |
23 | 23 | { |
24 | - if( !class_exists( '\\Illuminate\\Http\\Request' ) ) { |
|
25 | - $this->markTestSkipped( '\\Illuminate\\Http\\Request is not available' ); |
|
24 | + if (!class_exists('\\Illuminate\\Http\\Request')) { |
|
25 | + $this->markTestSkipped('\\Illuminate\\Http\\Request is not available'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $view = new \Aimeos\MW\View\Standard(); |
29 | 29 | |
30 | - $this->mock = $this->getMockBuilder( '\\Illuminate\\Http\\Request' ) |
|
31 | - ->setMethods( array( 'file', 'getContent', 'ip', 'route' ) )->getMock(); |
|
30 | + $this->mock = $this->getMockBuilder('\\Illuminate\\Http\\Request') |
|
31 | + ->setMethods(array('file', 'getContent', 'ip', 'route'))->getMock(); |
|
32 | 32 | |
33 | - $this->mock->expects( $this->once() )->method( 'file' )->will( $this->returnValue( array() ) ); |
|
33 | + $this->mock->expects($this->once())->method('file')->will($this->returnValue(array())); |
|
34 | 34 | |
35 | - $this->object = new \Aimeos\MW\View\Helper\Request\Laravel5( $view, $this->mock ); |
|
35 | + $this->object = new \Aimeos\MW\View\Helper\Request\Laravel5($view, $this->mock); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -44,45 +44,45 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function tearDown() |
46 | 46 | { |
47 | - unset( $this->object, $this->mock ); |
|
47 | + unset($this->object, $this->mock); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
51 | 51 | public function testTransform() |
52 | 52 | { |
53 | - $this->assertInstanceOf( '\\Aimeos\\MW\\View\\Helper\\Request\\Laravel5', $this->object->transform() ); |
|
53 | + $this->assertInstanceOf('\\Aimeos\\MW\\View\\Helper\\Request\\Laravel5', $this->object->transform()); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
57 | 57 | public function testGetBody() |
58 | 58 | { |
59 | - $this->mock->expects( $this->once() )->method( 'getContent' ) |
|
60 | - ->will( $this->returnValue( 'body' ) ); |
|
59 | + $this->mock->expects($this->once())->method('getContent') |
|
60 | + ->will($this->returnValue('body')); |
|
61 | 61 | |
62 | - $this->assertEquals( 'body', $this->object->transform()->getBody() ); |
|
62 | + $this->assertEquals('body', $this->object->transform()->getBody()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | |
66 | 66 | public function testGetClientAddress() |
67 | 67 | { |
68 | - $this->mock->expects( $this->once() )->method( 'ip' ) |
|
69 | - ->will( $this->returnValue( '127.0.0.1' ) ); |
|
68 | + $this->mock->expects($this->once())->method('ip') |
|
69 | + ->will($this->returnValue('127.0.0.1')); |
|
70 | 70 | |
71 | - $this->assertEquals( '127.0.0.1', $this->object->transform()->getClientAddress() ); |
|
71 | + $this->assertEquals('127.0.0.1', $this->object->transform()->getClientAddress()); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
75 | 75 | public function testGetTarget() |
76 | 76 | { |
77 | - $this->mock->expects( $this->once() )->method( 'route' ) |
|
78 | - ->will( $this->returnValue( null ) ); |
|
77 | + $this->mock->expects($this->once())->method('route') |
|
78 | + ->will($this->returnValue(null)); |
|
79 | 79 | |
80 | - $this->assertEquals( null, $this->object->transform()->getTarget() ); |
|
80 | + $this->assertEquals(null, $this->object->transform()->getTarget()); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
84 | 84 | public function testGetUploadedFiles() |
85 | 85 | { |
86 | - $this->assertEquals( array(), $this->object->transform()->getUploadedFiles() ); |
|
86 | + $this->assertEquals(array(), $this->object->transform()->getUploadedFiles()); |
|
87 | 87 | } |
88 | 88 | } |