@@ -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 |
@@ -4,23 +4,23 @@ |
||
4 | 4 | { |
5 | 5 | public function testActions() |
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\AccountController@indexAction', ['site' => 'unittest']); |
|
9 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\AccountController@indexAction', ['site' => 'unittest'] ); |
|
10 | 10 | |
11 | 11 | $this->assertResponseOk(); |
12 | - $this->assertContains('<section class="aimeos account-profile"', $response->getContent()); |
|
13 | - $this->assertContains('<section class="aimeos account-history"', $response->getContent()); |
|
14 | - $this->assertContains('<section class="aimeos account-favorite"', $response->getContent()); |
|
15 | - $this->assertContains('<section class="aimeos account-watch"', $response->getContent()); |
|
12 | + $this->assertContains( '<section class="aimeos account-profile"', $response->getContent() ); |
|
13 | + $this->assertContains( '<section class="aimeos account-history"', $response->getContent() ); |
|
14 | + $this->assertContains( '<section class="aimeos account-favorite"', $response->getContent() ); |
|
15 | + $this->assertContains( '<section class="aimeos account-watch"', $response->getContent() ); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
19 | 19 | public function testDownload() |
20 | 20 | { |
21 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
21 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
22 | 22 | |
23 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\AccountController@downloadAction', ['site' => 'unittest', 'dl_id' => 0]); |
|
23 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\AccountController@downloadAction', ['site' => 'unittest', 'dl_id' => 0] ); |
|
24 | 24 | |
25 | 25 | $this->assertEquals( 401, $response->getStatusCode() ); |
26 | 26 | } |
@@ -4,32 +4,32 @@ discard block |
||
4 | 4 | { |
5 | 5 | public function testFileActionCss() |
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\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'css']); |
|
9 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'css'] ); |
|
10 | 10 | |
11 | 11 | $this->assertResponseOk(); |
12 | - $this->assertContains('.aimeos', $response->getContent()); |
|
12 | + $this->assertContains( '.aimeos', $response->getContent() ); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | |
16 | 16 | public function testFileActionJs() |
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\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'js']); |
|
20 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'js'] ); |
|
21 | 21 | |
22 | 22 | $this->assertResponseOk(); |
23 | - $this->assertContains('Aimeos = {', $response->getContent()); |
|
23 | + $this->assertContains( 'Aimeos = {', $response->getContent() ); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | |
27 | 27 | public function testCopyAction() |
28 | 28 | { |
29 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
29 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
30 | 30 | |
31 | 31 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
32 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@copyAction', $params); |
|
32 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@copyAction', $params ); |
|
33 | 33 | |
34 | 34 | $this->assertEquals( 200, $response->getStatusCode() ); |
35 | 35 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | |
39 | 39 | public function testCreateAction() |
40 | 40 | { |
41 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
41 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
42 | 42 | |
43 | 43 | $params = ['site' => 'unittest', 'resource' => 'product']; |
44 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@createAction', $params); |
|
44 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@createAction', $params ); |
|
45 | 45 | |
46 | 46 | $this->assertEquals( 200, $response->getStatusCode() ); |
47 | 47 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | |
51 | 51 | public function testDeleteAction() |
52 | 52 | { |
53 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
53 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
54 | 54 | |
55 | 55 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
56 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@deleteAction', $params); |
|
56 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@deleteAction', $params ); |
|
57 | 57 | |
58 | 58 | $this->assertEquals( 200, $response->getStatusCode() ); |
59 | 59 | $this->assertContains( 'list-items', $response->getContent() ); |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | |
63 | 63 | public function testExportAction() |
64 | 64 | { |
65 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
65 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
66 | 66 | |
67 | 67 | $params = ['site' => 'unittest', 'resource' => 'order']; |
68 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@exportAction', $params); |
|
68 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@exportAction', $params ); |
|
69 | 69 | |
70 | 70 | $this->assertEquals( 200, $response->getStatusCode() ); |
71 | 71 | $this->assertContains( 'list-items', $response->getContent() ); |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | |
75 | 75 | public function testGetAction() |
76 | 76 | { |
77 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
77 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
78 | 78 | |
79 | 79 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
80 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@getAction', $params); |
|
80 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@getAction', $params ); |
|
81 | 81 | |
82 | 82 | $this->assertEquals( 200, $response->getStatusCode() ); |
83 | 83 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | |
87 | 87 | public function testSaveAction() |
88 | 88 | { |
89 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
89 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
90 | 90 | |
91 | 91 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
92 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JqadmController@saveAction', $params); |
|
92 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JqadmController@saveAction', $params ); |
|
93 | 93 | |
94 | 94 | $this->assertEquals( 200, $response->getStatusCode() ); |
95 | 95 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | |
99 | 99 | public function testSearchAction() |
100 | 100 | { |
101 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
101 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
102 | 102 | |
103 | 103 | $params = ['site' => 'unittest', 'resource' => 'product']; |
104 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params); |
|
104 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params ); |
|
105 | 105 | |
106 | 106 | $this->assertEquals( 200, $response->getStatusCode() ); |
107 | 107 | $this->assertContains( 'list-items', $response->getContent() ); |
@@ -110,10 +110,10 @@ discard block |
||
110 | 110 | |
111 | 111 | public function testSearchActionSite() |
112 | 112 | { |
113 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
113 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
114 | 114 | |
115 | 115 | $params = ['site' => 'invalid', 'resource' => 'product']; |
116 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params); |
|
116 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params ); |
|
117 | 117 | |
118 | 118 | $this->assertEquals( 500, $response->getStatusCode() ); |
119 | 119 | } |
@@ -4,12 +4,12 @@ |
||
4 | 4 | { |
5 | 5 | public function testActions() |
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\BasketController@indexAction', ['site' => 'unittest']); |
|
9 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\BasketController@indexAction', ['site' => 'unittest'] ); |
|
10 | 10 | |
11 | 11 | $this->assertResponseOk(); |
12 | - $this->assertContains('<section class="aimeos basket-standard"', $response->getContent()); |
|
13 | - $this->assertContains('<section class="aimeos basket-related"', $response->getContent()); |
|
12 | + $this->assertContains( '<section class="aimeos basket-standard"', $response->getContent() ); |
|
13 | + $this->assertContains( '<section class="aimeos basket-related"', $response->getContent() ); |
|
14 | 14 | } |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -16,13 +16,13 @@ |
||
16 | 16 | */ |
17 | 17 | class Order extends \Illuminate\Support\Facades\Facade |
18 | 18 | { |
19 | - /** |
|
20 | - * Returns a new order frontend controller object |
|
21 | - * |
|
22 | - * @return \Aimeos\Controller\Frontend\Order\Iface |
|
23 | - */ |
|
24 | - protected static function getFacadeAccessor() |
|
25 | - { |
|
26 | - return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'order' ); |
|
27 | - } |
|
19 | + /** |
|
20 | + * Returns a new order frontend controller object |
|
21 | + * |
|
22 | + * @return \Aimeos\Controller\Frontend\Order\Iface |
|
23 | + */ |
|
24 | + protected static function getFacadeAccessor() |
|
25 | + { |
|
26 | + return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'order' ); |
|
27 | + } |
|
28 | 28 | } |
@@ -16,13 +16,13 @@ |
||
16 | 16 | */ |
17 | 17 | class Stock extends \Illuminate\Support\Facades\Facade |
18 | 18 | { |
19 | - /** |
|
20 | - * Returns a new stock frontend controller object |
|
21 | - * |
|
22 | - * @return \Aimeos\Controller\Frontend\Stock\Iface |
|
23 | - */ |
|
24 | - protected static function getFacadeAccessor() |
|
25 | - { |
|
26 | - return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'stock' ); |
|
27 | - } |
|
19 | + /** |
|
20 | + * Returns a new stock frontend controller object |
|
21 | + * |
|
22 | + * @return \Aimeos\Controller\Frontend\Stock\Iface |
|
23 | + */ |
|
24 | + protected static function getFacadeAccessor() |
|
25 | + { |
|
26 | + return \Aimeos\Controller\Frontend::create( app( 'aimeos.context' )->get(), 'stock' ); |
|
27 | + } |
|
28 | 28 | } |