Completed
Push — master ( a2c835...1acc32 )
by Aimeos
02:32
created
Controller/JsonadmController.php 3 patches
Doc Comments   +1 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @param \Symfony\Component\HttpFoundation\Request $request Request object
30 30
 	 * @param string Resource location, e.g. "product/stock/wareshouse"
31
-	 * @param string $sitecode Unique site code
32 31
 	 * @param integer|null $id Unique resource ID
33 32
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
34 33
 	 */
@@ -49,7 +48,6 @@  discard block
 block discarded – undo
49 48
 	 *
50 49
 	 * @param \Symfony\Component\HttpFoundation\Request $request Request object
51 50
 	 * @param string Resource location, e.g. "product/stock/wareshouse"
52
-	 * @param string $sitecode Unique site code
53 51
 	 * @param integer|null $id Unique resource ID
54 52
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
55 53
 	 */
@@ -70,7 +68,6 @@  discard block
 block discarded – undo
70 68
 	 *
71 69
 	 * @param \Symfony\Component\HttpFoundation\Request $request Request object
72 70
 	 * @param string Resource location, e.g. "product/stock/wareshouse"
73
-	 * @param string $sitecode Unique site code
74 71
 	 * @param integer|null $id Unique resource ID
75 72
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
76 73
 	 */
@@ -91,7 +88,6 @@  discard block
 block discarded – undo
91 88
 	 *
92 89
 	 * @param \Symfony\Component\HttpFoundation\Request $request Request object
93 90
 	 * @param string Resource location, e.g. "product/stock/wareshouse"
94
-	 * @param string $sitecode Unique site code
95 91
 	 * @param integer $id Unique ID of the resource
96 92
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
97 93
 	 */
@@ -112,7 +108,6 @@  discard block
 block discarded – undo
112 108
 	 *
113 109
 	 * @param \Symfony\Component\HttpFoundation\Request $request Request object
114 110
 	 * @param string Resource location, e.g. "product/stock/wareshouse"
115
-	 * @param string $sitecode Unique site code
116 111
 	 * @param integer|null $id Unique resource ID
117 112
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
118 113
 	 */
@@ -133,7 +128,6 @@  discard block
 block discarded – undo
133 128
 	 *
134 129
 	 * @param \Symfony\Component\HttpFoundation\Request $request Request object
135 130
 	 * @param string Resource location, e.g. "product/stock/wareshouse"
136
-	 * @param string $sitecode Unique site code
137 131
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
138 132
 	 */
139 133
 	public function optionsAction( Request $request, $resource = '', $site = 'default' )
@@ -177,7 +171,7 @@  discard block
 block discarded – undo
177 171
 	 * @param string $content Body of the HTTP response
178 172
 	 * @param integer $status HTTP status
179 173
 	 * @param array $header List of HTTP headers
180
-	 * @return \Illuminate\Http\Response HTTP response object
174
+	 * @return Response HTTP response object
181 175
 	 */
182 176
 	protected function createResponse( $content, $status, array $header )
183 177
 	{
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 	 * @param integer|null $id Unique resource ID
33 33
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
34 34
 	 */
35
-	public function deleteAction( Request $request, $resource, $site = 'default', $id = null )
35
+	public function deleteAction(Request $request, $resource, $site = 'default', $id = null)
36 36
 	{
37 37
 		$status = 500;
38 38
 		$header = $request->headers->all();
39 39
 
40
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
41
-		$result = $cntl->delete( $request->getContent(), $header, $status );
40
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
41
+		$result = $cntl->delete($request->getContent(), $header, $status);
42 42
 
43
-		return $this->createResponse( $result, $status, $header );
43
+		return $this->createResponse($result, $status, $header);
44 44
 	}
45 45
 
46 46
 
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
 	 * @param integer|null $id Unique resource ID
54 54
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
55 55
 	 */
56
-	public function getAction( Request $request, $resource, $site = 'default', $id = null )
56
+	public function getAction(Request $request, $resource, $site = 'default', $id = null)
57 57
 	{
58 58
 		$status = 500;
59 59
 		$header = $request->headers->all();
60 60
 
61
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
62
-		$result = $cntl->get( $request->getContent(), $header, $status );
61
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
62
+		$result = $cntl->get($request->getContent(), $header, $status);
63 63
 
64
-		return $this->createResponse( $result, $status, $header );
64
+		return $this->createResponse($result, $status, $header);
65 65
 	}
66 66
 
67 67
 
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 	 * @param integer|null $id Unique resource ID
75 75
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
76 76
 	 */
77
-	public function patchAction( Request $request, $resource, $site = 'default', $id = null )
77
+	public function patchAction(Request $request, $resource, $site = 'default', $id = null)
78 78
 	{
79 79
 		$status = 500;
80 80
 		$header = $request->headers->all();
81 81
 
82
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
83
-		$result = $cntl->patch( $request->getContent(), $header, $status );
82
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
83
+		$result = $cntl->patch($request->getContent(), $header, $status);
84 84
 
85
-		return $this->createResponse( $result, $status, $header );
85
+		return $this->createResponse($result, $status, $header);
86 86
 	}
87 87
 
88 88
 
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
 	 * @param integer $id Unique ID of the resource
96 96
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
97 97
 	 */
98
-	public function postAction( Request $request, $resource, $site = 'default', $id = null )
98
+	public function postAction(Request $request, $resource, $site = 'default', $id = null)
99 99
 	{
100 100
 		$status = 500;
101 101
 		$header = $request->headers->all();
102 102
 
103
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
104
-		$result = $cntl->post( $request->getContent(), $header, $status );
103
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
104
+		$result = $cntl->post($request->getContent(), $header, $status);
105 105
 
106
-		return $this->createResponse( $result, $status, $header );
106
+		return $this->createResponse($result, $status, $header);
107 107
 	}
108 108
 
109 109
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
 	 * @param integer|null $id Unique resource ID
117 117
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
118 118
 	 */
119
-	public function putAction( Request $request, $resource, $site = 'default', $id = null )
119
+	public function putAction(Request $request, $resource, $site = 'default', $id = null)
120 120
 	{
121 121
 		$status = 500;
122 122
 		$header = $request->headers->all();
123 123
 
124
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
125
-		$result = $cntl->put( $request->getContent(), $header, $status );
124
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
125
+		$result = $cntl->put($request->getContent(), $header, $status);
126 126
 
127
-		return $this->createResponse( $result, $status, $header );
127
+		return $this->createResponse($result, $status, $header);
128 128
 	}
129 129
 
130 130
 
@@ -136,15 +136,15 @@  discard block
 block discarded – undo
136 136
 	 * @param string $sitecode Unique site code
137 137
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
138 138
 	 */
139
-	public function optionsAction( Request $request, $resource = '', $site = 'default' )
139
+	public function optionsAction(Request $request, $resource = '', $site = 'default')
140 140
 	{
141 141
 		$status = 500;
142 142
 		$header = $request->headers->all();
143 143
 
144
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
145
-		$result = $cntl->options( $request->getContent(), $header, $status );
144
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
145
+		$result = $cntl->options($request->getContent(), $header, $status);
146 146
 
147
-		return $this->createResponse( $result, $status, $header );
147
+		return $this->createResponse($result, $status, $header);
148 148
 	}
149 149
 
150 150
 
@@ -156,18 +156,18 @@  discard block
 block discarded – undo
156 156
 	 * @param string $lang Language code
157 157
 	 * @return \Aimeos\MShop\Context\Item\Iface Context item
158 158
 	 */
159
-	protected function createController( $sitecode, $resource, $lang )
159
+	protected function createController($sitecode, $resource, $lang)
160 160
 	{
161
-		$aimeos = $this->get( 'aimeos' )->get();
162
-		$templatePaths = $aimeos->getCustomPaths( 'controller/jsonadm/templates' );
161
+		$aimeos = $this->get('aimeos')->get();
162
+		$templatePaths = $aimeos->getCustomPaths('controller/jsonadm/templates');
163 163
 
164
-		$context = $this->get( 'aimeos_context' )->get( false );
165
-		$context = $this->setLocale( $context, $sitecode, $lang );
164
+		$context = $this->get('aimeos_context')->get(false);
165
+		$context = $this->setLocale($context, $sitecode, $lang);
166 166
 
167
-		$view = $this->get('aimeos_view')->create( $context->getConfig(), $templatePaths, $lang );
168
-		$context->setView( $view );
167
+		$view = $this->get('aimeos_view')->create($context->getConfig(), $templatePaths, $lang);
168
+		$context->setView($view);
169 169
 
170
-		return \Aimeos\Controller\JsonAdm\Factory::createController( $context, $templatePaths, $resource );
170
+		return \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, $resource);
171 171
 	}
172 172
 
173 173
 
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 	 * @param array $header List of HTTP headers
180 180
 	 * @return \Illuminate\Http\Response HTTP response object
181 181
 	 */
182
-	protected function createResponse( $content, $status, array $header )
182
+	protected function createResponse($content, $status, array $header)
183 183
 	{
184 184
 		$response = new Response();
185
-		$response->setContent( $content );
186
-		$response->setStatusCode( $status );
185
+		$response->setContent($content);
186
+		$response->setStatusCode($status);
187 187
 
188
-		foreach( $header as $key => $value ) {
189
-			$response->headers->set( $key, $value );
188
+		foreach ($header as $key => $value) {
189
+			$response->headers->set($key, $value);
190 190
 		}
191 191
 
192 192
 		return $response;
@@ -201,23 +201,23 @@  discard block
 block discarded – undo
201 201
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
202 202
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
203 203
 	 */
204
-	protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang )
204
+	protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang)
205 205
 	{
206
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
206
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
207 207
 
208 208
 		try
209 209
 		{
210
-			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
211
-			$localeItem->setLanguageId( null );
212
-			$localeItem->setCurrencyId( null );
210
+			$localeItem = $localeManager->bootstrap($sitecode, '', '', false);
211
+			$localeItem->setLanguageId(null);
212
+			$localeItem->setCurrencyId(null);
213 213
 		}
214
-		catch( \Aimeos\MShop\Locale\Exception $e )
214
+		catch (\Aimeos\MShop\Locale\Exception $e)
215 215
 		{
216 216
 			$localeItem = $localeManager->createItem();
217 217
 		}
218 218
 
219
-		$context->setLocale( $localeItem );
220
-		$context->setI18n( $this->get('aimeos_i18n')->get( array( $lang ) ) );
219
+		$context->setLocale($localeItem);
220
+		$context->setI18n($this->get('aimeos_i18n')->get(array($lang)));
221 221
 
222 222
 		return $context;
223 223
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,8 +210,7 @@
 block discarded – undo
210 210
 			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
211 211
 			$localeItem->setLanguageId( null );
212 212
 			$localeItem->setCurrencyId( null );
213
-		}
214
-		catch( \Aimeos\MShop\Locale\Exception $e )
213
+		} catch( \Aimeos\MShop\Locale\Exception $e )
215 214
 		{
216 215
 			$localeItem = $localeManager->createItem();
217 216
 		}
Please login to merge, or discard this patch.
Tests/bootstrap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Doctrine\Common\Annotations\AnnotationRegistry;
4 4
 
5 5
 
6
-setlocale( LC_ALL, 'en_US.UTF-8' );
6
+setlocale(LC_ALL, 'en_US.UTF-8');
7 7
 
8 8
 // if the bundle is within a symfony project, try to reuse the project's autoload
9 9
 $files = array(
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
 );
13 13
 
14 14
 $autoload = false;
15
-foreach( $files as $file )
15
+foreach ($files as $file)
16 16
 {
17
-	if( is_file( $file ) ) {
17
+	if (is_file($file)) {
18 18
 		$autoload = include_once $file;
19 19
 		break;
20 20
 	}
21 21
 }
22 22
 
23
-if( !$autoload )
23
+if (!$autoload)
24 24
 {
25 25
 	exit(
26 26
 	"Unable to find autoload.php file, please use composer to load dependencies:
@@ -30,4 +30,4 @@  discard block
 block discarded – undo
30 30
 	);
31 31
 }
32 32
 
33
-AnnotationRegistry::registerLoader( array( $autoload, 'loadClass' ) );
33
+AnnotationRegistry::registerLoader(array($autoload, 'loadClass'));
Please login to merge, or discard this patch.
Tests/Entity/FosUserTest.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -17,144 +17,144 @@
 block discarded – undo
17 17
 
18 18
 	public function testGetId()
19 19
 	{
20
-		$this->assertEquals( null, $this->object->getId() );
20
+		$this->assertEquals(null, $this->object->getId());
21 21
 	}
22 22
 
23 23
 
24 24
 	public function testGetSetCompany()
25 25
 	{
26
-		$this->object->setCompany( 'ABC' );
27
-		$this->assertEquals( 'ABC', $this->object->getCompany() );
26
+		$this->object->setCompany('ABC');
27
+		$this->assertEquals('ABC', $this->object->getCompany());
28 28
 	}
29 29
 
30 30
 
31 31
 	public function testGetSetVatID()
32 32
 	{
33
-		$this->object->setVatID( 'AT0000' );
34
-		$this->assertEquals( 'AT0000', $this->object->getVatID() );
33
+		$this->object->setVatID('AT0000');
34
+		$this->assertEquals('AT0000', $this->object->getVatID());
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testGetSetSalutation()
39 39
 	{
40
-		$this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN );
41
-		$this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation() );
40
+		$this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN);
41
+		$this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation());
42 42
 
43
-		$this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY );
44
-		$this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation() );
43
+		$this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY);
44
+		$this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation());
45 45
 
46
-		$this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS );
47
-		$this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation() );
46
+		$this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS);
47
+		$this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation());
48 48
 
49
-		$this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS );
50
-		$this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation() );
49
+		$this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS);
50
+		$this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation());
51 51
 
52
-		$this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR );
53
-		$this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation() );
52
+		$this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR);
53
+		$this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation());
54 54
 	}
55 55
 
56 56
 
57 57
 	public function testGetSetTitle()
58 58
 	{
59
-		$this->object->setTitle( 'Prof. Dr.' );
60
-		$this->assertEquals( 'Prof. Dr.', $this->object->getTitle() );
59
+		$this->object->setTitle('Prof. Dr.');
60
+		$this->assertEquals('Prof. Dr.', $this->object->getTitle());
61 61
 	}
62 62
 
63 63
 
64 64
 	public function testGetSetFirstname()
65 65
 	{
66
-		$this->object->setFirstname( 'first' );
67
-		$this->assertEquals( 'first', $this->object->getFirstname() );
66
+		$this->object->setFirstname('first');
67
+		$this->assertEquals('first', $this->object->getFirstname());
68 68
 	}
69 69
 
70 70
 
71 71
 	public function testGetSetLastname()
72 72
 	{
73
-		$this->object->setLastname( 'last' );
74
-		$this->assertEquals( 'last', $this->object->getLastname() );
73
+		$this->object->setLastname('last');
74
+		$this->assertEquals('last', $this->object->getLastname());
75 75
 	}
76 76
 
77 77
 
78 78
 	public function testGetSetAddress1()
79 79
 	{
80
-		$this->object->setAddress1( 'test street' );
81
-		$this->assertEquals( 'test street', $this->object->getAddress1() );
80
+		$this->object->setAddress1('test street');
81
+		$this->assertEquals('test street', $this->object->getAddress1());
82 82
 	}
83 83
 
84 84
 
85 85
 	public function testGetSetAddress2()
86 86
 	{
87
-		$this->object->setAddress2( '1' );
88
-		$this->assertEquals( '1', $this->object->getAddress2() );
87
+		$this->object->setAddress2('1');
88
+		$this->assertEquals('1', $this->object->getAddress2());
89 89
 	}
90 90
 
91 91
 
92 92
 	public function testGetSetAddress3()
93 93
 	{
94
-		$this->object->setAddress3( 'EG' );
95
-		$this->assertEquals( 'EG', $this->object->getAddress3() );
94
+		$this->object->setAddress3('EG');
95
+		$this->assertEquals('EG', $this->object->getAddress3());
96 96
 	}
97 97
 
98 98
 
99 99
 	public function testGetSetPostal()
100 100
 	{
101
-		$this->object->setPostal( '12345' );
102
-		$this->assertEquals( '12345', $this->object->getPostal() );
101
+		$this->object->setPostal('12345');
102
+		$this->assertEquals('12345', $this->object->getPostal());
103 103
 	}
104 104
 
105 105
 
106 106
 	public function testGetSetCity()
107 107
 	{
108
-		$this->object->setCity( 'Munich' );
109
-		$this->assertEquals( 'Munich', $this->object->getCity() );
108
+		$this->object->setCity('Munich');
109
+		$this->assertEquals('Munich', $this->object->getCity());
110 110
 	}
111 111
 
112 112
 
113 113
 	public function testGetSetState()
114 114
 	{
115
-		$this->object->setState( 'Bayern' );
116
-		$this->assertEquals( 'Bayern', $this->object->getState() );
115
+		$this->object->setState('Bayern');
116
+		$this->assertEquals('Bayern', $this->object->getState());
117 117
 	}
118 118
 
119 119
 
120 120
 	public function testGetSetCountryId()
121 121
 	{
122
-		$this->object->setCountryId( 'DE' );
123
-		$this->assertEquals( 'DE', $this->object->getCountryId() );
122
+		$this->object->setCountryId('DE');
123
+		$this->assertEquals('DE', $this->object->getCountryId());
124 124
 	}
125 125
 
126 126
 
127 127
 	public function testGetSetLanguageId()
128 128
 	{
129
-		$this->object->setLanguageId( 'de' );
130
-		$this->assertEquals( 'de', $this->object->getLanguageId() );
129
+		$this->object->setLanguageId('de');
130
+		$this->assertEquals('de', $this->object->getLanguageId());
131 131
 	}
132 132
 
133 133
 
134 134
 	public function testGetSetTelephone()
135 135
 	{
136
-		$this->object->setTelephone( '089123456789' );
137
-		$this->assertEquals( '089123456789', $this->object->getTelephone() );
136
+		$this->object->setTelephone('089123456789');
137
+		$this->assertEquals('089123456789', $this->object->getTelephone());
138 138
 	}
139 139
 
140 140
 
141 141
 	public function testGetSetTelefax()
142 142
 	{
143
-		$this->object->setTelefax( '089987654321' );
144
-		$this->assertEquals( '089987654321', $this->object->getTelefax() );
143
+		$this->object->setTelefax('089987654321');
144
+		$this->assertEquals('089987654321', $this->object->getTelefax());
145 145
 	}
146 146
 
147 147
 
148 148
 	public function testGetSetWebsite()
149 149
 	{
150
-		$this->object->setWebsite( 'http://aimeos.org' );
151
-		$this->assertEquals( 'http://aimeos.org', $this->object->getWebsite() );
150
+		$this->object->setWebsite('http://aimeos.org');
151
+		$this->assertEquals('http://aimeos.org', $this->object->getWebsite());
152 152
 	}
153 153
 
154 154
 
155 155
 	public function testSetWebsiteInvalid()
156 156
 	{
157
-		$this->setExpectedException( 'Exception' );
158
-		$this->object->setWebsite( 'aimeos+org' );
157
+		$this->setExpectedException('Exception');
158
+		$this->object->setWebsite('aimeos+org');
159 159
 	}
160 160
 }
Please login to merge, or discard this patch.
Tests/Fixtures/app/AppKernel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 	/**
29 29
 	 * {@inheritdoc}
30 30
 	 */
31
-	public function registerContainerConfiguration( LoaderInterface $loader )
31
+	public function registerContainerConfiguration(LoaderInterface $loader)
32 32
 	{
33
-		$loader->load( __DIR__ . '/config/config.yml' );
33
+		$loader->load(__DIR__ . '/config/config.yml');
34 34
 	}
35 35
 
36 36
 
Please login to merge, or discard this patch.
Tests/Fixtures/app/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__.'/../../../vendor/autoload.php';
3
+require_once __DIR__ . '/../../../vendor/autoload.php';
Please login to merge, or discard this patch.
Tests/Controller/AccountControllerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 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
 }
Please login to merge, or discard this patch.
Tests/Controller/BasketControllerTest.php 1 patch
Spacing   +81 added lines, -81 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,17 +185,17 @@  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
 }
Please login to merge, or discard this patch.
Tests/Controller/PageControllerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
 	public function testTerms()
11 11
 	{
12 12
 		$client = static::createClient();
13
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/terms' );
13
+		$crawler = $client->request('GET', '/unittest/de/EUR/terms');
14 14
 
15
-		$this->assertEquals( 1, $crawler->filter( 'body:contains("Terms")' )->count() );
15
+		$this->assertEquals(1, $crawler->filter('body:contains("Terms")')->count());
16 16
 	}
17 17
 
18 18
 
19 19
 	public function testPrivacy()
20 20
 	{
21 21
 		$client = static::createClient();
22
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/privacy' );
22
+		$crawler = $client->request('GET', '/unittest/de/EUR/privacy');
23 23
 
24
-		$this->assertEquals( 1, $crawler->filter( 'body:contains("Privacy")' )->count() );
24
+		$this->assertEquals(1, $crawler->filter('body:contains("Privacy")')->count());
25 25
 	}
26 26
 }
Please login to merge, or discard this patch.
Tests/Controller/CheckoutControllerTest.php 1 patch
Spacing   +140 added lines, -140 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 );
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 251
 		$form['c_payment[' . $payId . '][directdebit.accountowner]'] = 'test user';
252 252
 		$form['c_payment[' . $payId . '][directdebit.accountno]'] = '12345';
253 253
 		$form['c_payment[' . $payId . '][directdebit.bankcode]'] = '67890';
254 254
 		$form['c_payment[' . $payId . '][directdebit.bankname]'] = 'test bank';
255
-		$crawler = $client->submit( $form );
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,9 +276,9 @@  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
 
@@ -288,30 +288,30 @@  discard block
 block discarded – undo
288 288
 	 * @param \Symfony\Bundle\FrameworkBundle\Client $client HTTP test client
289 289
 	 * @return \Symfony\Component\DomCrawler\Crawler Crawler HTTP crawler
290 290
 	 */
291
-	protected function _goToSummary( $client )
291
+	protected function _goToSummary($client)
292 292
 	{
293
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
293
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
294 294
 
295
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
296
-		$crawler = $client->click( $link );
295
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
296
+		$crawler = $client->click($link);
297 297
 
298
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form();
299
-		$crawler = $client->submit( $form );
298
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form();
299
+		$crawler = $client->submit($form);
300 300
 
301
-		$link = $crawler->filter( '.basket-standard .btn-action' )->link();
302
-		$crawler = $client->click( $link );
301
+		$link = $crawler->filter('.basket-standard .btn-action')->link();
302
+		$crawler = $client->click($link);
303 303
 
304
-		$form = $crawler->filter( '.checkout-standard form' )->form();
305
-		$form['ca_billingoption']->select( $crawler->filter( '.checkout-standard-address .item-address input' )->attr( 'value' ) );
306
-		$crawler = $client->submit( $form );
304
+		$form = $crawler->filter('.checkout-standard form')->form();
305
+		$form['ca_billingoption']->select($crawler->filter('.checkout-standard-address .item-address input')->attr('value'));
306
+		$crawler = $client->submit($form);
307 307
 
308
-		$form = $crawler->filter( '.checkout-standard form' )->form();
309
-		$form['c_deliveryoption']->select( $crawler->filter( '.checkout-standard-delivery .item-service input' )->attr( 'value' ) );
310
-		$crawler = $client->submit( $form );
308
+		$form = $crawler->filter('.checkout-standard form')->form();
309
+		$form['c_deliveryoption']->select($crawler->filter('.checkout-standard-delivery .item-service input')->attr('value'));
310
+		$crawler = $client->submit($form);
311 311
 
312
-		$form = $crawler->filter( '.checkout-standard form' )->form();
313
-		$form['c_paymentoption']->select( $crawler->filter( '.checkout-standard-payment .item-service input' )->attr( 'value' ) );
314
-		$crawler = $client->submit( $form );
312
+		$form = $crawler->filter('.checkout-standard form')->form();
313
+		$form['c_paymentoption']->select($crawler->filter('.checkout-standard-payment .item-service input')->attr('value'));
314
+		$crawler = $client->submit($form);
315 315
 
316 316
 		return $crawler;
317 317
 	}
Please login to merge, or discard this patch.