@@ -4,40 +4,40 @@ |
||
4 | 4 | |
5 | 5 | 'apc_enabled' => false, |
6 | 6 | 'apc_prefix' => 'laravel:', |
7 | - 'extdir' => base_path('ext'), |
|
7 | + 'extdir' => base_path( 'ext' ), |
|
8 | 8 | 'pcntl_max' => 4, |
9 | 9 | 'pcntl_priority' => 19, |
10 | 10 | 'uploaddir' => '/', |
11 | 11 | |
12 | 12 | 'page' => array( |
13 | - 'account-index' => array( 'account/profile','account/subscription','account/history','account/favorite','account/watch','basket/mini','catalog/session' ), |
|
14 | - 'basket-index' => array( 'basket/standard','basket/related' ), |
|
13 | + 'account-index' => array( 'account/profile', 'account/subscription', 'account/history', 'account/favorite', 'account/watch', 'basket/mini', 'catalog/session' ), |
|
14 | + 'basket-index' => array( 'basket/standard', 'basket/related' ), |
|
15 | 15 | 'catalog-count' => array( 'catalog/count' ), |
16 | - 'catalog-detail' => array( 'basket/mini','catalog/stage','catalog/detail','catalog/session' ), |
|
17 | - 'catalog-list' => array( 'basket/mini','catalog/filter','catalog/lists' ), |
|
16 | + 'catalog-detail' => array( 'basket/mini', 'catalog/stage', 'catalog/detail', 'catalog/session' ), |
|
17 | + 'catalog-list' => array( 'basket/mini', 'catalog/filter', 'catalog/lists' ), |
|
18 | 18 | 'catalog-stock' => array( 'catalog/stock' ), |
19 | 19 | 'catalog-suggest' => array( 'catalog/suggest' ), |
20 | - 'catalog-tree' => array( 'basket/mini','catalog/filter','catalog/stage','catalog/lists' ), |
|
20 | + 'catalog-tree' => array( 'basket/mini', 'catalog/filter', 'catalog/stage', 'catalog/lists' ), |
|
21 | 21 | 'checkout-confirm' => array( 'checkout/confirm' ), |
22 | 22 | 'checkout-index' => array( 'checkout/standard' ), |
23 | - 'checkout-update' => array( 'checkout/update'), |
|
23 | + 'checkout-update' => array( 'checkout/update' ), |
|
24 | 24 | ), |
25 | 25 | |
26 | 26 | 'resource' => array( |
27 | 27 | 'db' => array( |
28 | - 'adapter' => config('database.connections.mysql.driver', 'mysql'), |
|
29 | - 'host' => config('database.connections.mysql.host', '127.0.0.1'), |
|
30 | - 'port' => config('database.connections.mysql.port', '3306'), |
|
31 | - 'socket' => config('database.connections.mysql.unix_socket', ''), |
|
32 | - 'database' => config('database.connections.mysql.database', 'forge'), |
|
33 | - 'username' => config('database.connections.mysql.username', 'forge'), |
|
34 | - 'password' => config('database.connections.mysql.password', ''), |
|
28 | + 'adapter' => config( 'database.connections.mysql.driver', 'mysql' ), |
|
29 | + 'host' => config( 'database.connections.mysql.host', '127.0.0.1' ), |
|
30 | + 'port' => config( 'database.connections.mysql.port', '3306' ), |
|
31 | + 'socket' => config( 'database.connections.mysql.unix_socket', '' ), |
|
32 | + 'database' => config( 'database.connections.mysql.database', 'forge' ), |
|
33 | + 'username' => config( 'database.connections.mysql.username', 'forge' ), |
|
34 | + 'password' => config( 'database.connections.mysql.password', '' ), |
|
35 | 35 | 'stmt' => ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'"], |
36 | 36 | 'opt-persistent' => 0, |
37 | 37 | 'limit' => 3, |
38 | 38 | 'defaultTableOptions' => [ |
39 | - 'charset' => config('database.connections.mysql.charset'), |
|
40 | - 'collate' => config('database.connections.mysql.collation'), |
|
39 | + 'charset' => config( 'database.connections.mysql.charset' ), |
|
40 | + 'collate' => config( 'database.connections.mysql.collation' ), |
|
41 | 41 | ], |
42 | 42 | ), |
43 | 43 | 'fs' => array( |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | @section('aimeos_scripts') |
4 | 4 | @parent |
5 | - <script type="text/javascript" src="<?php echo asset('packages/aimeos/shop/themes/aimeos-detail.js'); ?>"></script> |
|
5 | + <script type="text/javascript" src="<?php echo asset( 'packages/aimeos/shop/themes/aimeos-detail.js' ); ?>"></script> |
|
6 | 6 | @stop |
7 | 7 | |
8 | 8 | @section('aimeos_header') |
@@ -36,6 +36,6 @@ |
||
36 | 36 | $params['aibody'][$name] = Shop::get( $name )->getBody(); |
37 | 37 | } |
38 | 38 | |
39 | - return Response::view('shop::basket.index', $params)->header('Cache-Control', 'no-store'); |
|
39 | + return Response::view( 'shop::basket.index', $params )->header( 'Cache-Control', 'no-store' ); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $params['aibody'][$name] = Shop::get( $name )->getBody(); |
37 | 37 | } |
38 | 38 | |
39 | - return Response::view('shop::account.index', $params); |
|
39 | + return Response::view( 'shop::account.index', $params ); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 |
@@ -4,33 +4,33 @@ |
||
4 | 4 | { |
5 | 5 | public function testConfirmAction() |
6 | 6 | { |
7 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
7 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
8 | 8 | |
9 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@confirmAction', ['site' => 'unittest']); |
|
9 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@confirmAction', ['site' => 'unittest'] ); |
|
10 | 10 | |
11 | 11 | $this->assertResponseOk(); |
12 | - $this->assertContains('<section class="aimeos checkout-confirm"', $response->getContent()); |
|
12 | + $this->assertContains( '<section class="aimeos checkout-confirm"', $response->getContent() ); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | |
16 | 16 | public function testIndexAction() |
17 | 17 | { |
18 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
18 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
19 | 19 | |
20 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest']); |
|
20 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest'] ); |
|
21 | 21 | |
22 | 22 | $this->assertResponseOk(); |
23 | - $this->assertContains('<section class="checkout-standard-address"', $response->getContent()); |
|
23 | + $this->assertContains( '<section class="checkout-standard-address"', $response->getContent() ); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | |
27 | 27 | public function testUpdateAction() |
28 | 28 | { |
29 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
29 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
30 | 30 | |
31 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress']); |
|
31 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress'] ); |
|
32 | 32 | |
33 | 33 | $this->assertResponseOk(); |
34 | - $this->assertEquals('', $response->getContent()); |
|
34 | + $this->assertEquals( '', $response->getContent() ); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | \ No newline at end of file |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | { |
5 | 5 | public function testOptionsAction() |
6 | 6 | { |
7 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
7 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
8 | 8 | |
9 | 9 | $params = ['site' => 'unittest']; |
10 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonapiController@optionsAction', $params); |
|
10 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonapiController@optionsAction', $params ); |
|
11 | 11 | |
12 | 12 | $json = json_decode( $response->getContent(), true ); |
13 | 13 | |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | |
21 | 21 | public function testGetAction() |
22 | 22 | { |
23 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
23 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
24 | 24 | |
25 | 25 | $params = ['site' => 'unittest', 'resource' => 'product']; |
26 | 26 | $getParams = ['filter' => ['f_search' => 'Cafe Noire Cap']]; |
27 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams); |
|
27 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams ); |
|
28 | 28 | |
29 | 29 | $json = json_decode( $response->getContent(), true ); |
30 | 30 | |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | $id = $json['data'][0]['id']; |
39 | 39 | |
40 | 40 | |
41 | - $params = ['site' => 'unittest', 'resource' => 'product', 'id' => $id ]; |
|
42 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params); |
|
41 | + $params = ['site' => 'unittest', 'resource' => 'product', 'id' => $id]; |
|
42 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params ); |
|
43 | 43 | |
44 | 44 | $json = json_decode( $response->getContent(), true ); |
45 | 45 | |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | |
54 | 54 | public function testPostPatchDeleteAction() |
55 | 55 | { |
56 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
56 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
57 | 57 | |
58 | 58 | // get CNC product |
59 | 59 | $params = ['site' => 'unittest', 'resource' => 'product']; |
60 | 60 | $getParams = ['filter' => ['f_search' => 'Cafe Noire Cap', 'f_listtype' => 'unittype19']]; |
61 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams); |
|
61 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams ); |
|
62 | 62 | |
63 | 63 | $json = json_decode( $response->getContent(), true ); |
64 | 64 | $this->assertEquals( 'CNC', $json['data'][0]['attributes']['product.code'] ); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // add CNC product to basket |
67 | 67 | $params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product']; |
68 | 68 | $content = json_encode( ['data' => ['attributes' => ['product.id' => $json['data'][0]['id']]]] ); |
69 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JsonapiController@postAction', $params, [], [], [], [], $content); |
|
69 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonapiController@postAction', $params, [], [], [], [], $content ); |
|
70 | 70 | |
71 | 71 | $json = json_decode( $response->getContent(), true ); |
72 | 72 | $this->assertEquals( 'CNC', $json['included'][0]['attributes']['order.base.product.prodcode'] ); |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | // change product quantity in basket |
75 | 75 | $params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product', 'relatedid' => 0]; |
76 | 76 | $content = json_encode( ['data' => ['attributes' => ['quantity' => 2]]] ); |
77 | - $response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonapiController@patchAction', $params, [], [], [], [], $content); |
|
77 | + $response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonapiController@patchAction', $params, [], [], [], [], $content ); |
|
78 | 78 | |
79 | 79 | $json = json_decode( $response->getContent(), true ); |
80 | 80 | $this->assertEquals( 2, $json['included'][0]['attributes']['order.base.product.quantity'] ); |
81 | 81 | |
82 | 82 | // delete product from basket |
83 | 83 | $params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product', 'relatedid' => 0]; |
84 | - $response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonapiController@deleteAction', $params); |
|
84 | + $response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonapiController@deleteAction', $params ); |
|
85 | 85 | |
86 | 86 | $json = json_decode( $response->getContent(), true ); |
87 | 87 | $this->assertEquals( 0, count( $json['included'] ) ); |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | |
91 | 91 | public function testPutAction() |
92 | 92 | { |
93 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
93 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
94 | 94 | |
95 | 95 | $params = ['site' => 'unittest', 'resource' => 'basket']; |
96 | - $response = $this->action('PUT', '\Aimeos\Shop\Controller\JsonapiController@putAction', $params); |
|
96 | + $response = $this->action( 'PUT', '\Aimeos\Shop\Controller\JsonapiController@putAction', $params ); |
|
97 | 97 | |
98 | 98 | $json = json_decode( $response->getContent(), true ); |
99 | 99 | $this->assertArrayHasKey( 'errors', $json ); |
@@ -4,18 +4,18 @@ |
||
4 | 4 | { |
5 | 5 | public function testPrivacyAction() |
6 | 6 | { |
7 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
7 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
8 | 8 | |
9 | - $this->action('GET', '\Aimeos\Shop\Controller\PageController@privacyAction', ['site' => 'unittest']); |
|
9 | + $this->action( 'GET', '\Aimeos\Shop\Controller\PageController@privacyAction', ['site' => 'unittest'] ); |
|
10 | 10 | $this->assertResponseOk(); |
11 | 11 | } |
12 | 12 | |
13 | 13 | |
14 | 14 | public function testTermsAction() |
15 | 15 | { |
16 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
16 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
17 | 17 | |
18 | - $this->action('GET', '\Aimeos\Shop\Controller\PageController@termsAction', ['site' => 'unittest']); |
|
18 | + $this->action( 'GET', '\Aimeos\Shop\Controller\PageController@termsAction', ['site' => 'unittest'] ); |
|
19 | 19 | $this->assertResponseOk(); |
20 | 20 | } |
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | { |
5 | 5 | public function testOptionsActionSite() |
6 | 6 | { |
7 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
7 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
8 | 8 | |
9 | 9 | $params = ['site' => 'invalid', 'resource' => 'product']; |
10 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params); |
|
10 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params ); |
|
11 | 11 | |
12 | 12 | $json = json_decode( $response->getContent(), true ); |
13 | 13 | |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | |
19 | 19 | public function testOptionsAction() |
20 | 20 | { |
21 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
21 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
22 | 22 | |
23 | 23 | $params = ['site' => 'unittest', 'resource' => 'product']; |
24 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params); |
|
24 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params ); |
|
25 | 25 | |
26 | 26 | $json = json_decode( $response->getContent(), true ); |
27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | |
34 | 34 | $params = ['site' => 'unittest']; |
35 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params); |
|
35 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params ); |
|
36 | 36 | |
37 | 37 | $json = json_decode( $response->getContent(), true ); |
38 | 38 | |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | |
46 | 46 | public function testActionsSingle() |
47 | 47 | { |
48 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
48 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
49 | 49 | |
50 | 50 | $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
51 | 51 | $content = '{"data":{"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}}'; |
52 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content); |
|
52 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content ); |
|
53 | 53 | |
54 | 54 | $json = json_decode( $response->getContent(), true ); |
55 | 55 | |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | $id = $json['data']['attributes']['stock.type.id']; |
64 | 64 | |
65 | 65 | |
66 | - $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ]; |
|
66 | + $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id]; |
|
67 | 67 | $content = '{"data":{"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel2"}}}'; |
68 | - $response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content); |
|
68 | + $response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content ); |
|
69 | 69 | |
70 | 70 | $json = json_decode( $response->getContent(), true ); |
71 | 71 | |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | $this->assertEquals( 1, $json['meta']['total'] ); |
79 | 79 | |
80 | 80 | |
81 | - $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ]; |
|
82 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params); |
|
81 | + $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id]; |
|
82 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params ); |
|
83 | 83 | |
84 | 84 | $json = json_decode( $response->getContent(), true ); |
85 | 85 | |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | $this->assertEquals( 1, $json['meta']['total'] ); |
93 | 93 | |
94 | 94 | |
95 | - $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ]; |
|
96 | - $response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params); |
|
95 | + $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id]; |
|
96 | + $response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params ); |
|
97 | 97 | |
98 | 98 | $json = json_decode( $response->getContent(), true ); |
99 | 99 | |
@@ -105,14 +105,14 @@ discard block |
||
105 | 105 | |
106 | 106 | public function testActionsBulk() |
107 | 107 | { |
108 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
108 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
109 | 109 | |
110 | 110 | $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
111 | 111 | $content = '{"data":[ |
112 | 112 | {"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}, |
113 | 113 | {"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel"}} |
114 | 114 | ]}'; |
115 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content); |
|
115 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content ); |
|
116 | 116 | |
117 | 117 | $json = json_decode( $response->getContent(), true ); |
118 | 118 | |
@@ -128,12 +128,12 @@ discard block |
||
128 | 128 | $ids = array( $json['data'][0]['attributes']['stock.type.id'], $json['data'][1]['attributes']['stock.type.id'] ); |
129 | 129 | |
130 | 130 | |
131 | - $params = ['site' => 'unittest', 'resource' => 'stock/type' ]; |
|
131 | + $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
|
132 | 132 | $content = '{"data":[ |
133 | 133 | {"type":"stock/type","id":' . $ids[0] . ',"attributes":{"stock.type.label":"laravel2"}}, |
134 | 134 | {"type":"stock/type","id":' . $ids[1] . ',"attributes":{"stock.type.label":"laravel2"}} |
135 | 135 | ]}'; |
136 | - $response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content); |
|
136 | + $response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content ); |
|
137 | 137 | |
138 | 138 | $json = json_decode( $response->getContent(), true ); |
139 | 139 | |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | $this->assertEquals( 2, $json['meta']['total'] ); |
150 | 150 | |
151 | 151 | |
152 | - $params = ['site' => 'unittest', 'resource' => 'stock/type' ]; |
|
152 | + $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
|
153 | 153 | $getParams = ['filter' => ['&&' => [ |
154 | 154 | ['=~' => ['stock.type.code' => 'laravel']], |
155 | 155 | ['==' => ['stock.type.label' => 'laravel2']] |
156 | 156 | ]], |
157 | 157 | 'sort' => 'stock.type.code', 'page' => ['offset' => 0, 'limit' => 3] |
158 | 158 | ]; |
159 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params, $getParams); |
|
159 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params, $getParams ); |
|
160 | 160 | |
161 | 161 | $json = json_decode( $response->getContent(), true ); |
162 | 162 | |
@@ -172,12 +172,12 @@ discard block |
||
172 | 172 | $this->assertEquals( 2, $json['meta']['total'] ); |
173 | 173 | |
174 | 174 | |
175 | - $params = ['site' => 'unittest', 'resource' => 'stock/type' ]; |
|
175 | + $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
|
176 | 176 | $content = '{"data":[ |
177 | 177 | {"type":"stock/type","id":' . $ids[0] . '}, |
178 | 178 | {"type":"stock/type","id":' . $ids[1] . '} |
179 | 179 | ]}'; |
180 | - $response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params, [], [], [], [], $content); |
|
180 | + $response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params, [], [], [], [], $content ); |
|
181 | 181 | |
182 | 182 | $json = json_decode( $response->getContent(), true ); |
183 | 183 | |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | |
190 | 190 | public function testPutAction() |
191 | 191 | { |
192 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
192 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
193 | 193 | |
194 | 194 | $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
195 | 195 | $content = '{"data":[ |
196 | 196 | {"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}, |
197 | 197 | {"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel"}} |
198 | 198 | ]}'; |
199 | - $response = $this->action('PUT', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content); |
|
199 | + $response = $this->action( 'PUT', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content ); |
|
200 | 200 | |
201 | 201 | $json = json_decode( $response->getContent(), true ); |
202 | 202 |
@@ -4,72 +4,72 @@ |
||
4 | 4 | { |
5 | 5 | public function testCountAction() |
6 | 6 | { |
7 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
7 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
8 | 8 | |
9 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CatalogController@countAction', ['site' => 'unittest']); |
|
9 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CatalogController@countAction', ['site' => 'unittest'] ); |
|
10 | 10 | |
11 | 11 | $this->assertResponseOk(); |
12 | - $this->assertContains('.catalog-filter-count', $response->getContent()); |
|
13 | - $this->assertContains('.catalog-filter-attribute', $response->getContent()); |
|
12 | + $this->assertContains( '.catalog-filter-count', $response->getContent() ); |
|
13 | + $this->assertContains( '.catalog-filter-attribute', $response->getContent() ); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | |
17 | 17 | public function testDetailAction() |
18 | 18 | { |
19 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
19 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
20 | 20 | |
21 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CatalogController@detailAction', ['site' => 'unittest', 'pin_action' => 'add', 'pin_id' => 0]); |
|
21 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CatalogController@detailAction', ['site' => 'unittest', 'pin_action' => 'add', 'pin_id' => 0] ); |
|
22 | 22 | |
23 | 23 | $this->assertResponseOk(); |
24 | - $this->assertContains('<section class="aimeos catalog-stage"', $response->getContent()); |
|
25 | - $this->assertContains('<section class="aimeos catalog-detail"', $response->getContent()); |
|
26 | - $this->assertContains('<section class="aimeos catalog-session"', $response->getContent()); |
|
24 | + $this->assertContains( '<section class="aimeos catalog-stage"', $response->getContent() ); |
|
25 | + $this->assertContains( '<section class="aimeos catalog-detail"', $response->getContent() ); |
|
26 | + $this->assertContains( '<section class="aimeos catalog-session"', $response->getContent() ); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | 30 | public function testListAction() |
31 | 31 | { |
32 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
32 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
33 | 33 | |
34 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CatalogController@listAction', ['site' => 'unittest']); |
|
34 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CatalogController@listAction', ['site' => 'unittest'] ); |
|
35 | 35 | |
36 | 36 | $this->assertResponseOk(); |
37 | - $this->assertContains('<section class="aimeos catalog-filter"', $response->getContent()); |
|
38 | - $this->assertContains('<section class="aimeos catalog-list"', $response->getContent()); |
|
37 | + $this->assertContains( '<section class="aimeos catalog-filter"', $response->getContent() ); |
|
38 | + $this->assertContains( '<section class="aimeos catalog-list"', $response->getContent() ); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | |
42 | 42 | public function testStockAction() |
43 | 43 | { |
44 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
44 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
45 | 45 | |
46 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CatalogController@stockAction', ['site' => 'unittest']); |
|
46 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CatalogController@stockAction', ['site' => 'unittest'] ); |
|
47 | 47 | |
48 | 48 | $this->assertResponseOk(); |
49 | - $this->assertContains('.aimeos .product .stock', $response->getContent()); |
|
49 | + $this->assertContains( '.aimeos .product .stock', $response->getContent() ); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | |
53 | 53 | public function testSuggestAction() |
54 | 54 | { |
55 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
55 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
56 | 56 | |
57 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CatalogController@suggestAction', ['site' => 'unittest'], ['f_search' => 'Cafe']); |
|
57 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CatalogController@suggestAction', ['site' => 'unittest'], ['f_search' => 'Cafe'] ); |
|
58 | 58 | |
59 | 59 | $this->assertResponseOk(); |
60 | - $this->assertRegexp('/[{.*}]/', $response->getContent()); |
|
60 | + $this->assertRegexp( '/[{.*}]/', $response->getContent() ); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | |
64 | 64 | public function testTreeAction() |
65 | 65 | { |
66 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
66 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
67 | 67 | |
68 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CatalogController@treeAction', ['site' => 'unittest', 'f_catid' => 1, 'f_name' => 'test']); |
|
68 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CatalogController@treeAction', ['site' => 'unittest', 'f_catid' => 1, 'f_name' => 'test'] ); |
|
69 | 69 | |
70 | 70 | $this->assertResponseOk(); |
71 | - $this->assertContains('<section class="aimeos catalog-filter', $response->getContent()); |
|
72 | - $this->assertContains('<section class="aimeos catalog-stage', $response->getContent()); |
|
73 | - $this->assertContains('<section class="aimeos catalog-list', $response->getContent()); |
|
71 | + $this->assertContains( '<section class="aimeos catalog-filter', $response->getContent() ); |
|
72 | + $this->assertContains( '<section class="aimeos catalog-stage', $response->getContent() ); |
|
73 | + $this->assertContains( '<section class="aimeos catalog-list', $response->getContent() ); |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | \ No newline at end of file |