Completed
Push — master ( 95e8d1...b686ff )
by Aimeos
02:04
created
Tests/Controller/AdminControllerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
 	{
12 12
 		$client = static::createClient();
13 13
 
14
-		$client->request( 'GET', '/admin' );
14
+		$client->request('GET', '/admin');
15 15
 		$response = $client->getResponse();
16 16
 
17
-		$this->assertEquals( 200, $response->getStatusCode() );
18
-		$this->assertContains( '<form class="login"', $response->getContent() );
17
+		$this->assertEquals(200, $response->getStatusCode());
18
+		$this->assertContains('<form class="login"', $response->getContent());
19 19
 	}
20 20
 }
Please login to merge, or discard this patch.
Composer/ScriptHandler.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
 	 * @param Event $event Event instance
29 29
 	 * @throws \RuntimeException If an error occured
30 30
 	 */
31
-	public static function setupDatabase( Event $event )
31
+	public static function setupDatabase(Event $event)
32 32
 	{
33 33
 		$options = $env = array();
34 34
 
35
-		if( $event->isDevMode() ) {
35
+		if ($event->isDevMode()) {
36 36
 			$options[] = '--option=setup/default/demo:1';
37 37
 		} else {
38 38
 			$env[] = '--env=prod';
39 39
 		}
40 40
 
41
-		self::executeCommand( $event, 'aimeos:setup', $options + $env );
42
-		self::executeCommand( $event, 'aimeos:cache', $env );
41
+		self::executeCommand($event, 'aimeos:setup', $options + $env);
42
+		self::executeCommand($event, 'aimeos:cache', $env);
43 43
 	}
44 44
 
45 45
 
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
 	 * @param Event $event Event instance
50 50
 	 * @throws \RuntimeException If an error occured
51 51
 	 */
52
-	public static function updateConfig( Event $event )
52
+	public static function updateConfig(Event $event)
53 53
 	{
54
-		$event->getIO()->write( 'Ensure existing config and routing for the shop bundle' );
54
+		$event->getIO()->write('Ensure existing config and routing for the shop bundle');
55 55
 
56
-		$options = self::getOptions( $event );
56
+		$options = self::getOptions($event);
57 57
 
58
-		if( isset( $options['symfony-app-dir'] ) )
58
+		if (isset($options['symfony-app-dir']))
59 59
 		{
60
-			self::updateConfigFile( $options['symfony-app-dir'] . '/config/config.yml' );
61
-			self::updateRoutingFile( $options['symfony-app-dir'] . '/config/routing.yml' );
60
+			self::updateConfigFile($options['symfony-app-dir'].'/config/config.yml');
61
+			self::updateRoutingFile($options['symfony-app-dir'].'/config/routing.yml');
62 62
 		}
63 63
 	}
64 64
 
@@ -69,26 +69,26 @@  discard block
 block discarded – undo
69 69
 	 * @param Event $event Event instance
70 70
 	 * @throws \RuntimeException If an error occured
71 71
 	 */
72
-	public static function installBundle( Event $event )
72
+	public static function installBundle(Event $event)
73 73
 	{
74
-		$event->getIO()->write( 'Installing the Aimeos shop bundle' );
74
+		$event->getIO()->write('Installing the Aimeos shop bundle');
75 75
 
76
-		$options = self::getOptions( $event );
76
+		$options = self::getOptions($event);
77 77
 		$securedir = 'var';
78 78
 
79
-		if( isset( $options['symfony-app-dir'] ) && is_dir( $options['symfony-app-dir'] ) ) {
79
+		if (isset($options['symfony-app-dir']) && is_dir($options['symfony-app-dir'])) {
80 80
 			$securedir = $options['symfony-app-dir'];
81 81
 		}
82 82
 
83
-		if( isset( $options['symfony-var-dir'] ) && is_dir( $options['symfony-var-dir'] ) ) {
83
+		if (isset($options['symfony-var-dir']) && is_dir($options['symfony-var-dir'])) {
84 84
 			$securedir = $options['symfony-var-dir'];
85 85
 		}
86 86
 
87
-		$webdir = ( isset( $options['symfony-web-dir'] ) ? $options['symfony-web-dir'] : 'public' );
87
+		$webdir = (isset($options['symfony-web-dir']) ? $options['symfony-web-dir'] : 'public');
88 88
 
89
-		self::createDirectory( $securedir . '/secure' );
90
-		self::createDirectory( $webdir . '/preview' );
91
-		self::createDirectory( $webdir . '/files' );
89
+		self::createDirectory($securedir.'/secure');
90
+		self::createDirectory($webdir.'/preview');
91
+		self::createDirectory($webdir.'/files');
92 92
 	}
93 93
 
94 94
 
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 	 * @param string $dir Absolute path of the new directory
99 99
 	 * @throws \RuntimeException If directory couldn't be created
100 100
 	 */
101
-	protected static function createDirectory( $dir )
101
+	protected static function createDirectory($dir)
102 102
 	{
103 103
 		$perm = 0755;
104 104
 
105
-		if( !is_dir( $dir ) && !mkdir( $dir, $perm, true ) )
105
+		if (!is_dir($dir) && !mkdir($dir, $perm, true))
106 106
 		{
107 107
 			$msg = 'Unable to create directory "%1$s" with permission "%2$s"';
108
-			throw new \RuntimeException( sprintf( $msg, $dir, $perm ) );
108
+			throw new \RuntimeException(sprintf($msg, $dir, $perm));
109 109
 		}
110 110
 	}
111 111
 
@@ -118,28 +118,28 @@  discard block
 block discarded – undo
118 118
 	 * @param array List of configuration options for the given command
119 119
 	 * @throws \RuntimeException If the command couldn't be executed
120 120
 	 */
121
-	protected static function executeCommand( Event $event, $cmd, array $options = array() )
121
+	protected static function executeCommand(Event $event, $cmd, array $options = array())
122 122
 	{
123
-		$php = escapeshellarg( self::getPhp() );
124
-		$console = escapeshellarg( self::getConsoleDir( $event ) . '/console' );
125
-		$cmd = escapeshellarg( $cmd );
123
+		$php = escapeshellarg(self::getPhp());
124
+		$console = escapeshellarg(self::getConsoleDir($event).'/console');
125
+		$cmd = escapeshellarg($cmd);
126 126
 
127
-		foreach( $options as $key => $option ) {
128
-			$options[$key] = escapeshellarg( $option );
127
+		foreach ($options as $key => $option) {
128
+			$options[$key] = escapeshellarg($option);
129 129
 		}
130 130
 
131
-		if( $event->getIO()->isDecorated() ) {
131
+		if ($event->getIO()->isDecorated()) {
132 132
 			$console .= ' --ansi';
133 133
 		}
134 134
 
135
-		$process = new Process( $php . ' ' . $console . ' ' . $cmd . ' ' . implode( ' ', $options ), null, null, null, 3600 );
135
+		$process = new Process($php.' '.$console.' '.$cmd.' '.implode(' ', $options), null, null, null, 3600);
136 136
 
137
-		$process->run( function( $type, $buffer ) use ( $event ) {
138
-			$event->getIO()->write( $buffer, false );
137
+		$process->run(function($type, $buffer) use ($event) {
138
+			$event->getIO()->write($buffer, false);
139 139
 		} );
140 140
 
141
-		if( !$process->isSuccessful() ) {
142
-			throw new \RuntimeException( sprintf( 'An error occurred when executing the "%s" command', escapeshellarg( $cmd ) ) );
141
+		if (!$process->isSuccessful()) {
142
+			throw new \RuntimeException(sprintf('An error occurred when executing the "%s" command', escapeshellarg($cmd)));
143 143
 		}
144 144
 	}
145 145
 
@@ -152,17 +152,17 @@  discard block
 block discarded – undo
152 152
 	 * @return string The path to the console directory
153 153
 	 * @throws \RuntimeException If console directory couldn't be found
154 154
 	 */
155
-	protected static function getConsoleDir( Event $event )
155
+	protected static function getConsoleDir(Event $event)
156 156
 	{
157
-		$options = self::getOptions( $event );
157
+		$options = self::getOptions($event);
158 158
 
159 159
 		$bindir = 'bin';
160 160
 
161
-		if( isset( $options['symfony-app-dir'] ) && is_dir( $options['symfony-app-dir'] ) ) {
161
+		if (isset($options['symfony-app-dir']) && is_dir($options['symfony-app-dir'])) {
162 162
 			$bindir = $options['symfony-app-dir'];
163 163
 		}
164 164
 
165
-		if( isset( $options['symfony-bin-dir'] ) && is_dir( $options['symfony-bin-dir'] ) ) {
165
+		if (isset($options['symfony-bin-dir']) && is_dir($options['symfony-bin-dir'])) {
166 166
 			$bindir = $options['symfony-bin-dir'];
167 167
 		}
168 168
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @param Event $event Command event object
177 177
 	 * @return array Associative list of option keys and values
178 178
 	 */
179
-	protected static function getOptions( Event $event )
179
+	protected static function getOptions(Event $event)
180 180
 	{
181 181
 		return $event->getComposer()->getPackage()->getExtra();
182 182
 	}
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
 	{
193 193
 		$phpFinder = new PhpExecutableFinder;
194 194
 
195
-		if( !( $phpPath = $phpFinder->find() ) ) {
196
-			throw new \RuntimeException( 'The php executable could not be found, add it to your PATH environment variable and try again' );
195
+		if (!($phpPath = $phpFinder->find())) {
196
+			throw new \RuntimeException('The php executable could not be found, add it to your PATH environment variable and try again');
197 197
 		}
198 198
 
199 199
 		return $phpPath;
@@ -206,15 +206,15 @@  discard block
 block discarded – undo
206 206
 	 * @param string $filename Name of the YAML config file
207 207
 	 * @throws \RuntimeException If file is not found
208 208
 	 */
209
-	protected static function updateConfigFile( $filename )
209
+	protected static function updateConfigFile($filename)
210 210
 	{
211
-		if( ( $content = file_get_contents( $filename ) ) === false ) {
212
-			throw new \RuntimeException( sprintf( 'File "%1$s" not found', $filename ) );
211
+		if (($content = file_get_contents($filename)) === false) {
212
+			throw new \RuntimeException(sprintf('File "%1$s" not found', $filename));
213 213
 		}
214 214
 
215
-		if( self::addAsseticBundle( $content ) === true ) {
215
+		if (self::addAsseticBundle($content) === true) {
216 216
 			$fs = new Filesystem();
217
-			$fs->dumpFile( $filename, $content );
217
+			$fs->dumpFile($filename, $content);
218 218
 		}
219 219
 	}
220 220
 
@@ -225,29 +225,29 @@  discard block
 block discarded – undo
225 225
 	 * @param string $filename Name of the YAML config file
226 226
 	 * @throws \RuntimeException If file is not found
227 227
 	 */
228
-	protected static function updateRoutingFile( $filename )
228
+	protected static function updateRoutingFile($filename)
229 229
 	{
230 230
 		$content = '';
231 231
 
232
-		if( file_exists( $filename ) && ( $content = file_get_contents( $filename ) ) === false ) {
233
-			throw new \RuntimeException( sprintf( 'File "%1$s" not readable', $filename ) );
232
+		if (file_exists($filename) && ($content = file_get_contents($filename)) === false) {
233
+			throw new \RuntimeException(sprintf('File "%1$s" not readable', $filename));
234 234
 		}
235 235
 
236
-		if( strpos( $content, 'fos_user:' ) === false )
236
+		if (strpos($content, 'fos_user:') === false)
237 237
 		{
238
-			$content .= "\n" . 'fos_user:
238
+			$content .= "\n".'fos_user:
239 239
     resource: "@FOSUserBundle/Resources/config/routing/all.xml"';
240 240
 		}
241 241
 
242
-		if( strpos( $content, 'aimeos_shop:' ) === false )
242
+		if (strpos($content, 'aimeos_shop:') === false)
243 243
 		{
244
-			$content .= "\n" . 'aimeos_shop:
244
+			$content .= "\n".'aimeos_shop:
245 245
     resource: "@AimeosShopBundle/Resources/config/routing.yml"
246 246
     prefix: /';
247 247
 		}
248 248
 
249 249
 		$fs = new Filesystem();
250
-		$fs->dumpFile( $filename, $content );
250
+		$fs->dumpFile($filename, $content);
251 251
 	}
252 252
 
253 253
 
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
 	 * @param string &$content Content of the config.yml file
258 258
 	 * @return boolean True if modified, false if not
259 259
 	 */
260
-	protected static function addAsseticBundle( &$content )
260
+	protected static function addAsseticBundle(&$content)
261 261
 	{
262
-		if( preg_match( "/    bundles:[ ]*\[.*'AimeosShopBundle'.*\]/", $content ) !== 1 )
262
+		if (preg_match("/    bundles:[ ]*\[.*'AimeosShopBundle'.*\]/", $content) !== 1)
263 263
 		{
264
-			$search = array( "/    bundles:[ ]*\[([^\]]+)\]/", "/    bundles:[ ]*\[([ ]*)\]/" );
265
-			$replace = array( "    bundles: [$1,'AimeosShopBundle']", "    bundles: ['AimeosShopBundle']" );
264
+			$search = array("/    bundles:[ ]*\[([^\]]+)\]/", "/    bundles:[ ]*\[([ ]*)\]/");
265
+			$replace = array("    bundles: [$1,'AimeosShopBundle']", "    bundles: ['AimeosShopBundle']");
266 266
 
267
-			if( ( $content = preg_replace( $search, $replace, $content ) ) !== null ) {
267
+			if (($content = preg_replace($search, $replace, $content)) !== null) {
268 268
 				return true;
269 269
 			}
270 270
 		}
Please login to merge, or discard this patch.
Controller/JsonadmController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 	 * @param string $site Unique site code
120 120
 	 * @param string Resource location, e.g. "product/property/type"
121 121
 	 * @param string $lang Language code
122
-	 * @return \Aimeos\MShop\Context\Item\Iface Context item
122
+	 * @return \Aimeos\Admin\JsonAdm\Iface Context item
123 123
 	 */
124 124
 	protected function createAdmin( $site, $resource, $lang )
125 125
 	{
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 	 * @param string $site Unique site code
32 32
 	 * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output
33 33
 	 */
34
-	public function deleteAction( ServerRequestInterface $request, $resource, $site = 'default' )
34
+	public function deleteAction(ServerRequestInterface $request, $resource, $site = 'default')
35 35
 	{
36
-		$client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) );
37
-		return $client->delete( $request, new Response() );
36
+		$client = $this->createAdmin($site, $resource, $request->getAttribute('lang', 'en'));
37
+		return $client->delete($request, new Response());
38 38
 	}
39 39
 
40 40
 
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
 	 * @param string $site Unique site code
47 47
 	 * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output
48 48
 	 */
49
-	public function getAction( ServerRequestInterface $request, $resource, $site = 'default' )
49
+	public function getAction(ServerRequestInterface $request, $resource, $site = 'default')
50 50
 	{
51
-		$client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) );
52
-		return $client->get( $request, new Response() );
51
+		$client = $this->createAdmin($site, $resource, $request->getAttribute('lang', 'en'));
52
+		return $client->get($request, new Response());
53 53
 	}
54 54
 
55 55
 
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	 * @param string $site Unique site code
62 62
 	 * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output
63 63
 	 */
64
-	public function patchAction( ServerRequestInterface $request, $resource, $site = 'default' )
64
+	public function patchAction(ServerRequestInterface $request, $resource, $site = 'default')
65 65
 	{
66
-		$client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) );
67
-		return $client->patch( $request, new Response() );
66
+		$client = $this->createAdmin($site, $resource, $request->getAttribute('lang', 'en'));
67
+		return $client->patch($request, new Response());
68 68
 	}
69 69
 
70 70
 
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
 	 * @param string $site Unique site code
77 77
 	 * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output
78 78
 	 */
79
-	public function postAction( ServerRequestInterface $request, $resource, $site = 'default' )
79
+	public function postAction(ServerRequestInterface $request, $resource, $site = 'default')
80 80
 	{
81
-		$client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) );
82
-		return $client->post( $request, new Response() );
81
+		$client = $this->createAdmin($site, $resource, $request->getAttribute('lang', 'en'));
82
+		return $client->post($request, new Response());
83 83
 	}
84 84
 
85 85
 
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
 	 * @param string $site Unique site code
92 92
 	 * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output
93 93
 	 */
94
-	public function putAction( ServerRequestInterface $request, $resource, $site = 'default' )
94
+	public function putAction(ServerRequestInterface $request, $resource, $site = 'default')
95 95
 	{
96
-		$client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) );
97
-		return $client->put( $request, new Response() );
96
+		$client = $this->createAdmin($site, $resource, $request->getAttribute('lang', 'en'));
97
+		return $client->put($request, new Response());
98 98
 	}
99 99
 
100 100
 
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
 	 * @param string $site Unique site code
107 107
 	 * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output
108 108
 	 */
109
-	public function optionsAction( ServerRequestInterface $request, $resource = '', $site = 'default' )
109
+	public function optionsAction(ServerRequestInterface $request, $resource = '', $site = 'default')
110 110
 	{
111
-		$client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) );
112
-		return $client->options( $request, new Response() );
111
+		$client = $this->createAdmin($site, $resource, $request->getAttribute('lang', 'en'));
112
+		return $client->options($request, new Response());
113 113
 	}
114 114
 
115 115
 
@@ -121,18 +121,18 @@  discard block
 block discarded – undo
121 121
 	 * @param string $lang Language code
122 122
 	 * @return \Aimeos\MShop\Context\Item\Iface Context item
123 123
 	 */
124
-	protected function createAdmin( $site, $resource, $lang )
124
+	protected function createAdmin($site, $resource, $lang)
125 125
 	{
126
-		$aimeos = $this->get( 'aimeos' )->get();
127
-		$templatePaths = $aimeos->getCustomPaths( 'admin/jsonadm/templates' );
126
+		$aimeos = $this->get('aimeos')->get();
127
+		$templatePaths = $aimeos->getCustomPaths('admin/jsonadm/templates');
128 128
 
129
-		$context = $this->get( 'aimeos.context' )->get( false, 'backend' );
130
-		$context->setI18n( $this->get('aimeos.i18n')->get( array( $lang, 'en' ) ) );
131
-		$context->setLocale( $this->get('aimeos.locale')->getBackend( $context, $site ) );
129
+		$context = $this->get('aimeos.context')->get(false, 'backend');
130
+		$context->setI18n($this->get('aimeos.i18n')->get(array($lang, 'en')));
131
+		$context->setLocale($this->get('aimeos.locale')->getBackend($context, $site));
132 132
 
133
-		$view = $this->get('aimeos.view')->create( $context, $templatePaths, $lang );
134
-		$context->setView( $view );
133
+		$view = $this->get('aimeos.view')->create($context, $templatePaths, $lang);
134
+		$context->setView($view);
135 135
 
136
-		return \Aimeos\Admin\JsonAdm::create( $context, $aimeos, $resource );
136
+		return \Aimeos\Admin\JsonAdm::create($context, $aimeos, $resource);
137 137
 	}
138 138
 }
Please login to merge, or discard this patch.
Service/Support.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
28 28
 	 * @return array List of group codes the user is in
29 29
 	 */
30
-	public function getGroups( \Aimeos\MShop\Context\Item\Iface $context )
30
+	public function getGroups(\Aimeos\MShop\Context\Item\Iface $context)
31 31
 	{
32 32
 		$list = array();
33
-		$manager = \Aimeos\MShop::create( $context, 'customer/group' );
33
+		$manager = \Aimeos\MShop::create($context, 'customer/group');
34 34
 
35 35
 		$search = $manager->createSearch();
36
-		$search->setConditions( $search->compare( '==', 'customer.group.id', $context->getGroupIds() ) );
36
+		$search->setConditions($search->compare('==', 'customer.group.id', $context->getGroupIds()));
37 37
 
38
-		foreach( $manager->searchItems( $search ) as $item ) {
38
+		foreach ($manager->searchItems($search) as $item) {
39 39
 			$list[] = $item->getCode();
40 40
 		}
41 41
 
Please login to merge, or discard this patch.
Service/Locale.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * @param RequestStack $requestStack Current request stack
33 33
 	 * @param Container $container Container object to access parameters
34 34
 	 */
35
-	public function __construct( RequestStack $requestStack, Container $container )
35
+	public function __construct(RequestStack $requestStack, Container $container)
36 36
 	{
37 37
 		$this->requestStack = $requestStack;
38 38
 		$this->container = $container;
@@ -45,19 +45,19 @@  discard block
 block discarded – undo
45 45
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
46 46
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
47 47
 	 */
48
-	public function get( \Aimeos\MShop\Context\Item\Iface $context )
48
+	public function get(\Aimeos\MShop\Context\Item\Iface $context)
49 49
 	{
50
-		if( $this->locale === null )
50
+		if ($this->locale === null)
51 51
 		{
52
-			$status = $this->container->getParameter( 'aimeos_shop.disable_sites' );
52
+			$status = $this->container->getParameter('aimeos_shop.disable_sites');
53 53
 			$request = $this->requestStack->getMasterRequest();
54 54
 
55
-			$site = $request->attributes->get( 'site', $request->query->get( 'site', 'default' ) );
56
-			$currency = $request->attributes->get( 'currency', $request->query->get( 'currency', '' ) );
57
-			$lang = $request->attributes->get( 'locale', $request->query->get( 'locale', '' ) );
55
+			$site = $request->attributes->get('site', $request->query->get('site', 'default'));
56
+			$currency = $request->attributes->get('currency', $request->query->get('currency', ''));
57
+			$lang = $request->attributes->get('locale', $request->query->get('locale', ''));
58 58
 
59
-			$localeManager = \Aimeos\MShop::create( $context, 'locale' );
60
-			$this->locale = $localeManager->bootstrap( $site, $lang, $currency, $status );
59
+			$localeManager = \Aimeos\MShop::create($context, 'locale');
60
+			$this->locale = $localeManager->bootstrap($site, $lang, $currency, $status);
61 61
 		}
62 62
 
63 63
 		return $this->locale;
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
 	 * @param string $site Unique site code
72 72
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
73 73
 	 */
74
-	public function getBackend( \Aimeos\MShop\Context\Item\Iface $context, $site )
74
+	public function getBackend(\Aimeos\MShop\Context\Item\Iface $context, $site)
75 75
 	{
76
-		$localeManager = \Aimeos\MShop::create( $context, 'locale' );
76
+		$localeManager = \Aimeos\MShop::create($context, 'locale');
77 77
 
78 78
 		try {
79
-			$localeItem = $localeManager->bootstrap( $site, '', '', false, null, true );
80
-		} catch( \Aimeos\MShop\Exception $e ) {
79
+			$localeItem = $localeManager->bootstrap($site, '', '', false, null, true);
80
+		} catch (\Aimeos\MShop\Exception $e) {
81 81
 			$localeItem = $localeManager->createItem();
82 82
 		}
83 83
 
Please login to merge, or discard this patch.
Command/Command.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
 	 * @param InputInterface $input Input object
31 31
 	 * @return \Aimeos\MShop\Locale\Item\Site\Interface[] List of site items
32 32
 	 */
33
-	protected function getSiteItems( \Aimeos\MShop\Context\Item\Iface $context, InputInterface $input )
33
+	protected function getSiteItems(\Aimeos\MShop\Context\Item\Iface $context, InputInterface $input)
34 34
 	{
35
-		$manager = \Aimeos\MShop::create( $context, 'locale/site' );
35
+		$manager = \Aimeos\MShop::create($context, 'locale/site');
36 36
 		$search = $manager->createSearch();
37 37
 
38
-		if( ( $codes = (string) $input->getArgument( 'site' ) ) !== '' ) {
39
-			$search->setConditions( $search->compare( '==', 'locale.site.code', explode( ' ', $codes ) ) );
38
+		if (($codes = (string) $input->getArgument('site')) !== '') {
39
+			$search->setConditions($search->compare('==', 'locale.site.code', explode(' ', $codes)));
40 40
 		}
41 41
 
42
-		return $manager->searchItems( $search );
42
+		return $manager->searchItems($search);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
Tests/Controller/JqadmControllerTest.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 		$client = static::createClient(array(), array(
13 13
 			'PHP_AUTH_USER' => 'admin',
14 14
 			'PHP_AUTH_PW'   => 'adminpass',
15
-		) );
15
+		));
16 16
 
17
-		$client->request( 'GET', '/unittest/jqadm/file/css' );
17
+		$client->request('GET', '/unittest/jqadm/file/css');
18 18
 
19
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
20
-		$this->assertContains( '.aimeos', $client->getResponse()->getContent() );
19
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
20
+		$this->assertContains('.aimeos', $client->getResponse()->getContent());
21 21
 	}
22 22
 
23 23
 
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 		$client = static::createClient(array(), array(
27 27
 			'PHP_AUTH_USER' => 'admin',
28 28
 			'PHP_AUTH_PW'   => 'adminpass',
29
-		) );
29
+		));
30 30
 
31
-		$client->request( 'GET', '/unittest/jqadm/file/js' );
31
+		$client->request('GET', '/unittest/jqadm/file/js');
32 32
 
33
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
34
-		$this->assertContains( 'Aimeos = {', $client->getResponse()->getContent() );
33
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
34
+		$this->assertContains('Aimeos = {', $client->getResponse()->getContent());
35 35
 	}
36 36
 
37 37
 
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 		$client = static::createClient(array(), array(
41 41
 			'PHP_AUTH_USER' => 'admin',
42 42
 			'PHP_AUTH_PW'   => 'adminpass',
43
-		) );
43
+		));
44 44
 
45
-		$client->request( 'GET', '/unittest/jqadm/copy/product/1' );
45
+		$client->request('GET', '/unittest/jqadm/copy/product/1');
46 46
 		$response = $client->getResponse();
47 47
 
48
-		$this->assertEquals( 200, $response->getStatusCode() );
49
-		$this->assertContains( 'item-product', $response->getContent() );
48
+		$this->assertEquals(200, $response->getStatusCode());
49
+		$this->assertContains('item-product', $response->getContent());
50 50
 	}
51 51
 
52 52
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 		$client = static::createClient(array(), array(
56 56
 			'PHP_AUTH_USER' => 'admin',
57 57
 			'PHP_AUTH_PW'   => 'adminpass',
58
-		) );
58
+		));
59 59
 
60
-		$client->request( 'GET', '/unittest/jqadm/create/product' );
60
+		$client->request('GET', '/unittest/jqadm/create/product');
61 61
 		$response = $client->getResponse();
62 62
 
63
-		$this->assertEquals( 200, $response->getStatusCode() );
64
-		$this->assertContains( 'item-product', $response->getContent() );
63
+		$this->assertEquals(200, $response->getStatusCode());
64
+		$this->assertContains('item-product', $response->getContent());
65 65
 	}
66 66
 
67 67
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 		$client = static::createClient(array(), array(
71 71
 			'PHP_AUTH_USER' => 'admin',
72 72
 			'PHP_AUTH_PW'   => 'adminpass',
73
-		) );
73
+		));
74 74
 
75
-		$client->request( 'GET', '/unittest/jqadm/delete/product/0' );
75
+		$client->request('GET', '/unittest/jqadm/delete/product/0');
76 76
 		$response = $client->getResponse();
77 77
 
78
-		$this->assertEquals( 200, $response->getStatusCode() );
79
-		$this->assertContains( 'list-items', $response->getContent() );
78
+		$this->assertEquals(200, $response->getStatusCode());
79
+		$this->assertContains('list-items', $response->getContent());
80 80
 	}
81 81
 
82 82
 
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
 		$client = static::createClient(array(), array(
86 86
 			'PHP_AUTH_USER' => 'admin',
87 87
 			'PHP_AUTH_PW'   => 'adminpass',
88
-		) );
88
+		));
89 89
 
90
-		$client->request( 'GET', '/unittest/jqadm/export/order' );
90
+		$client->request('GET', '/unittest/jqadm/export/order');
91 91
 		$response = $client->getResponse();
92 92
 
93
-		$this->assertEquals( 200, $response->getStatusCode() );
94
-		$this->assertContains( 'list-items', $response->getContent() );
93
+		$this->assertEquals(200, $response->getStatusCode());
94
+		$this->assertContains('list-items', $response->getContent());
95 95
 	}
96 96
 
97 97
 
@@ -100,13 +100,13 @@  discard block
 block discarded – undo
100 100
 		$client = static::createClient(array(), array(
101 101
 			'PHP_AUTH_USER' => 'admin',
102 102
 			'PHP_AUTH_PW'   => 'adminpass',
103
-		) );
103
+		));
104 104
 
105
-		$client->request( 'GET', '/unittest/jqadm/get/product/1' );
105
+		$client->request('GET', '/unittest/jqadm/get/product/1');
106 106
 		$response = $client->getResponse();
107 107
 
108
-		$this->assertEquals( 200, $response->getStatusCode() );
109
-		$this->assertContains( 'item-product', $response->getContent() );
108
+		$this->assertEquals(200, $response->getStatusCode());
109
+		$this->assertContains('item-product', $response->getContent());
110 110
 	}
111 111
 
112 112
 
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
 		$client = static::createClient(array(), array(
116 116
 			'PHP_AUTH_USER' => 'admin',
117 117
 			'PHP_AUTH_PW'   => 'adminpass',
118
-		) );
118
+		));
119 119
 
120
-		$client->request( 'POST', '/unittest/jqadm/save/product' );
120
+		$client->request('POST', '/unittest/jqadm/save/product');
121 121
 		$response = $client->getResponse();
122 122
 
123
-		$this->assertEquals( 200, $response->getStatusCode() );
124
-		$this->assertContains( 'item-product', $response->getContent() );
123
+		$this->assertEquals(200, $response->getStatusCode());
124
+		$this->assertContains('item-product', $response->getContent());
125 125
 	}
126 126
 
127 127
 
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
 		$client = static::createClient(array(), array(
131 131
 			'PHP_AUTH_USER' => 'admin',
132 132
 			'PHP_AUTH_PW'   => 'adminpass',
133
-		) );
133
+		));
134 134
 
135
-		$client->request( 'GET', '/unittest/jqadm/search/product' );
135
+		$client->request('GET', '/unittest/jqadm/search/product');
136 136
 		$response = $client->getResponse();
137 137
 
138
-		$this->assertEquals( 200, $response->getStatusCode() );
139
-		$this->assertContains( 'list-items', $response->getContent() );
138
+		$this->assertEquals(200, $response->getStatusCode());
139
+		$this->assertContains('list-items', $response->getContent());
140 140
 	}
141 141
 
142 142
 
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
 		$client = static::createClient(array(), array(
146 146
 			'PHP_AUTH_USER' => 'admin',
147 147
 			'PHP_AUTH_PW'   => 'adminpass',
148
-		) );
148
+		));
149 149
 
150
-		$client->request( 'GET', '/invalid/jqadm/search/product' );
150
+		$client->request('GET', '/invalid/jqadm/search/product');
151 151
 		$response = $client->getResponse();
152 152
 
153
-		$this->assertEquals( 500, $response->getStatusCode() );
153
+		$this->assertEquals(500, $response->getStatusCode());
154 154
 	}
155 155
 }
Please login to merge, or discard this patch.
Tests/Controller/BasketControllerTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Aimeos\ShopBundle\Tests\Controller;
4 4
 
5
-use Symfony\Component\HttpFoundation\Response;
6 5
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
7 6
 
8 7
 
Please login to merge, or discard this patch.
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 {
11 11
 	protected function setUp()
12 12
 	{
13
-		\Aimeos\MShop::cache( false );
14
-		\Aimeos\Controller\Frontend::cache( false );
13
+		\Aimeos\MShop::cache(false);
14
+		\Aimeos\Controller\Frontend::cache(false);
15 15
 	}
16 16
 
17 17
 
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
 	{
20 20
 		$client = static::createClient();
21 21
 
22
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
22
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
23 23
 
24
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
25
-		$crawler = $client->click( $link );
24
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
25
+		$crawler = $client->click($link);
26 26
 
27
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
28
-		$crawler = $client->submit( $form );
27
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
28
+		$crawler = $client->submit($form);
29 29
 
30
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
31
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
32
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
30
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
31
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
32
+		$this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value'));
33 33
 	}
34 34
 
35 35
 
@@ -37,18 +37,18 @@  discard block
 block discarded – undo
37 37
 	{
38 38
 		$client = static::createClient();
39 39
 
40
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
40
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
41 41
 
42
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
43
-		$crawler = $client->click( $link );
42
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
43
+		$crawler = $client->click($link);
44 44
 
45
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
45
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
46 46
 		$form['b_prod[0][quantity]'] = 2;
47
-		$crawler = $client->submit( $form );
47
+		$crawler = $client->submit($form);
48 48
 
49
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() );
50
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
51
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
49
+		$this->assertEquals(1, $crawler->filter('.basket-standard')->count());
50
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
51
+		$this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value'));
52 52
 	}
53 53
 
54 54
 
@@ -56,26 +56,26 @@  discard block
 block discarded – undo
56 56
 	{
57 57
 		$client = static::createClient();
58 58
 
59
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
59
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
60 60
 
61
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
62
-		$crawler = $client->click( $link );
61
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
62
+		$crawler = $client->click($link);
63 63
 
64
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
65
-		$crawler = $client->submit( $form );
64
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
65
+		$crawler = $client->submit($form);
66 66
 
67
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
68
-		$this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
67
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
68
+		$this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value'));
69 69
 
70 70
 
71
-		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
72
-		$crawler = $client->click( $link );
71
+		$link = $crawler->filter('.basket-standard .btn-back')->link();
72
+		$crawler = $client->click($link);
73 73
 
74
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
75
-		$crawler = $client->submit( $form );
74
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
75
+		$crawler = $client->submit($form);
76 76
 
77
-		$this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() );
78
-		$this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') );
77
+		$this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count());
78
+		$this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value'));
79 79
 	}
80 80
 
81 81
 
@@ -83,19 +83,19 @@  discard block
 block discarded – undo
83 83
 	{
84 84
 		$client = static::createClient();
85 85
 
86
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
86
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
87 87
 
88
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
89
-		$crawler = $client->click( $link );
88
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
89
+		$crawler = $client->click($link);
90 90
 
91
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
92
-		$crawler = $client->submit( $form );
91
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
92
+		$crawler = $client->submit($form);
93 93
 
94 94
 
95
-		$link = $crawler->filter( '.basket-standard .product .action .delete' )->link();
96
-		$crawler = $client->click( $link );
95
+		$link = $crawler->filter('.basket-standard .product .action .delete')->link();
96
+		$crawler = $client->click($link);
97 97
 
98
-		$this->assertEquals( 0, $crawler->filter( '.basket-standard .product' )->count() );
98
+		$this->assertEquals(0, $crawler->filter('.basket-standard .product')->count());
99 99
 	}
100 100
 
101 101
 
@@ -103,25 +103,25 @@  discard block
 block discarded – undo
103 103
 	{
104 104
 		$client = static::createClient();
105 105
 
106
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
106
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
107 107
 
108
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
109
-		$crawler = $client->click( $link );
108
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
109
+		$crawler = $client->click($link);
110 110
 
111
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
112
-		$crawler = $client->submit( $form );
111
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
112
+		$crawler = $client->submit($form);
113 113
 
114 114
 
115
-		$link = $crawler->filter( '.basket-standard .product .quantity .change' )->link();
116
-		$crawler = $client->click( $link );
115
+		$link = $crawler->filter('.basket-standard .product .quantity .change')->link();
116
+		$crawler = $client->click($link);
117 117
 
118
-		$this->assertEquals( 2, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
118
+		$this->assertEquals(2, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
119 119
 
120 120
 
121
-		$link = $crawler->filter( '.basket-standard .product .quantity .change' )->eq( 0 )->link();
122
-		$crawler = $client->click( $link );
121
+		$link = $crawler->filter('.basket-standard .product .quantity .change')->eq(0)->link();
122
+		$crawler = $client->click($link);
123 123
 
124
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
124
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
125 125
 	}
126 126
 
127 127
 
@@ -129,19 +129,19 @@  discard block
 block discarded – undo
129 129
 	{
130 130
 		$client = static::createClient();
131 131
 
132
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
132
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
133 133
 
134
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
135
-		$crawler = $client->click( $link );
134
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
135
+		$crawler = $client->click($link);
136 136
 
137
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
138
-		$crawler = $client->submit( $form );
137
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
138
+		$crawler = $client->submit($form);
139 139
 
140
-		$form = $crawler->filter( '.basket-standard .btn-update' )->form();
140
+		$form = $crawler->filter('.basket-standard .btn-update')->form();
141 141
 		$form['b_prod[0][quantity]'] = 3;
142
-		$crawler = $client->submit( $form );
142
+		$crawler = $client->submit($form);
143 143
 
144
-		$this->assertEquals( 3, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) );
144
+		$this->assertEquals(3, $crawler->filter('.basket-standard .product .quantity .value')->attr('value'));
145 145
 	}
146 146
 
147 147
 
@@ -149,26 +149,26 @@  discard block
 block discarded – undo
149 149
 	{
150 150
 		$client = static::createClient();
151 151
 
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-items .product a:contains("Unittest: Bundle")' )->link();
155
-		$crawler = $client->click( $link );
154
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
155
+		$crawler = $client->click($link);
156 156
 
157
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
158
-		$crawler = $client->submit( $form );
157
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
158
+		$crawler = $client->submit($form);
159 159
 
160 160
 
161
-		$form = $crawler->filter( '.basket-standard-coupon .coupon-new button' )->form();
161
+		$form = $crawler->filter('.basket-standard-coupon .coupon-new button')->form();
162 162
 		$form['b_coupon'] = '90AB';
163
-		$crawler = $client->submit( $form );
163
+		$crawler = $client->submit($form);
164 164
 
165
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product:contains("Geldwerter Nachlass")' )->count() );
165
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product:contains("Geldwerter Nachlass")')->count());
166 166
 
167 167
 
168
-		$link = $crawler->filter( '.basket-standard-coupon .delete' )->link();
169
-		$crawler = $client->click( $link );
168
+		$link = $crawler->filter('.basket-standard-coupon .delete')->link();
169
+		$crawler = $client->click($link);
170 170
 
171
-		$this->assertEquals( 1, $crawler->filter( '.basket-standard .product' )->count() );
171
+		$this->assertEquals(1, $crawler->filter('.basket-standard .product')->count());
172 172
 	}
173 173
 
174 174
 
@@ -176,15 +176,15 @@  discard block
 block discarded – undo
176 176
 	{
177 177
 		$client = static::createClient();
178 178
 
179
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
179
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
180 180
 
181
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
182
-		$crawler = $client->click( $link );
181
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
182
+		$crawler = $client->click($link);
183 183
 
184
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
185
-		$crawler = $client->submit( $form );
184
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
185
+		$crawler = $client->submit($form);
186 186
 
187
-		$this->assertEquals( 1, $crawler->filter( '.basket-related-bought .product' )->count() );
187
+		$this->assertEquals(1, $crawler->filter('.basket-related-bought .product')->count());
188 188
 	}
189 189
 
190 190
 
@@ -192,47 +192,47 @@  discard block
 block discarded – undo
192 192
 	{
193 193
 		$client = static::createClient();
194 194
 
195
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
195
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
196 196
 
197
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
198
-		$crawler = $client->click( $link );
197
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link();
198
+		$crawler = $client->click($link);
199 199
 
200
-		$form = $crawler->filter( '.catalog-detail .addbasket .btn-primary' )->form();
201
-		$crawler = $client->submit( $form );
200
+		$form = $crawler->filter('.catalog-detail .addbasket .btn-primary')->form();
201
+		$crawler = $client->submit($form);
202 202
 
203
-		$link = $crawler->filter( '.basket-standard .btn-back' )->link();
204
-		$crawler = $client->click( $link );
203
+		$link = $crawler->filter('.basket-standard .btn-back')->link();
204
+		$crawler = $client->click($link);
205 205
 
206
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail .product:contains("Unittest: Bundle")' )->count() );
206
+		$this->assertEquals(1, $crawler->filter('.catalog-detail .product:contains("Unittest: Bundle")')->count());
207 207
 	}
208 208
 
209 209
 
210 210
 	public function testMiniComponent()
211 211
 	{
212 212
 		$client = static::createClient();
213
-		$client->request( 'GET', '/unittest/de/EUR/test/basketminicomponent' );
213
+		$client->request('GET', '/unittest/de/EUR/test/basketminicomponent');
214 214
 
215
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
216
-		$this->assertContains( 'aimeos basket-mini', $client->getResponse()->getContent() );
215
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
216
+		$this->assertContains('aimeos basket-mini', $client->getResponse()->getContent());
217 217
 	}
218 218
 
219 219
 
220 220
 	public function testRelatedComponent()
221 221
 	{
222 222
 		$client = static::createClient();
223
-		$client->request( 'GET', '/unittest/de/EUR/test/basketrelatedcomponent' );
223
+		$client->request('GET', '/unittest/de/EUR/test/basketrelatedcomponent');
224 224
 
225
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
226
-		$this->assertContains( 'aimeos basket-related', $client->getResponse()->getContent() );
225
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
226
+		$this->assertContains('aimeos basket-related', $client->getResponse()->getContent());
227 227
 	}
228 228
 
229 229
 
230 230
 	public function testStandardComponent()
231 231
 	{
232 232
 		$client = static::createClient();
233
-		$client->request( 'GET', '/unittest/de/EUR/test/basketstandardcomponent' );
233
+		$client->request('GET', '/unittest/de/EUR/test/basketstandardcomponent');
234 234
 
235
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
236
-		$this->assertContains( 'aimeos basket-standard', $client->getResponse()->getContent() );
235
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
236
+		$this->assertContains('aimeos basket-standard', $client->getResponse()->getContent());
237 237
 	}
238 238
 }
Please login to merge, or discard this patch.
Tests/Controller/CatalogControllerTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Aimeos\ShopBundle\Tests\Controller;
4 4
 
5
-use Symfony\Component\HttpFoundation\Response;
6 5
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
7 6
 
8 7
 
Please login to merge, or discard this patch.
Spacing   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -10,290 +10,290 @@
 block discarded – undo
10 10
 {
11 11
 	protected function setUp()
12 12
 	{
13
-		\Aimeos\MShop::cache( false );
14
-		\Aimeos\Controller\Frontend::cache( false );
13
+		\Aimeos\MShop::cache(false);
14
+		\Aimeos\Controller\Frontend::cache(false);
15 15
 	}
16 16
 
17 17
 
18 18
 	public function testCount()
19 19
 	{
20 20
 		$client = static::createClient();
21
-		$client->request( 'GET', '/unittest/de/EUR/count' );
21
+		$client->request('GET', '/unittest/de/EUR/count');
22 22
 		$content = $client->getResponse()->getContent();
23 23
 
24
-		$this->assertContains( '".catalog-filter-count li.cat-item"', $content );
25
-		$this->assertContains( '".catalog-filter-attribute .attribute-lists li.attr-item"', $content );
24
+		$this->assertContains('".catalog-filter-count li.cat-item"', $content);
25
+		$this->assertContains('".catalog-filter-attribute .attribute-lists li.attr-item"', $content);
26 26
 	}
27 27
 
28 28
 
29 29
 	public function testFilterSearch()
30 30
 	{
31 31
 		$client = static::createClient();
32
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
32
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
33 33
 
34
-		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-search' )->count() );
34
+		$this->assertEquals(1, $crawler->filter('.catalog-filter-search')->count());
35 35
 
36
-		$form = $crawler->filter( '.catalog-filter-search button' )->form();
36
+		$form = $crawler->filter('.catalog-filter-search button')->form();
37 37
 		$form['f_search'] = 'Cafe';
38
-		$crawler = $client->submit( $form );
38
+		$crawler = $client->submit($form);
39 39
 
40
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->count() );
40
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->count());
41 41
 	}
42 42
 
43 43
 
44 44
  	public function testFilterTree()
45 45
 	{
46 46
 		$client = static::createClient();
47
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
47
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
48 48
 
49
-		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-tree' )->count() );
49
+		$this->assertEquals(1, $crawler->filter('.catalog-filter-tree')->count());
50 50
 
51
-		$link = $crawler->filter( '.catalog-filter-tree a.cat-item' )->link();
52
-		$crawler = $client->click( $link );
51
+		$link = $crawler->filter('.catalog-filter-tree a.cat-item')->link();
52
+		$crawler = $client->click($link);
53 53
 
54
-		$link = $crawler->filter( '.catalog-filter-tree .categories a.cat-item' )->link();
55
-		$crawler = $client->click( $link );
54
+		$link = $crawler->filter('.catalog-filter-tree .categories a.cat-item')->link();
55
+		$crawler = $client->click($link);
56 56
 
57
-		$link = $crawler->filter( '.catalog-filter-tree .coffee a.cat-item' )->link();
58
-		$crawler = $client->click( $link );
57
+		$link = $crawler->filter('.catalog-filter-tree .coffee a.cat-item')->link();
58
+		$crawler = $client->click($link);
59 59
 
60
-		$this->assertEquals( 3, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );
61
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
60
+		$this->assertEquals(3, $crawler->filter('.catalog-stage-breadcrumb li')->count());
61
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count());
62 62
 	}
63 63
 
64 64
 
65 65
 	public function testFilterAttribute()
66 66
 	{
67 67
 		$client = static::createClient();
68
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
68
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
69 69
 
70
-		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() );
70
+		$this->assertEquals(1, $crawler->filter('.catalog-filter-attribute')->count());
71 71
 
72
-		$nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' );
73
-		$id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id');
72
+		$nodes = $crawler->filter('.catalog-filter-attribute .attr-size span:contains("XS")');
73
+		$id = $nodes->parents()->filter('.attr-item')->attr('data-id');
74 74
 
75
-		$form = $crawler->filter( '.catalog-filter .btn-primary' )->form();
75
+		$form = $crawler->filter('.catalog-filter .btn-primary')->form();
76 76
 		$values = $form->getPhpValues();
77
-		$values['f_attrid'] = array( $id );
78
-		$crawler = $client->request( $form->getMethod(), $form->getUri(), $values, $form->getPhpFiles() );
77
+		$values['f_attrid'] = array($id);
78
+		$crawler = $client->request($form->getMethod(), $form->getUri(), $values, $form->getPhpFiles());
79 79
 
80
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
81
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
80
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count());
81
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count());
82 82
 	}
83 83
 
84 84
 
85 85
 	public function testStageBreadcrumb()
86 86
 	{
87 87
 		$client = static::createClient();
88
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
88
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
89 89
 
90
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
91
-		$crawler = $client->click( $link );
90
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
91
+		$crawler = $client->click($link);
92 92
 
93
-		$this->assertEquals( 1, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );
93
+		$this->assertEquals(1, $crawler->filter('.catalog-stage-breadcrumb li')->count());
94 94
 
95
-		$link = $crawler->filter( '.catalog-stage-breadcrumb a' )->link();
96
-		$crawler = $client->click( $link );
95
+		$link = $crawler->filter('.catalog-stage-breadcrumb a')->link();
96
+		$crawler = $client->click($link);
97 97
 
98
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list' )->count() );
99
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
100
-		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
98
+		$this->assertEquals(1, $crawler->filter('.catalog-list')->count());
99
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count());
100
+		$this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count());
101 101
 	}
102 102
 
103 103
 
104 104
 	public function testStageNavigator()
105 105
 	{
106 106
 		$client = static::createClient();
107
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
107
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
108 108
 
109
-		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
110
-		$crawler = $client->click( $link );
109
+		$link = $crawler->filter('.catalog-list .pagination .option-name')->link();
110
+		$crawler = $client->click($link);
111 111
 
112
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->link();
113
-		$crawler = $client->click( $link );
112
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->link();
113
+		$crawler = $client->click($link);
114 114
 
115
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
116
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Cafe Noire Cappuccino")' )->count() );
115
+		$this->assertEquals(1, $crawler->filter('.catalog-detail')->count());
116
+		$this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Cafe Noire Cappuccino")')->count());
117 117
 
118
-		$link = $crawler->filter( '.catalog-stage-navigator a.next' )->link();
119
-		$crawler = $client->click( $link );
118
+		$link = $crawler->filter('.catalog-stage-navigator a.next')->link();
119
+		$crawler = $client->click($link);
120 120
 
121
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
122
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Cafe Noire Expresso")' )->count() );
121
+		$this->assertEquals(1, $crawler->filter('.catalog-detail')->count());
122
+		$this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Cafe Noire Expresso")')->count());
123 123
 
124
-		$link = $crawler->filter( '.catalog-stage-navigator a.prev' )->link();
125
-		$crawler = $client->click( $link );
124
+		$link = $crawler->filter('.catalog-stage-navigator a.prev')->link();
125
+		$crawler = $client->click($link);
126 126
 
127
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
128
-		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Cafe Noire Cappuccino")' )->count() );
127
+		$this->assertEquals(1, $crawler->filter('.catalog-detail')->count());
128
+		$this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Cafe Noire Cappuccino")')->count());
129 129
 	}
130 130
 
131 131
 
132 132
 	public function testListSortationName()
133 133
 	{
134 134
 		$client = static::createClient();
135
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
135
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
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' );
141
-		$this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() );
142
-		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() );
143
-		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
144
-		$this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Unterproduct 3")' )->count() );
140
+		$products = $crawler->filter('.catalog-list-items .product');
141
+		$this->assertEquals(1, $products->eq(0)->filter('h2:contains("Cafe Noire Cappuccino")')->count());
142
+		$this->assertEquals(1, $products->eq(1)->filter('h2:contains("Cafe Noire Expresso")')->count());
143
+		$this->assertEquals(1, $products->eq(2)->filter('h2:contains("Unittest: Bundle")')->count());
144
+		$this->assertEquals(1, $products->eq(3)->filter('h2:contains("Unterproduct 3")')->count());
145 145
 
146
-		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
147
-		$crawler = $client->click( $link );
146
+		$link = $crawler->filter('.catalog-list .pagination .option-name')->link();
147
+		$crawler = $client->click($link);
148 148
 
149
-		$products = $crawler->filter( '.catalog-list-items .product' );
149
+		$products = $crawler->filter('.catalog-list-items .product');
150 150
 
151
-		$this->assertGreaterThan( 3, $products->count() );
152
-		$this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("Unterproduct 3")' )->count() );
153
-		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
154
-		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() );
155
-		$this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() );
151
+		$this->assertGreaterThan(3, $products->count());
152
+		$this->assertEquals(1, $products->eq(0)->filter('h2:contains("Unterproduct 3")')->count());
153
+		$this->assertEquals(1, $products->eq(1)->filter('h2:contains("Unittest: Bundle")')->count());
154
+		$this->assertEquals(1, $products->eq(2)->filter('h2:contains("Cafe Noire Expresso")')->count());
155
+		$this->assertEquals(1, $products->eq(3)->filter('h2:contains("Cafe Noire Cappuccino")')->count());
156 156
 	}
157 157
 
158 158
 
159 159
 	public function testListSortationPrice()
160 160
 	{
161 161
 		$client = static::createClient();
162
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
162
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
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' );
167
+		$products = $crawler->filter('.catalog-list-items .product');
168 168
 		$count = $products->count();
169 169
 
170
-		$this->assertGreaterThan( 2, $count );
171
-		$this->assertEquals( 1, $products->eq( $count - 2 )->filter( '.value:contains("600.00 €")' )->count() );
172
-		$this->assertEquals( 1, $products->eq( $count - 1 )->filter( '.value:contains("600.00 €")' )->count() );
170
+		$this->assertGreaterThan(2, $count);
171
+		$this->assertEquals(1, $products->eq($count - 2)->filter('.value:contains("600.00 €")')->count());
172
+		$this->assertEquals(1, $products->eq($count - 1)->filter('.value:contains("600.00 €")')->count());
173 173
 
174
-		$link = $crawler->filter( '.catalog-list .pagination .option-price' )->link();
175
-		$crawler = $client->click( $link );
174
+		$link = $crawler->filter('.catalog-list .pagination .option-price')->link();
175
+		$crawler = $client->click($link);
176 176
 
177
-		$products = $crawler->filter( '.catalog-list-items .product' );
178
-		$this->assertEquals( 1, $products->eq( 0 )->filter( '.value:contains("600.00 €")' )->count() );
179
-		$this->assertEquals( 1, $products->eq( 1 )->filter( '.value:contains("600.00 €")' )->count() );
177
+		$products = $crawler->filter('.catalog-list-items .product');
178
+		$this->assertEquals(1, $products->eq(0)->filter('.value:contains("600.00 €")')->count());
179
+		$this->assertEquals(1, $products->eq(1)->filter('.value:contains("600.00 €")')->count());
180 180
 	}
181 181
 
182 182
 
183 183
 	public function testDetailPinned()
184 184
 	{
185 185
 		$client = static::createClient();
186
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
186
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
187 187
 
188
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
189
-		$crawler = $client->click( $link );
188
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
189
+		$crawler = $client->click($link);
190 190
 
191
-		$link = $crawler->filter( '.catalog-detail a.actions-button-pin' )->link();
192
-		$crawler = $client->click( $link );
191
+		$link = $crawler->filter('.catalog-detail a.actions-button-pin')->link();
192
+		$crawler = $client->click($link);
193 193
 
194
-		$this->assertEquals( 1, $crawler->filter( '.catalog-session-pinned .pinned-item' )->count() );
194
+		$this->assertEquals(1, $crawler->filter('.catalog-session-pinned .pinned-item')->count());
195 195
 	}
196 196
 
197 197
 
198 198
 	public function testDetailLastSeen()
199 199
 	{
200 200
 		$client = static::createClient();
201
-		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );
201
+		$crawler = $client->request('GET', '/unittest/de/EUR/list');
202 202
 
203
-		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
204
-		$crawler = $client->click( $link );
203
+		$link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link();
204
+		$crawler = $client->click($link);
205 205
 
206
-		$this->assertEquals( 1, $crawler->filter( '.catalog-session-seen .seen-item' )->count() );
206
+		$this->assertEquals(1, $crawler->filter('.catalog-session-seen .seen-item')->count());
207 207
 	}
208 208
 
209 209
 
210 210
 	public function testSuggest()
211 211
 	{
212 212
 		$client = static::createClient();
213
-		$client->request( 'GET', '/unittest/de/EUR/suggest', array( 'f_search' => 'Cafe' ) );
213
+		$client->request('GET', '/unittest/de/EUR/suggest', array('f_search' => 'Cafe'));
214 214
 		$content = $client->getResponse()->getContent();
215 215
 
216
-		$this->assertStringStartsWith( '[{', $content );
216
+		$this->assertStringStartsWith('[{', $content);
217 217
 	}
218 218
 
219 219
 
220 220
 	public function testStock()
221 221
 	{
222 222
 		$client = static::createClient();
223
-		$client->request( 'GET', '/unittest/de/EUR/stock' );
223
+		$client->request('GET', '/unittest/de/EUR/stock');
224 224
 		$content = $client->getResponse()->getContent();
225 225
 
226
-		$this->assertContains( '.aimeos .product .stock', $content );
227
-		$this->assertContains( '.aimeos .catalog-detail-basket', $content );
226
+		$this->assertContains('.aimeos .product .stock', $content);
227
+		$this->assertContains('.aimeos .catalog-detail-basket', $content);
228 228
 	}
229 229
 
230 230
 
231 231
 	public function testCountComponent()
232 232
 	{
233 233
 		$client = static::createClient();
234
-		$client->request( 'GET', '/unittest/de/EUR/test/catalogcountcomponent' );
234
+		$client->request('GET', '/unittest/de/EUR/test/catalogcountcomponent');
235 235
 
236
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
237
-		$this->assertContains( 'catalog-filter-count', $client->getResponse()->getContent() );
236
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
237
+		$this->assertContains('catalog-filter-count', $client->getResponse()->getContent());
238 238
 	}
239 239
 
240 240
 
241 241
 	public function testDetailComponent()
242 242
 	{
243 243
 		$client = static::createClient();
244
-		$client->request( 'GET', '/unittest/de/EUR/test/catalogdetailcomponent' );
244
+		$client->request('GET', '/unittest/de/EUR/test/catalogdetailcomponent');
245 245
 
246
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
247
-		$this->assertContains( 'aimeos catalog-detail', $client->getResponse()->getContent() );
246
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
247
+		$this->assertContains('aimeos catalog-detail', $client->getResponse()->getContent());
248 248
 	}
249 249
 
250 250
 
251 251
 	public function testFilterComponent()
252 252
 	{
253 253
 		$client = static::createClient();
254
-		$client->request( 'GET', '/unittest/de/EUR/test/catalogfiltercomponent' );
254
+		$client->request('GET', '/unittest/de/EUR/test/catalogfiltercomponent');
255 255
 
256
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
257
-		$this->assertContains( 'aimeos catalog-filter', $client->getResponse()->getContent() );
256
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
257
+		$this->assertContains('aimeos catalog-filter', $client->getResponse()->getContent());
258 258
 	}
259 259
 
260 260
 
261 261
 	public function testListComponent()
262 262
 	{
263 263
 		$client = static::createClient();
264
-		$client->request( 'GET', '/unittest/de/EUR/test/cataloglistcomponent' );
264
+		$client->request('GET', '/unittest/de/EUR/test/cataloglistcomponent');
265 265
 
266
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
267
-		$this->assertContains( 'aimeos catalog-list', $client->getResponse()->getContent() );
266
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
267
+		$this->assertContains('aimeos catalog-list', $client->getResponse()->getContent());
268 268
 	}
269 269
 
270 270
 
271 271
 	public function testSessionComponent()
272 272
 	{
273 273
 		$client = static::createClient();
274
-		$client->request( 'GET', '/unittest/de/EUR/test/catalogsessioncomponent' );
274
+		$client->request('GET', '/unittest/de/EUR/test/catalogsessioncomponent');
275 275
 
276
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
277
-		$this->assertContains( 'aimeos catalog-session', $client->getResponse()->getContent() );
276
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
277
+		$this->assertContains('aimeos catalog-session', $client->getResponse()->getContent());
278 278
 	}
279 279
 
280 280
 
281 281
 	public function testStageComponent()
282 282
 	{
283 283
 		$client = static::createClient();
284
-		$client->request( 'GET', '/unittest/de/EUR/test/catalogstagecomponent' );
284
+		$client->request('GET', '/unittest/de/EUR/test/catalogstagecomponent');
285 285
 
286
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
287
-		$this->assertContains( 'aimeos catalog-stage', $client->getResponse()->getContent() );
286
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
287
+		$this->assertContains('aimeos catalog-stage', $client->getResponse()->getContent());
288 288
 	}
289 289
 
290 290
 
291 291
 	public function testStockComponent()
292 292
 	{
293 293
 		$client = static::createClient();
294
-		$client->request( 'GET', '/unittest/de/EUR/test/catalogstockcomponent' );
294
+		$client->request('GET', '/unittest/de/EUR/test/catalogstockcomponent');
295 295
 
296
-		$this->assertEquals( 200, $client->getResponse()->getStatusCode() );
297
-		$this->assertContains( 'stock-list', $client->getResponse()->getContent() );
296
+		$this->assertEquals(200, $client->getResponse()->getStatusCode());
297
+		$this->assertContains('stock-list', $client->getResponse()->getContent());
298 298
 	}
299 299
 }
Please login to merge, or discard this patch.