@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function indexAction() |
30 | 30 | { |
31 | - $params = $this->get( 'aimeos_page' )->getSections( 'account-index' ); |
|
32 | - return $this->render( 'AimeosShopBundle:Account:index.html.twig', $params ); |
|
31 | + $params = $this->get('aimeos_page')->getSections('account-index'); |
|
32 | + return $this->render('AimeosShopBundle:Account:index.html.twig', $params); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -43,15 +43,15 @@ discard block |
||
43 | 43 | $context = $this->container->get('aimeos_context')->get(); |
44 | 44 | $langid = $context->getLocale()->getLanguageId(); |
45 | 45 | |
46 | - $view = $this->container->get('aimeos_view')->create( $context, array(), $langid ); |
|
47 | - $context->setView( $view ); |
|
46 | + $view = $this->container->get('aimeos_view')->create($context, array(), $langid); |
|
47 | + $context->setView($view); |
|
48 | 48 | |
49 | - $client = \Aimeos\Client\Html\Factory::createClient( $context, array(), 'account/download' ); |
|
50 | - $client->setView( $view ); |
|
49 | + $client = \Aimeos\Client\Html\Factory::createClient($context, array(), 'account/download'); |
|
50 | + $client->setView($view); |
|
51 | 51 | $client->process(); |
52 | 52 | |
53 | 53 | $response = $view->response(); |
54 | - return new Response( (string) $response->getBody(), $response->getStatusCode(), $response->getHeaders() ); |
|
54 | + return new Response((string) $response->getBody(), $response->getStatusCode(), $response->getHeaders()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function favoriteComponentAction() |
64 | 64 | { |
65 | - return $this->getOutput( 'account/favorite' ); |
|
65 | + return $this->getOutput('account/favorite'); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function historyComponentAction() |
75 | 75 | { |
76 | - return $this->getOutput( 'account/history' ); |
|
76 | + return $this->getOutput('account/history'); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function profileComponentAction() |
86 | 86 | { |
87 | - return $this->getOutput( 'account/profile' ); |
|
87 | + return $this->getOutput('account/profile'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | |
@@ -95,6 +95,6 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function watchComponentAction() |
97 | 97 | { |
98 | - return $this->getOutput( 'account/watch' ); |
|
98 | + return $this->getOutput('account/watch'); |
|
99 | 99 | } |
100 | 100 | } |
@@ -10,65 +10,65 @@ |
||
10 | 10 | public function testAccount() |
11 | 11 | { |
12 | 12 | $client = static::createClient(); |
13 | - $client->request( 'GET', '/unittest/de/EUR/myaccount' ); |
|
13 | + $client->request('GET', '/unittest/de/EUR/myaccount'); |
|
14 | 14 | |
15 | - $this->assertContains( 'aimeos account-history', $client->getResponse()->getContent() ); |
|
15 | + $this->assertContains('aimeos account-history', $client->getResponse()->getContent()); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
19 | 19 | public function testDownload() |
20 | 20 | { |
21 | 21 | $client = static::createClient(); |
22 | - $client->request( 'GET', '/unittest/de/EUR/myaccount/download/0' ); |
|
22 | + $client->request('GET', '/unittest/de/EUR/myaccount/download/0'); |
|
23 | 23 | |
24 | - $this->assertEquals( 401, $client->getResponse()->getStatusCode() ); |
|
24 | + $this->assertEquals(401, $client->getResponse()->getStatusCode()); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | public function testFavoriteComponent() |
29 | 29 | { |
30 | 30 | $client = static::createClient(); |
31 | - $client->request( 'GET', '/unittest/de/EUR/test/favoritecomponent' ); |
|
31 | + $client->request('GET', '/unittest/de/EUR/test/favoritecomponent'); |
|
32 | 32 | |
33 | - $this->assertEquals( 200, $client->getResponse()->getStatusCode() ); |
|
33 | + $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | |
37 | 37 | public function testHistoryComponent() |
38 | 38 | { |
39 | - $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\AccountController' ) |
|
40 | - ->setMethods( array( 'getOutput' ) ) |
|
39 | + $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\AccountController') |
|
40 | + ->setMethods(array('getOutput')) |
|
41 | 41 | ->disableOriginalConstructor() |
42 | 42 | ->getMock(); |
43 | 43 | |
44 | - $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) ); |
|
44 | + $mock->expects($this->once())->method('getOutput')->will($this->returnValue('test')); |
|
45 | 45 | |
46 | - $this->assertEquals( 'test', $mock->historyComponentAction() ); |
|
46 | + $this->assertEquals('test', $mock->historyComponentAction()); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
50 | 50 | public function testProfileComponent() |
51 | 51 | { |
52 | - $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\AccountController' ) |
|
53 | - ->setMethods( array( 'getOutput' ) ) |
|
52 | + $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\AccountController') |
|
53 | + ->setMethods(array('getOutput')) |
|
54 | 54 | ->disableOriginalConstructor() |
55 | 55 | ->getMock(); |
56 | 56 | |
57 | - $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) ); |
|
57 | + $mock->expects($this->once())->method('getOutput')->will($this->returnValue('test')); |
|
58 | 58 | |
59 | - $this->assertEquals( 'test', $mock->profileComponentAction() ); |
|
59 | + $this->assertEquals('test', $mock->profileComponentAction()); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
63 | 63 | public function testWatchComponent() |
64 | 64 | { |
65 | - $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\AccountController' ) |
|
66 | - ->setMethods( array( 'getOutput' ) ) |
|
65 | + $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\AccountController') |
|
66 | + ->setMethods(array('getOutput')) |
|
67 | 67 | ->disableOriginalConstructor() |
68 | 68 | ->getMock(); |
69 | 69 | |
70 | - $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) ); |
|
70 | + $mock->expects($this->once())->method('getOutput')->will($this->returnValue('test')); |
|
71 | 71 | |
72 | - $this->assertEquals( 'test', $mock->watchComponentAction() ); |
|
72 | + $this->assertEquals('test', $mock->watchComponentAction()); |
|
73 | 73 | } |
74 | 74 | } |