@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | * @param \\Aimeos\MW\View\Iface $view View instance with registered view helpers |
31 | 31 | * @param \Illuminate\Http\Request $request Laravel request object |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\MW\View\Iface $view, \Illuminate\Http\Request $request ) |
|
33 | + public function __construct(\Aimeos\MW\View\Iface $view, \Illuminate\Http\Request $request) |
|
34 | 34 | { |
35 | - parent::__construct( $view ); |
|
35 | + parent::__construct($view); |
|
36 | 36 | |
37 | 37 | $this->request = $request; |
38 | 38 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function getTarget() |
80 | 80 | { |
81 | - if( ( $route = $this->request->route() ) !== null ) { |
|
81 | + if (($route = $this->request->route()) !== null) { |
|
82 | 82 | return $route->getName(); |
83 | 83 | } |
84 | 84 | } |
@@ -21,13 +21,13 @@ 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 | - $this->mock = $this->getMock( '\\Illuminate\\Http\\Request' ); |
|
30 | - $this->object = new \Aimeos\MW\View\Helper\Request\Laravel5( $view, $this->mock, array() ); |
|
29 | + $this->mock = $this->getMock('\\Illuminate\\Http\\Request'); |
|
30 | + $this->object = new \Aimeos\MW\View\Helper\Request\Laravel5($view, $this->mock, array()); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -39,39 +39,39 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function tearDown() |
41 | 41 | { |
42 | - unset( $this->object, $this->mock ); |
|
42 | + unset($this->object, $this->mock); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
46 | 46 | public function testTransform() |
47 | 47 | { |
48 | - $this->assertInstanceOf( '\\Aimeos\\MW\\View\\Helper\\Request\\Laravel5', $this->object->transform() ); |
|
48 | + $this->assertInstanceOf('\\Aimeos\\MW\\View\\Helper\\Request\\Laravel5', $this->object->transform()); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testGetBody() |
53 | 53 | { |
54 | - $this->mock->expects( $this->once() )->method( 'getContent' ) |
|
55 | - ->will( $this->returnValue( 'body' ) ); |
|
54 | + $this->mock->expects($this->once())->method('getContent') |
|
55 | + ->will($this->returnValue('body')); |
|
56 | 56 | |
57 | - $this->assertEquals( 'body', $this->object->transform()->getBody() ); |
|
57 | + $this->assertEquals('body', $this->object->transform()->getBody()); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | |
61 | 61 | public function testGetClientAddress() |
62 | 62 | { |
63 | - $this->mock->expects( $this->once() )->method( 'ip' ) |
|
64 | - ->will( $this->returnValue( '127.0.0.1' ) ); |
|
63 | + $this->mock->expects($this->once())->method('ip') |
|
64 | + ->will($this->returnValue('127.0.0.1')); |
|
65 | 65 | |
66 | - $this->assertEquals( '127.0.0.1', $this->object->transform()->getClientAddress() ); |
|
66 | + $this->assertEquals('127.0.0.1', $this->object->transform()->getClientAddress()); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
70 | 70 | public function testGetTarget() |
71 | 71 | { |
72 | - $this->mock->expects( $this->once() )->method( 'route' ) |
|
73 | - ->will( $this->returnValue( null ) ); |
|
72 | + $this->mock->expects($this->once())->method('route') |
|
73 | + ->will($this->returnValue(null)); |
|
74 | 74 | |
75 | - $this->assertEquals( null, $this->object->transform()->getTarget() ); |
|
75 | + $this->assertEquals(null, $this->object->transform()->getTarget()); |
|
76 | 76 | } |
77 | 77 | } |