Completed
Push — master ( 76ac09...8c1d79 )
by Aimeos
04:15
created
Tests/Controller/CheckoutControllerTest.php 1 patch
Spacing   +156 added lines, -156 removed lines patch added patch discarded remove patch
@@ -12,66 +12,66 @@  discard block
 block discarded – undo
12 12
 		$client = static::createClient(array(), array(
13 13
 			'PHP_AUTH_USER' => 'UTC001',
14 14
 			'PHP_AUTH_PW'   => 'unittest',
15
-		) );
15
+		));
16 16
 
17
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
17
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
18 18
 
19
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
20
-		$crawler = $client->click( $link );
19
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
20
+		$crawler = $client->click($link);
21 21
 
22
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
23
-		$crawler = $client->submit( $form );
22
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
23
+		$crawler = $client->submit($form);
24 24
 
25
-		$link = $crawler->filter( '.basket-standard .btn-action' )->link();
26
-		$crawler = $client->click( $link );
25
+		$link = $crawler->filter('.basket-standard .btn-action')->link();
26
+		$crawler = $client->click($link);
27 27
 
28
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .current:contains("Adresse")' )->count() );
29
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .basket a' )->count() );
30
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .address a' )->count() );
31
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .delivery a' )->count() );
32
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .payment a' )->count() );
33
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .summary a' )->count() );
28
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .current:contains("Adresse")')->count());
29
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .basket a')->count());
30
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .address a')->count());
31
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .delivery a')->count());
32
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .payment a')->count());
33
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .summary a')->count());
34 34
 
35 35
 
36
-		$form = $crawler->filter( '.checkout-standard form' )->form();
37
-		$form['ca_billingoption']->select( $crawler->filter( '.checkout-standard-address .item-address input' )->attr( 'value' ) );
38
-		$crawler = $client->submit( $form );
36
+		$form = $crawler->filter('.checkout-standard form')->form();
37
+		$form['ca_billingoption']->select($crawler->filter('.checkout-standard-address .item-address input')->attr('value'));
38
+		$crawler = $client->submit($form);
39 39
 
40
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .basket a' )->count() );
41
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .address a' )->count() );
42
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .current:contains("Versand")' )->count() );
43
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .delivery a' )->count() );
44
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .payment a' )->count() );
45
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .summary a' )->count() );
40
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .basket a')->count());
41
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .address a')->count());
42
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .current:contains("Versand")')->count());
43
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .delivery a')->count());
44
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .payment a')->count());
45
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .summary a')->count());
46 46
 
47 47
 
48
-		$form = $crawler->filter( '.checkout-standard form' )->form();
49
-		$form['c_deliveryoption']->select( $crawler->filter( '.checkout-standard-delivery .item-service input' )->attr( 'value' ) );
50
-		$crawler = $client->submit( $form );
48
+		$form = $crawler->filter('.checkout-standard form')->form();
49
+		$form['c_deliveryoption']->select($crawler->filter('.checkout-standard-delivery .item-service input')->attr('value'));
50
+		$crawler = $client->submit($form);
51 51
 
52
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .basket a' )->count() );
53
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .address a' )->count() );
54
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .delivery a' )->count() );
55
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .current:contains("Zahlung")' )->count() );
56
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .payment a' )->count() );
57
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .summary a' )->count() );
52
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .basket a')->count());
53
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .address a')->count());
54
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .delivery a')->count());
55
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .current:contains("Zahlung")')->count());
56
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .payment a')->count());
57
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .summary a')->count());
58 58
 
59 59
 
60
-		$form = $crawler->filter( '.checkout-standard form' )->form();
61
-		$form['c_paymentoption']->select( $crawler->filter( '.checkout-standard-payment .item-service input' )->attr( 'value' ) );
62
-		$crawler = $client->submit( $form );
60
+		$form = $crawler->filter('.checkout-standard form')->form();
61
+		$form['c_paymentoption']->select($crawler->filter('.checkout-standard-payment .item-service input')->attr('value'));
62
+		$crawler = $client->submit($form);
63 63
 
64
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .basket a' )->count() );
65
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .address a' )->count() );
66
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .delivery a' )->count() );
67
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .payment a' )->count() );
68
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard .steps .current:contains("Übersicht")' )->count() );
69
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps .summary a' )->count() );
64
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .basket a')->count());
65
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .address a')->count());
66
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .delivery a')->count());
67
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .payment a')->count());
68
+		$this->assertEquals(1, $crawler->filter('.checkout-standard .steps .current:contains("Übersicht")')->count());
69
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps .summary a')->count());
70 70
 
71 71
 
72
-		$link = $crawler->filter( '.checkout-standard .steps .basket a' )->link();
73
-		$crawler = $client->click( $link );
74
-		$this->assertEquals( 0, $crawler->filter( '.checkout-standard .steps' )->count() );
72
+		$link = $crawler->filter('.checkout-standard .steps .basket a')->link();
73
+		$crawler = $client->click($link);
74
+		$this->assertEquals(0, $crawler->filter('.checkout-standard .steps')->count());
75 75
 	}
76 76
 
77 77
 
@@ -80,47 +80,47 @@  discard block
 block discarded – undo
80 80
 		$client = static::createClient(array(), array(
81 81
 			'PHP_AUTH_USER' => 'UTC001',
82 82
 			'PHP_AUTH_PW'   => 'unittest',
83
-		) );
83
+		));
84 84
 
85
-		$crawler = $this->_goToSummary( $client );
85
+		$crawler = $this->_goToSummary($client);
86 86
 
87
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
87
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
88 88
 
89 89
 
90
-		$link = $crawler->filter( '.checkout-standard .btn-back' )->link();
91
-		$crawler = $client->click( $link );
90
+		$link = $crawler->filter('.checkout-standard .btn-back')->link();
91
+		$crawler = $client->click($link);
92 92
 
93
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-payment' )->count() );
93
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-payment')->count());
94 94
 
95 95
 
96
-		$link = $crawler->filter( '.checkout-standard .btn-back' )->link();
97
-		$crawler = $client->click( $link );
96
+		$link = $crawler->filter('.checkout-standard .btn-back')->link();
97
+		$crawler = $client->click($link);
98 98
 
99
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-delivery' )->count() );
99
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-delivery')->count());
100 100
 
101 101
 
102
-		$link = $crawler->filter( '.checkout-standard .btn-back' )->link();
103
-		$crawler = $client->click( $link );
102
+		$link = $crawler->filter('.checkout-standard .btn-back')->link();
103
+		$crawler = $client->click($link);
104 104
 
105
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-address' )->count() );
105
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-address')->count());
106 106
 
107 107
 
108
-		$form = $crawler->filter( '.checkout-standard .btn-action' )->form();
109
-		$crawler = $client->submit( $form );
108
+		$form = $crawler->filter('.checkout-standard .btn-action')->form();
109
+		$crawler = $client->submit($form);
110 110
 
111
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-delivery' )->count() );
111
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-delivery')->count());
112 112
 
113 113
 
114
-		$form = $crawler->filter( '.checkout-standard .btn-action' )->form();
115
-		$crawler = $client->submit( $form );
114
+		$form = $crawler->filter('.checkout-standard .btn-action')->form();
115
+		$crawler = $client->submit($form);
116 116
 
117
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-payment' )->count() );
117
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-payment')->count());
118 118
 
119 119
 
120
-		$form = $crawler->filter( '.checkout-standard .btn-action' )->form();
121
-		$crawler = $client->submit( $form );
120
+		$form = $crawler->filter('.checkout-standard .btn-action')->form();
121
+		$crawler = $client->submit($form);
122 122
 
123
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
123
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
124 124
 	}
125 125
 
126 126
 
@@ -129,17 +129,17 @@  discard block
 block discarded – undo
129 129
 		$client = static::createClient(array(), array(
130 130
 			'PHP_AUTH_USER' => 'UTC001',
131 131
 			'PHP_AUTH_PW'   => 'unittest',
132
-		) );
132
+		));
133 133
 
134
-		$crawler = $this->_goToSummary( $client );
134
+		$crawler = $this->_goToSummary($client);
135 135
 
136
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
136
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
137 137
 
138 138
 
139
-		$link = $crawler->filter( '.checkout-standard .common-summary-address .payment .modify' )->link();
140
-		$crawler = $client->click( $link );
139
+		$link = $crawler->filter('.checkout-standard .common-summary-address .payment .modify')->link();
140
+		$crawler = $client->click($link);
141 141
 
142
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-address' )->count() );
142
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-address')->count());
143 143
 	}
144 144
 
145 145
 
@@ -148,17 +148,17 @@  discard block
 block discarded – undo
148 148
 		$client = static::createClient(array(), array(
149 149
 			'PHP_AUTH_USER' => 'UTC001',
150 150
 			'PHP_AUTH_PW'   => 'unittest',
151
-		) );
151
+		));
152 152
 
153
-		$crawler = $this->_goToSummary( $client );
153
+		$crawler = $this->_goToSummary($client);
154 154
 
155
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
155
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
156 156
 
157 157
 
158
-		$link = $crawler->filter( '.checkout-standard .common-summary-address .delivery .modify' )->link();
159
-		$crawler = $client->click( $link );
158
+		$link = $crawler->filter('.checkout-standard .common-summary-address .delivery .modify')->link();
159
+		$crawler = $client->click($link);
160 160
 
161
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-address' )->count() );
161
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-address')->count());
162 162
 	}
163 163
 
164 164
 
@@ -167,17 +167,17 @@  discard block
 block discarded – undo
167 167
 		$client = static::createClient(array(), array(
168 168
 			'PHP_AUTH_USER' => 'UTC001',
169 169
 			'PHP_AUTH_PW'   => 'unittest',
170
-		) );
170
+		));
171 171
 
172
-		$crawler = $this->_goToSummary( $client );
172
+		$crawler = $this->_goToSummary($client);
173 173
 
174
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
174
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
175 175
 
176 176
 
177
-		$link = $crawler->filter( '.checkout-standard .common-summary-service .delivery .modify' )->link();
178
-		$crawler = $client->click( $link );
177
+		$link = $crawler->filter('.checkout-standard .common-summary-service .delivery .modify')->link();
178
+		$crawler = $client->click($link);
179 179
 
180
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-delivery' )->count() );
180
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-delivery')->count());
181 181
 	}
182 182
 
183 183
 
@@ -186,17 +186,17 @@  discard block
 block discarded – undo
186 186
 		$client = static::createClient(array(), array(
187 187
 			'PHP_AUTH_USER' => 'UTC001',
188 188
 			'PHP_AUTH_PW'   => 'unittest',
189
-		) );
189
+		));
190 190
 
191
-		$crawler = $this->_goToSummary( $client );
191
+		$crawler = $this->_goToSummary($client);
192 192
 
193
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
193
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
194 194
 
195 195
 
196
-		$link = $crawler->filter( '.checkout-standard .common-summary-service .payment .modify' )->link();
197
-		$crawler = $client->click( $link );
196
+		$link = $crawler->filter('.checkout-standard .common-summary-service .payment .modify')->link();
197
+		$crawler = $client->click($link);
198 198
 
199
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-payment' )->count() );
199
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-payment')->count());
200 200
 	}
201 201
 
202 202
 
@@ -205,17 +205,17 @@  discard block
 block discarded – undo
205 205
 		$client = static::createClient(array(), array(
206 206
 			'PHP_AUTH_USER' => 'UTC001',
207 207
 			'PHP_AUTH_PW'   => 'unittest',
208
-		) );
208
+		));
209 209
 
210
-		$crawler = $this->_goToSummary( $client );
210
+		$crawler = $this->_goToSummary($client);
211 211
 
212
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
212
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
213 213
 
214 214
 
215
-		$link = $crawler->filter( '.checkout-standard .common-summary-detail .modify' )->link();
216
-		$crawler = $client->click( $link );
215
+		$link = $crawler->filter('.checkout-standard .common-summary-detail .modify')->link();
216
+		$crawler = $client->click($link);
217 217
 
218
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
218
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
219 219
 	}
220 220
 
221 221
 
@@ -224,51 +224,51 @@  discard block
 block discarded – undo
224 224
 		$client = static::createClient(array(), array(
225 225
 			'PHP_AUTH_USER' => 'UTC001',
226 226
 			'PHP_AUTH_PW'   => 'unittest',
227
-		) );
227
+		));
228 228
 
229
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
229
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
230 230
 
231
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
232
-		$crawler = $client->click( $link );
231
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
232
+		$crawler = $client->click($link);
233 233
 
234
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
235
-		$crawler = $client->submit( $form );
234
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
235
+		$crawler = $client->submit($form);
236 236
 
237
-		$link = $crawler->filter( '.basket-standard .btn-action' )->link();
238
-		$crawler = $client->click( $link );
237
+		$link = $crawler->filter('.basket-standard .btn-action')->link();
238
+		$crawler = $client->click($link);
239 239
 
240
-		$form = $crawler->filter( '.checkout-standard form' )->form();
241
-		$form['ca_billingoption']->select( $crawler->filter( '.checkout-standard-address .item-address input' )->attr( 'value' ) );
242
-		$crawler = $client->submit( $form );
240
+		$form = $crawler->filter('.checkout-standard form')->form();
241
+		$form['ca_billingoption']->select($crawler->filter('.checkout-standard-address .item-address input')->attr('value'));
242
+		$crawler = $client->submit($form);
243 243
 
244
-		$form = $crawler->filter( '.checkout-standard form' )->form();
245
-		$form['c_deliveryoption']->select( $crawler->filter( '.checkout-standard-delivery .item-service input' )->attr( 'value' ) );
246
-		$crawler = $client->submit( $form );
244
+		$form = $crawler->filter('.checkout-standard form')->form();
245
+		$form['c_deliveryoption']->select($crawler->filter('.checkout-standard-delivery .item-service input')->attr('value'));
246
+		$crawler = $client->submit($form);
247 247
 
248
-		$form = $crawler->filter( '.checkout-standard form' )->form();
249
-		$payId = $crawler->filter( '.checkout-standard-payment .item-service' )->eq( 1 )->filter( 'input' )->attr( 'value' );
250
-		$form['c_paymentoption']->select( $payId );
251
-		$form['c_payment[' . $payId . '][directdebit.accountowner]'] = 'test user';
252
-		$form['c_payment[' . $payId . '][directdebit.accountno]'] = '12345';
253
-		$form['c_payment[' . $payId . '][directdebit.bankcode]'] = '67890';
254
-		$form['c_payment[' . $payId . '][directdebit.bankname]'] = 'test bank';
255
-		$crawler = $client->submit( $form );
248
+		$form = $crawler->filter('.checkout-standard form')->form();
249
+		$payId = $crawler->filter('.checkout-standard-payment .item-service')->eq(1)->filter('input')->attr('value');
250
+		$form['c_paymentoption']->select($payId);
251
+		$form['c_payment['.$payId.'][directdebit.accountowner]'] = 'test user';
252
+		$form['c_payment['.$payId.'][directdebit.accountno]'] = '12345';
253
+		$form['c_payment['.$payId.'][directdebit.bankcode]'] = '67890';
254
+		$form['c_payment['.$payId.'][directdebit.bankname]'] = 'test bank';
255
+		$crawler = $client->submit($form);
256 256
 
257
-		$this->assertEquals( 1, $crawler->filter( '.checkout-standard-summary' )->count() );
257
+		$this->assertEquals(1, $crawler->filter('.checkout-standard-summary')->count());
258 258
 
259 259
 
260 260
 		// Test if T&C are not accepted
261
-		$form = $crawler->filter( '.checkout-standard .btn-action' )->form();
262
-		$crawler = $client->submit( $form );
261
+		$form = $crawler->filter('.checkout-standard .btn-action')->form();
262
+		$crawler = $client->submit($form);
263 263
 
264
-		$form = $crawler->filter( '.checkout-standard .btn-action' )->form();
264
+		$form = $crawler->filter('.checkout-standard .btn-action')->form();
265 265
 		$form['cs_option_terms_value']->tick();
266
-		$crawler = $client->submit( $form );
266
+		$crawler = $client->submit($form);
267 267
 
268
-		$form = $crawler->filter( '.checkout-standard .btn-action' )->form();
269
-		$crawler = $client->submit( $form );
268
+		$form = $crawler->filter('.checkout-standard .btn-action')->form();
269
+		$crawler = $client->submit($form);
270 270
 
271
-		$this->assertEquals( 1, $crawler->filter( '.checkout-confirm' )->count() );
271
+		$this->assertEquals(1, $crawler->filter('.checkout-confirm')->count());
272 272
 	}
273 273
 
274 274
 
@@ -276,48 +276,48 @@  discard block
 block discarded – undo
276 276
 	{
277 277
 		$client = static::createClient();
278 278
 
279
-		$client->request( 'GET', '/unittest/de/EUR/update' );
279
+		$client->request('GET', '/unittest/de/EUR/update');
280 280
 
281
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
281
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
282 282
 	}
283 283
 
284 284
 
285 285
 	public function testConfirmComponent()
286 286
 	{
287
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CheckoutController' )
288
-		->setMethods( array( 'getOutput' ) )
287
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CheckoutController')
288
+		->setMethods(array('getOutput'))
289 289
 		->disableOriginalConstructor()
290 290
 		->getMock();
291 291
 
292
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
292
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
293 293
 
294
-		$this->assertEquals( 'test', $mock->confirmComponentAction() );
294
+		$this->assertEquals('test', $mock->confirmComponentAction());
295 295
 	}
296 296
 
297 297
 
298 298
 	public function testStandardComponent()
299 299
 	{
300
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CheckoutController' )
301
-		->setMethods( array( 'getOutput' ) )
300
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CheckoutController')
301
+		->setMethods(array('getOutput'))
302 302
 		->disableOriginalConstructor()
303 303
 		->getMock();
304 304
 
305
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
305
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
306 306
 
307
-		$this->assertEquals( 'test', $mock->standardComponentAction() );
307
+		$this->assertEquals('test', $mock->standardComponentAction());
308 308
 	}
309 309
 
310 310
 
311 311
 	public function testUpdateComponent()
312 312
 	{
313
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CheckoutController' )
314
-		->setMethods( array( 'getOutput' ) )
313
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CheckoutController')
314
+		->setMethods(array('getOutput'))
315 315
 		->disableOriginalConstructor()
316 316
 		->getMock();
317 317
 
318
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
318
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
319 319
 
320
-		$this->assertEquals( 'test', $mock->updateComponentAction() );
320
+		$this->assertEquals('test', $mock->updateComponentAction());
321 321
 	}
322 322
 
323 323
 
@@ -327,30 +327,30 @@  discard block
 block discarded – undo
327 327
 	 * @param \Symfony\Bundle\FrameworkBundle\Client $client HTTP test client
328 328
 	 * @return \Symfony\Component\DomCrawler\Crawler Crawler HTTP crawler
329 329
 	 */
330
-	protected function _goToSummary( $client )
330
+	protected function _goToSummary($client)
331 331
 	{
332
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
332
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
333 333
 
334
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
335
-		$crawler = $client->click( $link );
334
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
335
+		$crawler = $client->click($link);
336 336
 
337
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
338
-		$crawler = $client->submit( $form );
337
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
338
+		$crawler = $client->submit($form);
339 339
 
340
-		$link = $crawler->filter( '.basket-standard .btn-action' )->link();
341
-		$crawler = $client->click( $link );
340
+		$link = $crawler->filter('.basket-standard .btn-action')->link();
341
+		$crawler = $client->click($link);
342 342
 
343
-		$form = $crawler->filter( '.checkout-standard form' )->form();
344
-		$form['ca_billingoption']->select( $crawler->filter( '.checkout-standard-address .item-address input' )->attr( 'value' ) );
345
-		$crawler = $client->submit( $form );
343
+		$form = $crawler->filter('.checkout-standard form')->form();
344
+		$form['ca_billingoption']->select($crawler->filter('.checkout-standard-address .item-address input')->attr('value'));
345
+		$crawler = $client->submit($form);
346 346
 
347
-		$form = $crawler->filter( '.checkout-standard form' )->form();
348
-		$form['c_deliveryoption']->select( $crawler->filter( '.checkout-standard-delivery .item-service input' )->attr( 'value' ) );
349
-		$crawler = $client->submit( $form );
347
+		$form = $crawler->filter('.checkout-standard form')->form();
348
+		$form['c_deliveryoption']->select($crawler->filter('.checkout-standard-delivery .item-service input')->attr('value'));
349
+		$crawler = $client->submit($form);
350 350
 
351
-		$form = $crawler->filter( '.checkout-standard form' )->form();
352
-		$form['c_paymentoption']->select( $crawler->filter( '.checkout-standard-payment .item-service input' )->attr( 'value' ) );
353
-		$crawler = $client->submit( $form );
351
+		$form = $crawler->filter('.checkout-standard form')->form();
352
+		$form['c_paymentoption']->select($crawler->filter('.checkout-standard-payment .item-service input')->attr('value'));
353
+		$crawler = $client->submit($form);
354 354
 
355 355
 		return $crawler;
356 356
 	}
Please login to merge, or discard this patch.
Tests/Controller/LocaleControllerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 {
10 10
 	public function testSelectComponent()
11 11
 	{
12
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\LocaleController' )
13
-			->setMethods( array( 'getOutput' ) )
12
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\LocaleController')
13
+			->setMethods(array('getOutput'))
14 14
 			->disableOriginalConstructor()
15 15
 			->getMock();
16 16
 
17
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
17
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
18 18
 
19
-		$this->assertEquals( 'test', $mock->selectComponentAction() );
19
+		$this->assertEquals('test', $mock->selectComponentAction());
20 20
 	}
21 21
 }
Please login to merge, or discard this patch.
Tests/Controller/AccountControllerTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -10,52 +10,52 @@
 block discarded – undo
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 testWatchComponent()
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->watchComponentAction() );
59
+		$this->assertEquals('test', $mock->watchComponentAction());
60 60
 	}
61 61
 }
Please login to merge, or discard this patch.
Tests/Controller/CatalogControllerTest.php 1 patch
Spacing   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -10,301 +10,301 @@
 block discarded – undo
10 10
 	public function testCount()
11 11
 	{
12 12
 		$client = static::createClient();
13
-		$client->request( 'GET', '/unittest/de/EUR/count' );
13
+		$client->request('GET', '/unittest/de/EUR/count');
14 14
 		$content = $client->getResponse()->getContent();
15 15
 
16
-		$this->assertContains( '".catalog-filter-count li.cat-item"', $content );
17
-		$this->assertContains( '".catalog-filter-attribute .attribute-lists li.attr-item"', $content );
16
+		$this->assertContains('".catalog-filter-count li.cat-item"', $content);
17
+		$this->assertContains('".catalog-filter-attribute .attribute-lists li.attr-item"', $content);
18 18
 	}
19 19
 
20 20
 
21 21
 	public function testFilterSearch()
22 22
 	{
23 23
 		$client = static::createClient();
24
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
24
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
25 25
 
26
-		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-search' )->count() );
26
+		$this->assertEquals(1, $crawler->filter('.catalog-filter-search')->count());
27 27
 
28
-		$form = $crawler->filter( '.catalog-filter-search button' )->form();
28
+		$form = $crawler->filter('.catalog-filter-search button')->form();
29 29
 		$form['f_search'] = 'Unit';
30
-		$crawler = $client->submit( $form );
30
+		$crawler = $client->submit($form);
31 31
 
32
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Test Selection")' )->count() );
33
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Empty Selection")' )->count() );
34
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->count() );
32
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Test Selection")')->count());
33
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Empty Selection")')->count());
34
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->count());
35 35
 	}
36 36
 
37 37
 
38 38
  	public function testFilterTree()
39 39
 	{
40 40
 		$client = static::createClient();
41
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
41
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
42 42
 
43
-		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-tree' )->count() );
43
+		$this->assertEquals(1, $crawler->filter('.catalog-filter-tree')->count());
44 44
 
45
-		$link = $crawler->filter( '.catalog-filter-tree a.cat-item' )->link();
46
-		$crawler = $client->click( $link );
45
+		$link = $crawler->filter('.catalog-filter-tree a.cat-item')->link();
46
+		$crawler = $client->click($link);
47 47
 
48
-		$link = $crawler->filter( '.catalog-filter-tree .categories a.cat-item' )->link();
49
-		$crawler = $client->click( $link );
48
+		$link = $crawler->filter('.catalog-filter-tree .categories a.cat-item')->link();
49
+		$crawler = $client->click($link);
50 50
 
51
-		$link = $crawler->filter( '.catalog-filter-tree .coffee a.cat-item' )->link();
52
-		$crawler = $client->click( $link );
51
+		$link = $crawler->filter('.catalog-filter-tree .coffee a.cat-item')->link();
52
+		$crawler = $client->click($link);
53 53
 
54
-		$this->assertEquals( 3, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );
55
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-promo .product a:contains("Cafe Noire Expresso")' )->count() );
54
+		$this->assertEquals(3, $crawler->filter('.catalog-stage-breadcrumb li')->count());
55
+		$this->assertEquals(1, $crawler->filter('.catalog-list-promo .product a:contains("Cafe Noire Expresso")')->count());
56 56
 	}
57 57
 
58 58
 
59 59
 	public function testFilterAttribute()
60 60
 	{
61 61
 		$client = static::createClient();
62
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
62
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
63 63
 
64
-		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() );
64
+		$this->assertEquals(1, $crawler->filter('.catalog-filter-attribute')->count());
65 65
 
66
-		$nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' );
67
-		$id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id');
66
+		$nodes = $crawler->filter('.catalog-filter-attribute .attr-size span:contains("XS")');
67
+		$id = $nodes->parents()->filter('.attr-item')->attr('data-id');
68 68
 
69
-		$form = $crawler->filter( '.catalog-filter .btn-action' )->form();
70
-		$form['f_attrid'] = array( $id => 'xs' );
71
-		$crawler = $client->submit( $form );
69
+		$form = $crawler->filter('.catalog-filter .btn-action')->form();
70
+		$form['f_attrid'] = array($id => 'xs');
71
+		$crawler = $client->submit($form);
72 72
 
73
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
74
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
73
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count());
74
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count());
75 75
 	}
76 76
 
77 77
 
78 78
 	public function testStageBreadcrumb()
79 79
 	{
80 80
 		$client = static::createClient();
81
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
81
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
82 82
 
83
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
84
-		$crawler = $client->click( $link );
83
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
84
+		$crawler = $client->click($link);
85 85
 
86
-		$this->assertEquals( 1, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );
86
+		$this->assertEquals(1, $crawler->filter('.catalog-stage-breadcrumb li')->count());
87 87
 
88
-		$link = $crawler->filter( '.catalog-stage-breadcrumb a' )->link();
89
-		$crawler = $client->click( $link );
88
+		$link = $crawler->filter('.catalog-stage-breadcrumb a')->link();
89
+		$crawler = $client->click($link);
90 90
 
91
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list' )->count() );
92
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
93
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
91
+		$this->assertEquals(1, $crawler->filter('.catalog-list')->count());
92
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count());
93
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count());
94 94
 	}
95 95
 
96 96
 
97 97
 	public function testStageNavigator()
98 98
 	{
99 99
 		$client = static::createClient();
100
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
100
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
101 101
 
102
-		$link = $crawler->filter( '.catalog-list-pagination .option-name' )->link();
103
-		$crawler = $client->click( $link );
102
+		$link = $crawler->filter('.catalog-list-pagination .option-name')->link();
103
+		$crawler = $client->click($link);
104 104
 
105
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
106
-		$crawler = $client->click( $link );
105
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
106
+		$crawler = $client->click($link);
107 107
 
108
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
109
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() );
108
+		$this->assertEquals(1, $crawler->filter('.catalog-detail')->count());
109
+		$this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Bundle")')->count());
110 110
 
111
-		$link = $crawler->filter( '.catalog-stage-navigator a.next' )->link();
112
-		$crawler = $client->click( $link );
111
+		$link = $crawler->filter('.catalog-stage-navigator a.next')->link();
112
+		$crawler = $client->click($link);
113 113
 
114
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
115
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Empty Selection")' )->count() );
114
+		$this->assertEquals(1, $crawler->filter('.catalog-detail')->count());
115
+		$this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Empty Selection")')->count());
116 116
 
117
-		$link = $crawler->filter( '.catalog-stage-navigator a.prev' )->link();
118
-		$crawler = $client->click( $link );
117
+		$link = $crawler->filter('.catalog-stage-navigator a.prev')->link();
118
+		$crawler = $client->click($link);
119 119
 
120
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
121
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() );
120
+		$this->assertEquals(1, $crawler->filter('.catalog-detail')->count());
121
+		$this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Bundle")')->count());
122 122
 	}
123 123
 
124 124
 
125 125
 	public function testListSortationName()
126 126
 	{
127 127
 		$client = static::createClient();
128
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
128
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
129 129
 
130
-		$link = $crawler->filter( '.catalog-list-pagination .option-name' )->link();
131
-		$crawler = $client->click( $link );
130
+		$link = $crawler->filter('.catalog-list-pagination .option-name')->link();
131
+		$crawler = $client->click($link);
132 132
 
133
-		$products = $crawler->filter( '.catalog-list-items .product' );
134
-		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
135
-		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Unittest: Empty Selection")' )->count() );
133
+		$products = $crawler->filter('.catalog-list-items .product');
134
+		$this->assertEquals(1, $products->eq(1)->filter('h2:contains("Unittest: Bundle")')->count());
135
+		$this->assertEquals(1, $products->eq(2)->filter('h2:contains("Unittest: Empty Selection")')->count());
136 136
 
137
-		$link = $crawler->filter( '.catalog-list-pagination .option-name' )->link();
138
-		$crawler = $client->click( $link );
137
+		$link = $crawler->filter('.catalog-list-pagination .option-name')->link();
138
+		$crawler = $client->click($link);
139 139
 
140
-		$products = $crawler->filter( '.catalog-list-items .product' );
140
+		$products = $crawler->filter('.catalog-list-items .product');
141 141
 		$count = $products->count();
142 142
 
143
-		$this->assertGreaterThan( 2, $count );
144
-		$this->assertEquals( 1, $products->eq( $count - 3 )->filter( 'h2:contains("Unittest: Empty Selection")' )->count() );
145
-		$this->assertEquals( 1, $products->eq( $count - 2 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
143
+		$this->assertGreaterThan(2, $count);
144
+		$this->assertEquals(1, $products->eq($count - 3)->filter('h2:contains("Unittest: Empty Selection")')->count());
145
+		$this->assertEquals(1, $products->eq($count - 2)->filter('h2:contains("Unittest: Bundle")')->count());
146 146
 	}
147 147
 
148 148
 
149 149
 	public function testListSortationPrice()
150 150
 	{
151 151
 		$client = static::createClient();
152
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
152
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
153 153
 
154
-		$link = $crawler->filter( '.catalog-list-pagination .option-price' )->link();
155
-		$crawler = $client->click( $link );
154
+		$link = $crawler->filter('.catalog-list-pagination .option-price')->link();
155
+		$crawler = $client->click($link);
156 156
 
157
-		$products = $crawler->filter( '.catalog-list-items .product' );
157
+		$products = $crawler->filter('.catalog-list-items .product');
158 158
 		$count = $products->count();
159 159
 
160
-		$this->assertGreaterThan( 2, $count );
161
-		$this->assertEquals( 1, $products->eq( $count - 2 )->filter( '.value:contains("600.00 €")' )->count() );
162
-		$this->assertEquals( 1, $products->eq( $count - 1 )->filter( '.value:contains("600.00 €")' )->count() );
160
+		$this->assertGreaterThan(2, $count);
161
+		$this->assertEquals(1, $products->eq($count - 2)->filter('.value:contains("600.00 €")')->count());
162
+		$this->assertEquals(1, $products->eq($count - 1)->filter('.value:contains("600.00 €")')->count());
163 163
 
164
-		$link = $crawler->filter( '.catalog-list-pagination .option-price' )->link();
165
-		$crawler = $client->click( $link );
164
+		$link = $crawler->filter('.catalog-list-pagination .option-price')->link();
165
+		$crawler = $client->click($link);
166 166
 
167
-		$products = $crawler->filter( '.catalog-list-items .product' );
168
-		$this->assertEquals( 1, $products->eq( 0 )->filter( '.value:contains("600.00 €")' )->count() );
169
-		$this->assertEquals( 1, $products->eq( 1 )->filter( '.value:contains("600.00 €")' )->count() );
167
+		$products = $crawler->filter('.catalog-list-items .product');
168
+		$this->assertEquals(1, $products->eq(0)->filter('.value:contains("600.00 €")')->count());
169
+		$this->assertEquals(1, $products->eq(1)->filter('.value:contains("600.00 €")')->count());
170 170
 	}
171 171
 
172 172
 
173 173
 	public function testDetailPinned()
174 174
 	{
175 175
 		$client = static::createClient();
176
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
176
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
177 177
 
178
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
179
-		$crawler = $client->click( $link );
178
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
179
+		$crawler = $client->click($link);
180 180
 
181
-		$link = $crawler->filter( '.catalog-detail a.actions-button-pin' )->link();
182
-		$crawler = $client->click( $link );
181
+		$link = $crawler->filter('.catalog-detail a.actions-button-pin')->link();
182
+		$crawler = $client->click($link);
183 183
 
184
-		$this->assertEquals( 1, $crawler->filter( '.catalog-session-pinned .pinned-item' )->count() );
184
+		$this->assertEquals(1, $crawler->filter('.catalog-session-pinned .pinned-item')->count());
185 185
 	}
186 186
 
187 187
 
188 188
 	public function testDetailLastSeen()
189 189
 	{
190 190
 		$client = static::createClient();
191
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
191
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
192 192
 
193
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
194
-		$crawler = $client->click( $link );
193
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
194
+		$crawler = $client->click($link);
195 195
 
196
-		$this->assertEquals( 1, $crawler->filter( '.catalog-session-seen .seen-item' )->count() );
196
+		$this->assertEquals(1, $crawler->filter('.catalog-session-seen .seen-item')->count());
197 197
 	}
198 198
 
199 199
 
200 200
 	public function testSuggest()
201 201
 	{
202 202
 		$client = static::createClient();
203
-		$client->request( 'GET', '/unittest/de/EUR/suggest', array( 'f_search' => 'unit' ) );
203
+		$client->request('GET', '/unittest/de/EUR/suggest', array('f_search' => 'unit'));
204 204
 		$content = $client->getResponse()->getContent();
205 205
 
206
-		$this->assertStringStartsWith( '[{', $content );
206
+		$this->assertStringStartsWith('[{', $content);
207 207
 	}
208 208
 
209 209
 
210 210
 	public function testStock()
211 211
 	{
212 212
 		$client = static::createClient();
213
-		$client->request( 'GET', '/unittest/de/EUR/stock' );
213
+		$client->request('GET', '/unittest/de/EUR/stock');
214 214
 		$content = $client->getResponse()->getContent();
215 215
 
216
-		$this->assertContains( '.aimeos .product .stock', $content );
217
-		$this->assertContains( '.aimeos .catalog-detail-basket', $content );
216
+		$this->assertContains('.aimeos .product .stock', $content);
217
+		$this->assertContains('.aimeos .catalog-detail-basket', $content);
218 218
 	}
219 219
 
220 220
 
221 221
 	public function testCountComponent()
222 222
 	{
223
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
224
-			->setMethods( array( 'getOutput' ) )
223
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
224
+			->setMethods(array('getOutput'))
225 225
 			->disableOriginalConstructor()
226 226
 			->getMock();
227 227
 
228
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
228
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
229 229
 
230
-		$this->assertEquals( 'test', $mock->countComponentAction() );
230
+		$this->assertEquals('test', $mock->countComponentAction());
231 231
 	}
232 232
 
233 233
 
234 234
 	public function testDetailComponent()
235 235
 	{
236
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
237
-			->setMethods( array( 'getOutput' ) )
236
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
237
+			->setMethods(array('getOutput'))
238 238
 			->disableOriginalConstructor()
239 239
 			->getMock();
240 240
 
241
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
241
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
242 242
 
243
-		$this->assertEquals( 'test', $mock->detailComponentAction() );
243
+		$this->assertEquals('test', $mock->detailComponentAction());
244 244
 	}
245 245
 
246 246
 
247 247
 	public function testFilterComponent()
248 248
 	{
249
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
250
-			->setMethods( array( 'getOutput' ) )
249
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
250
+			->setMethods(array('getOutput'))
251 251
 			->disableOriginalConstructor()
252 252
 			->getMock();
253 253
 
254
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
254
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
255 255
 
256
-		$this->assertEquals( 'test', $mock->filterComponentAction() );
256
+		$this->assertEquals('test', $mock->filterComponentAction());
257 257
 	}
258 258
 
259 259
 
260 260
 	public function testListComponent()
261 261
 	{
262
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
263
-			->setMethods( array( 'getOutput' ) )
262
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
263
+			->setMethods(array('getOutput'))
264 264
 			->disableOriginalConstructor()
265 265
 			->getMock();
266 266
 
267
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
267
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
268 268
 
269
-		$this->assertEquals( 'test', $mock->listComponentAction() );
269
+		$this->assertEquals('test', $mock->listComponentAction());
270 270
 	}
271 271
 
272 272
 
273 273
 	public function testSessionComponent()
274 274
 	{
275
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
276
-			->setMethods( array( 'getOutput' ) )
275
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
276
+			->setMethods(array('getOutput'))
277 277
 			->disableOriginalConstructor()
278 278
 			->getMock();
279 279
 
280
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
280
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
281 281
 
282
-		$this->assertEquals( 'test', $mock->sessionComponentAction() );
282
+		$this->assertEquals('test', $mock->sessionComponentAction());
283 283
 	}
284 284
 
285 285
 
286 286
 	public function testStageComponent()
287 287
 	{
288
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
289
-			->setMethods( array( 'getOutput' ) )
288
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
289
+			->setMethods(array('getOutput'))
290 290
 			->disableOriginalConstructor()
291 291
 			->getMock();
292 292
 
293
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
293
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
294 294
 
295
-		$this->assertEquals( 'test', $mock->stageComponentAction() );
295
+		$this->assertEquals('test', $mock->stageComponentAction());
296 296
 	}
297 297
 
298 298
 
299 299
 	public function testStockComponent()
300 300
 	{
301
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
302
-			->setMethods( array( 'getOutput' ) )
301
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController')
302
+			->setMethods(array('getOutput'))
303 303
 			->disableOriginalConstructor()
304 304
 			->getMock();
305 305
 
306
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
306
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
307 307
 
308
-		$this->assertEquals( 'test', $mock->stockComponentAction() );
308
+		$this->assertEquals('test', $mock->stockComponentAction());
309 309
 	}
310 310
 }
Please login to merge, or discard this patch.
Tests/Controller/BasketControllerTest.php 1 patch
Spacing   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
 	{
12 12
 		$client = static::createClient();
13 13
 
14
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
14
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
15 15
 
16
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
17
-		$crawler = $client->click( $link );
16
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
17
+		$crawler = $client->click($link);
18 18
 
19
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
20
-		$crawler = $client->submit( $form );
19
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
20
+		$crawler = $client->submit($form);
21 21
 
22
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
23
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
24
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
22
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
23
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
24
+		$this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value'));
25 25
 	}
26 26
 
27 27
 
@@ -29,18 +29,18 @@  discard block
 block discarded – undo
29 29
 	{
30 30
 		$client = static::createClient();
31 31
 
32
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
32
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
33 33
 
34
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
35
-		$crawler = $client->click( $link );
34
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
35
+		$crawler = $client->click($link);
36 36
 
37
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
37
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
38 38
 		$form['b_prod[0][quantity]'] = 2;
39
-		$crawler = $client->submit( $form );
39
+		$crawler = $client->submit($form);
40 40
 
41
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
42
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
43
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
41
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
42
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
43
+		$this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value'));
44 44
 	}
45 45
 
46 46
 
@@ -48,26 +48,26 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		$client = static::createClient();
50 50
 
51
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
51
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
52 52
 
53
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
54
-		$crawler = $client->click( $link );
53
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
54
+		$crawler = $client->click($link);
55 55
 
56
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
57
-		$crawler = $client->submit( $form );
56
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
57
+		$crawler = $client->submit($form);
58 58
 
59
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
60
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
59
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
60
+		$this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value'));
61 61
 
62 62
 
63
-		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
64
-		$crawler = $client->click( $link );
63
+		$link = $crawler->filter('.basket-standard .btn-back')->link();
64
+		$crawler = $client->click($link);
65 65
 
66
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
67
-		$crawler = $client->submit( $form );
66
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
67
+		$crawler = $client->submit($form);
68 68
 
69
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
70
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
69
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
70
+		$this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value'));
71 71
 	}
72 72
 
73 73
 
@@ -75,19 +75,19 @@  discard block
 block discarded – undo
75 75
 	{
76 76
 		$client = static::createClient();
77 77
 
78
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
78
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
79 79
 
80
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
81
-		$crawler = $client->click( $link );
80
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
81
+		$crawler = $client->click($link);
82 82
 
83
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
84
-		$crawler = $client->submit( $form );
83
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
84
+		$crawler = $client->submit($form);
85 85
 
86 86
 
87
-		$link = $crawler->filter( '.basket-standard .product .action .change' )->link();
88
-		$crawler = $client->click( $link );
87
+		$link = $crawler->filter('.basket-standard .product .action .change')->link();
88
+		$crawler = $client->click($link);
89 89
 
90
-		$this->assertEquals( 0, $crawler->filter( '.basket-standard .product' )->count() );
90
+		$this->assertEquals(0, $crawler->filter('.basket-standard .product')->count());
91 91
 	}
92 92
 
93 93
 
@@ -95,25 +95,25 @@  discard block
 block discarded – undo
95 95
 	{
96 96
 		$client = static::createClient();
97 97
 
98
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
98
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
99 99
 
100
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
101
-		$crawler = $client->click( $link );
100
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
101
+		$crawler = $client->click($link);
102 102
 
103
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
104
-		$crawler = $client->submit( $form );
103
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
104
+		$crawler = $client->submit($form);
105 105
 
106 106
 
107
-		$link = $crawler->filter( '.basket-standard .product .quantity .change' )->link();
108
-		$crawler = $client->click( $link );
107
+		$link = $crawler->filter('.basket-standard .product .quantity .change')->link();
108
+		$crawler = $client->click($link);
109 109
 
110
-		$this->assertEquals( 2, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
110
+		$this->assertEquals(2, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
111 111
 
112 112
 
113
-		$link = $crawler->filter( '.basket-standard .product .quantity .change' )->eq( 0 )->link();
114
-		$crawler = $client->click( $link );
113
+		$link = $crawler->filter('.basket-standard .product .quantity .change')->eq(0)->link();
114
+		$crawler = $client->click($link);
115 115
 
116
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
116
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
117 117
 	}
118 118
 
119 119
 
@@ -121,20 +121,20 @@  discard block
 block discarded – undo
121 121
 	{
122 122
 		$client = static::createClient();
123 123
 
124
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
124
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
125 125
 
126
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
127
-		$crawler = $client->click( $link );
126
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
127
+		$crawler = $client->click($link);
128 128
 
129
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
130
-		$crawler = $client->submit( $form );
129
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
130
+		$crawler = $client->submit($form);
131 131
 
132 132
 
133
-		$form = $crawler->filter( '.basket-standard .btn-update' )->form();
133
+		$form = $crawler->filter('.basket-standard .btn-update')->form();
134 134
 		$form['b_prod[0][quantity]'] = 3;
135
-		$crawler = $client->submit( $form );
135
+		$crawler = $client->submit($form);
136 136
 
137
-		$this->assertEquals( 3, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
137
+		$this->assertEquals(3, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
138 138
 	}
139 139
 
140 140
 
@@ -142,26 +142,26 @@  discard block
 block discarded – undo
142 142
 	{
143 143
 		$client = static::createClient();
144 144
 
145
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
145
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
146 146
 
147
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
148
-		$crawler = $client->click( $link );
147
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
148
+		$crawler = $client->click($link);
149 149
 
150
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
151
-		$crawler = $client->submit( $form );
150
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
151
+		$crawler = $client->submit($form);
152 152
 
153 153
 
154
-		$form = $crawler->filter( '.basket-standard-coupon .coupon-new button' )->form();
154
+		$form = $crawler->filter('.basket-standard-coupon .coupon-new button')->form();
155 155
 		$form['b_coupon'] = '90AB';
156
-		$crawler = $client->submit( $form );
156
+		$crawler = $client->submit($form);
157 157
 
158
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product:contains("Geldwerter Nachlass")' )->count() );
158
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product:contains("Geldwerter Nachlass")')->count());
159 159
 
160 160
 
161
-		$link = $crawler->filter( '.basket-standard-coupon .change' )->link();
162
-		$crawler = $client->click( $link );
161
+		$link = $crawler->filter('.basket-standard-coupon .change')->link();
162
+		$crawler = $client->click($link);
163 163
 
164
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product' )->count() );
164
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product')->count());
165 165
 	}
166 166
 
167 167
 
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
 	{
170 170
 		$client = static::createClient();
171 171
 
172
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
172
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
173 173
 
174
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
175
-		$crawler = $client->click( $link );
174
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
175
+		$crawler = $client->click($link);
176 176
 
177
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
178
-		$crawler = $client->submit( $form );
177
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
178
+		$crawler = $client->submit($form);
179 179
 
180
-		$this->assertEquals( 1, $crawler->filter( '.basket-related-bought .bought-item' )->count() );
180
+		$this->assertEquals(1, $crawler->filter('.basket-related-bought .bought-item')->count());
181 181
 	}
182 182
 
183 183
 
@@ -185,56 +185,56 @@  discard block
 block discarded – undo
185 185
 	{
186 186
 		$client = static::createClient();
187 187
 
188
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
188
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
189 189
 
190
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
191
-		$crawler = $client->click( $link );
190
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
191
+		$crawler = $client->click($link);
192 192
 
193
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
194
-		$crawler = $client->submit( $form );
193
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
194
+		$crawler = $client->submit($form);
195 195
 
196
-		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
197
-		$crawler = $client->click( $link );
196
+		$link = $crawler->filter('.basket-standard .btn-back')->link();
197
+		$crawler = $client->click($link);
198 198
 
199
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail .product:contains("Unittest: Bundle")' )->count() );
199
+		$this->assertEquals(1, $crawler->filter('.catalog-detail .product:contains("Unittest: Bundle")')->count());
200 200
 	}
201 201
 
202 202
 
203 203
 	public function testMiniComponent()
204 204
 	{
205
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\BasketController' )
206
-			->setMethods( array( 'getOutput' ) )
205
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\BasketController')
206
+			->setMethods(array('getOutput'))
207 207
 			->disableOriginalConstructor()
208 208
 			->getMock();
209 209
 
210
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
210
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
211 211
 
212
-		$this->assertEquals( 'test', $mock->miniComponentAction() );
212
+		$this->assertEquals('test', $mock->miniComponentAction());
213 213
 	}
214 214
 
215 215
 
216 216
 	public function testRelatedComponent()
217 217
 	{
218
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\BasketController' )
219
-			->setMethods( array( 'getOutput' ) )
218
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\BasketController')
219
+			->setMethods(array('getOutput'))
220 220
 			->disableOriginalConstructor()
221 221
 			->getMock();
222 222
 
223
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
223
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
224 224
 
225
-		$this->assertEquals( 'test', $mock->relatedComponentAction() );
225
+		$this->assertEquals('test', $mock->relatedComponentAction());
226 226
 	}
227 227
 
228 228
 
229 229
 	public function testStandardComponent()
230 230
 	{
231
-		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\BasketController' )
232
-			->setMethods( array( 'getOutput' ) )
231
+		$mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\BasketController')
232
+			->setMethods(array('getOutput'))
233 233
 			->disableOriginalConstructor()
234 234
 			->getMock();
235 235
 
236
-		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( 'test' ) );
236
+		$mock->expects($this->once())->method('getOutput')->will($this->returnValue('test'));
237 237
 
238
-		$this->assertEquals( 'test', $mock->standardComponentAction() );
238
+		$this->assertEquals('test', $mock->standardComponentAction());
239 239
 	}
240 240
 }
Please login to merge, or discard this patch.
Controller/AccountController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,6 +84,6 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	public function watchComponentAction()
86 86
 	{
87
-		return $this->getOutput( 'account/watch' );
87
+		return $this->getOutput('account/watch');
88 88
 	}
89 89
 }
Please login to merge, or discard this patch.
Controller/BasketController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function indexAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'basket-index' );
32
-		return $this->render( 'AimeosShopBundle:Basket:index.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('basket-index');
32
+		return $this->render('AimeosShopBundle:Basket:index.html.twig', $params);
33 33
 	}
34 34
 
35 35
 	/**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	public function miniComponentAction()
41 41
 	{
42
-		return $this->getOutput( 'basket/mini' );
42
+		return $this->getOutput('basket/mini');
43 43
 	}
44 44
 
45 45
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function relatedComponentAction()
52 52
 	{
53
-		return $this->getOutput( 'basket/related' );
53
+		return $this->getOutput('basket/related');
54 54
 	}
55 55
 
56 56
 
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function standardComponentAction()
63 63
 	{
64
-		return $this->getOutput( 'basket/standard' );
64
+		return $this->getOutput('basket/standard');
65 65
 	}
66 66
 }
Please login to merge, or discard this patch.
Controller/CheckoutController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function confirmAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-confirm' );
32
-		return $this->render( 'AimeosShopBundle:Checkout:confirm.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('checkout-confirm');
32
+		return $this->render('AimeosShopBundle:Checkout:confirm.html.twig', $params);
33 33
 	}
34 34
 
35 35
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function indexAction()
42 42
 	{
43
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-index' );
44
-		return $this->render( 'AimeosShopBundle:Checkout:index.html.twig', $params );
43
+		$params = $this->get('aimeos_page')->getSections('checkout-index');
44
+		return $this->render('AimeosShopBundle:Checkout:index.html.twig', $params);
45 45
 	}
46 46
 
47 47
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function updateAction()
54 54
 	{
55
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-update' );
56
-		return $this->render( 'AimeosShopBundle:Checkout:update.html.twig', $params );
55
+		$params = $this->get('aimeos_page')->getSections('checkout-update');
56
+		return $this->render('AimeosShopBundle:Checkout:update.html.twig', $params);
57 57
 	}
58 58
 
59 59
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function confirmComponentAction()
66 66
 	{
67
-		return $this->getOutput( 'checkout/confirm' );
67
+		return $this->getOutput('checkout/confirm');
68 68
 	}
69 69
 
70 70
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function standardComponentAction()
77 77
 	{
78
-		return $this->getOutput( 'checkout/standard' );
78
+		return $this->getOutput('checkout/standard');
79 79
 	}
80 80
 
81 81
 
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function updateComponentAction()
88 88
 	{
89
-		return $this->getOutput( 'checkout/update' );
89
+		return $this->getOutput('checkout/update');
90 90
 	}
91 91
 }
Please login to merge, or discard this patch.
Controller/LocaleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function selectComponentAction()
30 30
 	{
31
-		return $this->getOutput( 'locale/select' );
31
+		return $this->getOutput('locale/select');
32 32
 	}
33 33
 }
Please login to merge, or discard this patch.