@@ -40,24 +40,24 @@ discard block |
||
40 | 40 | * @param \Aimeos\MShop\Order\Item\Base\Iface $order Full order with associated items |
41 | 41 | * @return array Two dimensional associative list of order data representing the lines in CSV |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Base\Iface $order ) |
|
43 | + public function process(\Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Base\Iface $order) |
|
44 | 44 | { |
45 | 45 | $result = []; |
46 | 46 | |
47 | - foreach( $order->getProducts() as $item ) |
|
47 | + foreach ($order->getProducts() as $item) |
|
48 | 48 | { |
49 | - if( $subscription->getOrderProductId() != $item->getId() ) { |
|
49 | + if ($subscription->getOrderProductId() != $item->getId()) { |
|
50 | 50 | continue; |
51 | 51 | } |
52 | 52 | |
53 | 53 | $data = []; |
54 | 54 | $list = $item->toArray(); |
55 | 55 | |
56 | - foreach( $item->getAttributeItems() as $attrItem ) |
|
56 | + foreach ($item->getAttributeItems() as $attrItem) |
|
57 | 57 | { |
58 | - foreach( $attrItem->toArray() as $key => $value ) |
|
58 | + foreach ($attrItem->toArray() as $key => $value) |
|
59 | 59 | { |
60 | - if( isset( $list[$key] ) ) { |
|
60 | + if (isset($list[$key])) { |
|
61 | 61 | $list[$key] .= "\n" . $value; |
62 | 62 | } else { |
63 | 63 | $list[$key] = $value; |
@@ -65,16 +65,16 @@ discard block |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | - foreach( $this->getMapping() as $pos => $key ) |
|
68 | + foreach ($this->getMapping() as $pos => $key) |
|
69 | 69 | { |
70 | - if( array_key_exists( $key, $list ) ) { |
|
70 | + if (array_key_exists($key, $list)) { |
|
71 | 71 | $data[$pos] = $list[$key]; |
72 | 72 | } else { |
73 | 73 | $data[$pos] = ''; |
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | - ksort( $data ); |
|
77 | + ksort($data); |
|
78 | 78 | $result[] = $data; |
79 | 79 | } |
80 | 80 |
@@ -40,20 +40,20 @@ discard block |
||
40 | 40 | * @param \Aimeos\MShop\Order\Item\Base\Iface $order Full order with associated items |
41 | 41 | * @return array Two dimensional associative list of order data representing the lines in CSV |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order ) |
|
43 | + public function process(\Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order) |
|
44 | 44 | { |
45 | 45 | $result = []; |
46 | 46 | |
47 | - foreach( $order->getProducts() as $item ) |
|
47 | + foreach ($order->getProducts() as $item) |
|
48 | 48 | { |
49 | 49 | $data = []; |
50 | 50 | $list = $item->toArray(); |
51 | 51 | |
52 | - foreach( $item->getAttributeItems() as $attrItem ) |
|
52 | + foreach ($item->getAttributeItems() as $attrItem) |
|
53 | 53 | { |
54 | - foreach( $attrItem->toArray() as $key => $value ) |
|
54 | + foreach ($attrItem->toArray() as $key => $value) |
|
55 | 55 | { |
56 | - if( isset( $list[$key] ) ) { |
|
56 | + if (isset($list[$key])) { |
|
57 | 57 | $list[$key] .= "\n" . $value; |
58 | 58 | } else { |
59 | 59 | $list[$key] = $value; |
@@ -61,16 +61,16 @@ discard block |
||
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
64 | - foreach( $this->getMapping() as $pos => $key ) |
|
64 | + foreach ($this->getMapping() as $pos => $key) |
|
65 | 65 | { |
66 | - if( array_key_exists( $key, $list ) ) { |
|
66 | + if (array_key_exists($key, $list)) { |
|
67 | 67 | $data[$pos] = $list[$key]; |
68 | 68 | } else { |
69 | 69 | $data[$pos] = ''; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | - ksort( $data ); |
|
73 | + ksort($data); |
|
74 | 74 | $result[] = $data; |
75 | 75 | } |
76 | 76 |
@@ -40,25 +40,25 @@ discard block |
||
40 | 40 | * @param \Aimeos\MShop\Order\Item\Base\Iface $order Full order with associated items |
41 | 41 | * @return array Two dimensional associative list of order data representing the lines in CSV |
42 | 42 | */ |
43 | - public function process( \Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order ) |
|
43 | + public function process(\Aimeos\MShop\Order\Item\Iface $invoice, \Aimeos\MShop\Order\Item\Base\Iface $order) |
|
44 | 44 | { |
45 | 45 | $result = []; |
46 | 46 | $services = $order->getServices(); |
47 | 47 | |
48 | - krsort( $services ); |
|
48 | + krsort($services); |
|
49 | 49 | |
50 | - foreach( $services as $list ) |
|
50 | + foreach ($services as $list) |
|
51 | 51 | { |
52 | - foreach( $list as $item ) |
|
52 | + foreach ($list as $item) |
|
53 | 53 | { |
54 | 54 | $data = []; |
55 | 55 | $list = $item->toArray(); |
56 | 56 | |
57 | - foreach( $item->getAttributeItems() as $attrItem ) |
|
57 | + foreach ($item->getAttributeItems() as $attrItem) |
|
58 | 58 | { |
59 | - foreach( $attrItem->toArray() as $key => $value ) |
|
59 | + foreach ($attrItem->toArray() as $key => $value) |
|
60 | 60 | { |
61 | - if( isset( $list[$key] ) ) { |
|
61 | + if (isset($list[$key])) { |
|
62 | 62 | $list[$key] .= "\n" . $value; |
63 | 63 | } else { |
64 | 64 | $list[$key] = $value; |
@@ -66,16 +66,16 @@ discard block |
||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - foreach( $this->getMapping() as $pos => $key ) |
|
69 | + foreach ($this->getMapping() as $pos => $key) |
|
70 | 70 | { |
71 | - if( array_key_exists( $key, $list ) ) { |
|
71 | + if (array_key_exists($key, $list)) { |
|
72 | 72 | $data[$pos] = $list[$key]; |
73 | 73 | } else { |
74 | 74 | $data[$pos] = ''; |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | - ksort( $data ); |
|
78 | + ksort($data); |
|
79 | 79 | $result[] = $data; |
80 | 80 | } |
81 | 81 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getName() |
30 | 30 | { |
31 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Product site map' ); |
|
31 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Product site map'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getDescription() |
41 | 41 | { |
42 | - return $this->getContext()->getI18n()->dt( 'controller/jobs', 'Creates a product site map for search engines' ); |
|
42 | + return $this->getContext()->getI18n()->dt('controller/jobs', 'Creates a product site map for search engines'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | { |
53 | 53 | $container = $this->createContainer(); |
54 | 54 | |
55 | - $files = $this->export( $container ); |
|
56 | - $this->createSitemapIndex( $container, $files ); |
|
55 | + $files = $this->export($container); |
|
56 | + $this->createSitemapIndex($container, $files); |
|
57 | 57 | |
58 | 58 | $container->close(); |
59 | 59 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param \Aimeos\MW\Container\Content\Iface $content File content object |
66 | 66 | * @param \Aimeos\MShop\Product\Item\Iface[] $items List of product items |
67 | 67 | */ |
68 | - protected function addItems( \Aimeos\MW\Container\Content\Iface $content, array $items ) |
|
68 | + protected function addItems(\Aimeos\MW\Container\Content\Iface $content, array $items) |
|
69 | 69 | { |
70 | 70 | $config = $this->getContext()->getConfig(); |
71 | 71 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @see controller/jobs/product/export/sitemap/max-items |
97 | 97 | * @see controller/jobs/product/export/sitemap/max-query |
98 | 98 | */ |
99 | - $changefreq = $config->get( 'controller/jobs/product/export/sitemap/changefreq', 'daily' ); |
|
99 | + $changefreq = $config->get('controller/jobs/product/export/sitemap/changefreq', 'daily'); |
|
100 | 100 | |
101 | 101 | /** controller/jobs/product/export/sitemap/standard/template-items |
102 | 102 | * Relative path to the XML items template of the product site map job controller. |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $view->siteItems = $items; |
130 | 130 | $view->siteFreq = $changefreq; |
131 | 131 | |
132 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
132 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @see controller/jobs/product/export/sitemap/max-query |
176 | 176 | * @see controller/jobs/product/export/sitemap/changefreq |
177 | 177 | */ |
178 | - $location = $config->get( 'controller/jobs/product/export/sitemap/location' ); |
|
178 | + $location = $config->get('controller/jobs/product/export/sitemap/location'); |
|
179 | 179 | |
180 | 180 | /** controller/jobs/product/export/sitemap/container/options |
181 | 181 | * List of file container options for the site map files |
@@ -196,16 +196,16 @@ discard block |
||
196 | 196 | * @see controller/jobs/product/export/sitemap/max-query |
197 | 197 | * @see controller/jobs/product/export/sitemap/changefreq |
198 | 198 | */ |
199 | - $default = array( 'gzip-mode' => 'wb' ); |
|
200 | - $options = $config->get( 'controller/jobs/product/export/sitemap/container/options', $default ); |
|
199 | + $default = array('gzip-mode' => 'wb'); |
|
200 | + $options = $config->get('controller/jobs/product/export/sitemap/container/options', $default); |
|
201 | 201 | |
202 | - if( $location === null ) |
|
202 | + if ($location === null) |
|
203 | 203 | { |
204 | - $msg = sprintf( 'Required configuration for "%1$s" is missing', 'controller/jobs/product/export/sitemap/location' ); |
|
205 | - throw new \Aimeos\Controller\Jobs\Exception( $msg ); |
|
204 | + $msg = sprintf('Required configuration for "%1$s" is missing', 'controller/jobs/product/export/sitemap/location'); |
|
205 | + throw new \Aimeos\Controller\Jobs\Exception($msg); |
|
206 | 206 | } |
207 | 207 | |
208 | - return \Aimeos\MW\Container\Factory::getContainer( $location, 'Directory', 'Gzip', $options ); |
|
208 | + return \Aimeos\MW\Container\Factory::getContainer($location, 'Directory', 'Gzip', $options); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @param integer $filenum New file number |
217 | 217 | * @return \Aimeos\MW\Container\Content\Iface New content object |
218 | 218 | */ |
219 | - protected function createContent( \Aimeos\MW\Container\Iface $container, $filenum ) |
|
219 | + protected function createContent(\Aimeos\MW\Container\Iface $container, $filenum) |
|
220 | 220 | { |
221 | 221 | /** controller/jobs/product/export/sitemap/standard/template-header |
222 | 222 | * Relative path to the XML site map header template of the product site map job controller. |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | $context = $this->getContext(); |
247 | 247 | $view = $context->getView(); |
248 | 248 | |
249 | - $content = $container->create( $this->getFilename( $filenum ) ); |
|
250 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
251 | - $container->add( $content ); |
|
249 | + $content = $container->create($this->getFilename($filenum)); |
|
250 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
251 | + $container->add($content); |
|
252 | 252 | |
253 | 253 | return $content; |
254 | 254 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * |
260 | 260 | * @param \Aimeos\MW\Container\Content\Iface $content |
261 | 261 | */ |
262 | - protected function closeContent( \Aimeos\MW\Container\Content\Iface $content ) |
|
262 | + protected function closeContent(\Aimeos\MW\Container\Content\Iface $content) |
|
263 | 263 | { |
264 | 264 | /** controller/jobs/product/export/sitemap/standard/template-footer |
265 | 265 | * Relative path to the XML site map footer template of the product site map job controller. |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $context = $this->getContext(); |
290 | 290 | $view = $context->getView(); |
291 | 291 | |
292 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
292 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | * @param \Aimeos\MW\Container\Iface $container File container object |
300 | 300 | * @param array $files List of generated site map file names |
301 | 301 | */ |
302 | - protected function createSitemapIndex( \Aimeos\MW\Container\Iface $container, array $files ) |
|
302 | + protected function createSitemapIndex(\Aimeos\MW\Container\Iface $container, array $files) |
|
303 | 303 | { |
304 | 304 | /** controller/jobs/product/export/sitemap/standard/template-index |
305 | 305 | * Relative path to the XML site map index template of the product site map job controller. |
@@ -331,9 +331,9 @@ discard block |
||
331 | 331 | |
332 | 332 | $view->siteFiles = $files; |
333 | 333 | |
334 | - $content = $container->create( 'aimeos-sitemap-index.xml' ); |
|
335 | - $content->add( $view->render( $context->getConfig()->get( $tplconf, $default ) ) ); |
|
336 | - $container->add( $content ); |
|
334 | + $content = $container->create('aimeos-sitemap-index.xml'); |
|
335 | + $content->add($view->render($context->getConfig()->get($tplconf, $default))); |
|
336 | + $container->add($content); |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | |
@@ -344,44 +344,44 @@ discard block |
||
344 | 344 | * @param boolean $default True to filter exported products by default criteria |
345 | 345 | * @return array List of content (file) names |
346 | 346 | */ |
347 | - protected function export( \Aimeos\MW\Container\Iface $container, $default = true ) |
|
347 | + protected function export(\Aimeos\MW\Container\Iface $container, $default = true) |
|
348 | 348 | { |
349 | - $domains = $this->getConfig( 'domains', [] ); |
|
350 | - $maxItems = $this->getConfig( 'max-items', 10000 ); |
|
351 | - $maxQuery = $this->getConfig( 'max-query', 1000 ); |
|
349 | + $domains = $this->getConfig('domains', []); |
|
350 | + $maxItems = $this->getConfig('max-items', 10000); |
|
351 | + $maxQuery = $this->getConfig('max-query', 1000); |
|
352 | 352 | |
353 | 353 | $start = 0; $filenum = 1; |
354 | 354 | $names = []; |
355 | 355 | |
356 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'index' ); |
|
356 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'index'); |
|
357 | 357 | |
358 | - $search = $manager->createSearch( $default ); |
|
359 | - $search->setConditions( $search->compare( '!=', 'index.catalog.id', null ) ); |
|
360 | - $search->setSortations( array( $search->sort( '+', 'product.id' ) ) ); |
|
361 | - $search->setSlice( 0, $maxQuery ); |
|
358 | + $search = $manager->createSearch($default); |
|
359 | + $search->setConditions($search->compare('!=', 'index.catalog.id', null)); |
|
360 | + $search->setSortations(array($search->sort('+', 'product.id'))); |
|
361 | + $search->setSlice(0, $maxQuery); |
|
362 | 362 | |
363 | - $content = $this->createContent( $container, $filenum ); |
|
363 | + $content = $this->createContent($container, $filenum); |
|
364 | 364 | $names[] = $content->getResource(); |
365 | 365 | |
366 | 366 | do |
367 | 367 | { |
368 | - $items = $manager->searchItems( $search, $domains ); |
|
369 | - $this->addItems( $content, $items ); |
|
368 | + $items = $manager->searchItems($search, $domains); |
|
369 | + $this->addItems($content, $items); |
|
370 | 370 | |
371 | - $count = count( $items ); |
|
371 | + $count = count($items); |
|
372 | 372 | $start += $count; |
373 | - $search->setSlice( $start, $maxQuery ); |
|
373 | + $search->setSlice($start, $maxQuery); |
|
374 | 374 | |
375 | - if( $start + $maxQuery > $maxItems * $filenum ) |
|
375 | + if ($start + $maxQuery > $maxItems * $filenum) |
|
376 | 376 | { |
377 | - $this->closeContent( $content ); |
|
378 | - $content = $this->createContent( $container, ++$filenum ); |
|
377 | + $this->closeContent($content); |
|
378 | + $content = $this->createContent($container, ++$filenum); |
|
379 | 379 | $names[] = $content->getResource(); |
380 | 380 | } |
381 | 381 | } |
382 | - while( $count >= $search->getSliceSize() ); |
|
382 | + while ($count >= $search->getSliceSize()); |
|
383 | 383 | |
384 | - $this->closeContent( $content ); |
|
384 | + $this->closeContent($content); |
|
385 | 385 | |
386 | 386 | return $names; |
387 | 387 | } |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | * @param mixed $default Default value if name is unknown |
395 | 395 | * @return mixed Configuration value |
396 | 396 | */ |
397 | - protected function getConfig( $name, $default = null ) |
|
397 | + protected function getConfig($name, $default = null) |
|
398 | 398 | { |
399 | 399 | $config = $this->getContext()->getConfig(); |
400 | 400 | |
401 | - switch( $name ) |
|
401 | + switch ($name) |
|
402 | 402 | { |
403 | 403 | case 'domains': |
404 | 404 | /** controller/jobs/product/export/sitemap/domains |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | * @see controller/jobs/product/export/sitemap/max-query |
420 | 420 | * @see controller/jobs/product/export/sitemap/changefreq |
421 | 421 | */ |
422 | - return $config->get( 'controller/jobs/product/export/sitemap/domains', $default ); |
|
422 | + return $config->get('controller/jobs/product/export/sitemap/domains', $default); |
|
423 | 423 | |
424 | 424 | case 'max-items': |
425 | 425 | /** controller/jobs/product/export/sitemap/max-items |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * @see controller/jobs/product/export/sitemap/changefreq |
445 | 445 | * @see controller/jobs/product/export/sitemap/domains |
446 | 446 | */ |
447 | - return $config->get( 'controller/jobs/product/export/sitemap/max-items', 50000 ); |
|
447 | + return $config->get('controller/jobs/product/export/sitemap/max-items', 50000); |
|
448 | 448 | |
449 | 449 | case 'max-query': |
450 | 450 | /** controller/jobs/product/export/sitemap/max-query |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | * @see controller/jobs/product/export/sitemap/changefreq |
466 | 466 | * @see controller/jobs/product/export/sitemap/domains |
467 | 467 | */ |
468 | - return $config->get( 'controller/jobs/product/export/sitemap/max-query', 1000 ); |
|
468 | + return $config->get('controller/jobs/product/export/sitemap/max-query', 1000); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | return $default; |
@@ -478,8 +478,8 @@ discard block |
||
478 | 478 | * @param integer $number Current file number |
479 | 479 | * @return string New file name |
480 | 480 | */ |
481 | - protected function getFilename( $number ) |
|
481 | + protected function getFilename($number) |
|
482 | 482 | { |
483 | - return sprintf( 'aimeos-sitemap-%d.xml', $number ); |
|
483 | + return sprintf('aimeos-sitemap-%d.xml', $number); |
|
484 | 484 | } |
485 | 485 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $context = \TestHelperJobs::getContext(); |
21 | 21 | $aimeos = \TestHelperJobs::getAimeos(); |
22 | 22 | |
23 | - $this->object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos ); |
|
23 | + $this->object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | |
33 | 33 | public function testGetName() |
34 | 34 | { |
35 | - $this->assertEquals( 'Process order delivery services', $this->object->getName() ); |
|
35 | + $this->assertEquals('Process order delivery services', $this->object->getName()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testGetDescription() |
40 | 40 | { |
41 | 41 | $text = 'Sends paid orders to the ERP system or logistic partner'; |
42 | - $this->assertEquals( $text, $this->object->getDescription() ); |
|
42 | + $this->assertEquals($text, $this->object->getDescription()); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -50,47 +50,47 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | $name = 'ControllerJobsServiceDeliveryProcessDefaultRun'; |
53 | - $context->getConfig()->set( 'mshop/service/manager/name', $name ); |
|
54 | - $context->getConfig()->set( 'mshop/order/manager/name', $name ); |
|
53 | + $context->getConfig()->set('mshop/service/manager/name', $name); |
|
54 | + $context->getConfig()->set('mshop/order/manager/name', $name); |
|
55 | 55 | |
56 | 56 | |
57 | - $serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' ) |
|
58 | - ->setMethods( array( 'getProvider', 'searchItems' ) ) |
|
59 | - ->setConstructorArgs( array( $context ) ) |
|
57 | + $serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard') |
|
58 | + ->setMethods(array('getProvider', 'searchItems')) |
|
59 | + ->setConstructorArgs(array($context)) |
|
60 | 60 | ->getMock(); |
61 | 61 | |
62 | - $orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
63 | - ->setMethods( array( 'saveItems', 'searchItems' ) ) |
|
64 | - ->setConstructorArgs( array( $context ) ) |
|
62 | + $orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
63 | + ->setMethods(array('saveItems', 'searchItems')) |
|
64 | + ->setConstructorArgs(array($context)) |
|
65 | 65 | ->getMock(); |
66 | 66 | |
67 | - \Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub ); |
|
68 | - \Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub ); |
|
67 | + \Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub); |
|
68 | + \Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub); |
|
69 | 69 | |
70 | 70 | |
71 | 71 | $serviceItem = $serviceManagerStub->createItem(); |
72 | 72 | $orderItem = $orderManagerStub->createItem(); |
73 | 73 | |
74 | - $serviceProviderStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' ) |
|
75 | - ->setConstructorArgs( array( $context, $serviceItem ) ) |
|
74 | + $serviceProviderStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard') |
|
75 | + ->setConstructorArgs(array($context, $serviceItem)) |
|
76 | 76 | ->getMock(); |
77 | 77 | |
78 | 78 | |
79 | - $serviceManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
80 | - ->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) ); |
|
79 | + $serviceManagerStub->expects($this->once())->method('searchItems') |
|
80 | + ->will($this->onConsecutiveCalls(array($serviceItem), [])); |
|
81 | 81 | |
82 | - $serviceManagerStub->expects( $this->once() )->method( 'getProvider' ) |
|
83 | - ->will( $this->returnValue( $serviceProviderStub ) ); |
|
82 | + $serviceManagerStub->expects($this->once())->method('getProvider') |
|
83 | + ->will($this->returnValue($serviceProviderStub)); |
|
84 | 84 | |
85 | - $orderManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
86 | - ->will( $this->onConsecutiveCalls( array( $orderItem ), [] ) ); |
|
85 | + $orderManagerStub->expects($this->once())->method('searchItems') |
|
86 | + ->will($this->onConsecutiveCalls(array($orderItem), [])); |
|
87 | 87 | |
88 | - $serviceProviderStub->expects( $this->once() )->method( 'processBatch' ); |
|
88 | + $serviceProviderStub->expects($this->once())->method('processBatch'); |
|
89 | 89 | |
90 | - $orderManagerStub->expects( $this->once() )->method( 'saveItems' ); |
|
90 | + $orderManagerStub->expects($this->once())->method('saveItems'); |
|
91 | 91 | |
92 | 92 | |
93 | - $object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos ); |
|
93 | + $object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos); |
|
94 | 94 | $object->run(); |
95 | 95 | } |
96 | 96 | |
@@ -102,48 +102,48 @@ discard block |
||
102 | 102 | |
103 | 103 | |
104 | 104 | $name = 'ControllerJobsServiceDeliveryProcessDefaultRun'; |
105 | - $context->getConfig()->set( 'mshop/service/manager/name', $name ); |
|
106 | - $context->getConfig()->set( 'mshop/order/manager/name', $name ); |
|
105 | + $context->getConfig()->set('mshop/service/manager/name', $name); |
|
106 | + $context->getConfig()->set('mshop/order/manager/name', $name); |
|
107 | 107 | |
108 | 108 | |
109 | - $orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
110 | - ->setMethods( array( 'saveItems', 'searchItems' ) ) |
|
111 | - ->setConstructorArgs( array( $context ) ) |
|
109 | + $orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
110 | + ->setMethods(array('saveItems', 'searchItems')) |
|
111 | + ->setConstructorArgs(array($context)) |
|
112 | 112 | ->getMock(); |
113 | 113 | |
114 | - $serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' ) |
|
115 | - ->setMethods( array( 'getProvider', 'searchItems' ) ) |
|
116 | - ->setConstructorArgs( array( $context ) ) |
|
114 | + $serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard') |
|
115 | + ->setMethods(array('getProvider', 'searchItems')) |
|
116 | + ->setConstructorArgs(array($context)) |
|
117 | 117 | ->getMock(); |
118 | 118 | |
119 | - \Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub ); |
|
120 | - \Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub ); |
|
119 | + \Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub); |
|
120 | + \Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub); |
|
121 | 121 | |
122 | 122 | |
123 | 123 | $serviceItem = $serviceManagerStub->createItem(); |
124 | 124 | $orderItem = $orderManagerStub->createItem(); |
125 | 125 | |
126 | - $serviceProviderStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' ) |
|
127 | - ->setConstructorArgs( array( $context, $serviceItem ) ) |
|
126 | + $serviceProviderStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard') |
|
127 | + ->setConstructorArgs(array($context, $serviceItem)) |
|
128 | 128 | ->getMock(); |
129 | 129 | |
130 | 130 | |
131 | - $serviceManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
132 | - ->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) ); |
|
131 | + $serviceManagerStub->expects($this->once())->method('searchItems') |
|
132 | + ->will($this->onConsecutiveCalls(array($serviceItem), [])); |
|
133 | 133 | |
134 | - $serviceManagerStub->expects( $this->once() )->method( 'getProvider' ) |
|
135 | - ->will( $this->returnValue( $serviceProviderStub ) ); |
|
134 | + $serviceManagerStub->expects($this->once())->method('getProvider') |
|
135 | + ->will($this->returnValue($serviceProviderStub)); |
|
136 | 136 | |
137 | - $orderManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
138 | - ->will( $this->onConsecutiveCalls( array( $orderItem ), [] ) ); |
|
137 | + $orderManagerStub->expects($this->once())->method('searchItems') |
|
138 | + ->will($this->onConsecutiveCalls(array($orderItem), [])); |
|
139 | 139 | |
140 | - $serviceProviderStub->expects( $this->once() )->method( 'processBatch' ) |
|
141 | - ->will( $this->throwException( new \Aimeos\MShop\Service\Exception( 'test order service delivery: process' ) ) ); |
|
140 | + $serviceProviderStub->expects($this->once())->method('processBatch') |
|
141 | + ->will($this->throwException(new \Aimeos\MShop\Service\Exception('test order service delivery: process'))); |
|
142 | 142 | |
143 | - $orderManagerStub->expects( $this->never() )->method( 'saveItems' ); |
|
143 | + $orderManagerStub->expects($this->never())->method('saveItems'); |
|
144 | 144 | |
145 | 145 | |
146 | - $object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos ); |
|
146 | + $object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos); |
|
147 | 147 | $object->run(); |
148 | 148 | } |
149 | 149 | |
@@ -155,36 +155,36 @@ discard block |
||
155 | 155 | |
156 | 156 | |
157 | 157 | $name = 'ControllerJobsServiceDeliveryProcessDefaultRun'; |
158 | - $context->getConfig()->set( 'mshop/service/manager/name', $name ); |
|
159 | - $context->getConfig()->set( 'mshop/order/manager/name', $name ); |
|
158 | + $context->getConfig()->set('mshop/service/manager/name', $name); |
|
159 | + $context->getConfig()->set('mshop/order/manager/name', $name); |
|
160 | 160 | |
161 | 161 | |
162 | - $orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
163 | - ->setMethods( array( 'saveItem', 'searchItems' ) ) |
|
164 | - ->setConstructorArgs( array( $context ) ) |
|
162 | + $orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
163 | + ->setMethods(array('saveItem', 'searchItems')) |
|
164 | + ->setConstructorArgs(array($context)) |
|
165 | 165 | ->getMock(); |
166 | 166 | |
167 | - $serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' ) |
|
168 | - ->setMethods( array( 'getProvider', 'searchItems' ) ) |
|
169 | - ->setConstructorArgs( array( $context ) ) |
|
167 | + $serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard') |
|
168 | + ->setMethods(array('getProvider', 'searchItems')) |
|
169 | + ->setConstructorArgs(array($context)) |
|
170 | 170 | ->getMock(); |
171 | 171 | |
172 | - \Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub ); |
|
173 | - \Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub ); |
|
172 | + \Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub); |
|
173 | + \Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub); |
|
174 | 174 | |
175 | 175 | |
176 | 176 | $serviceItem = $serviceManagerStub->createItem(); |
177 | 177 | |
178 | - $serviceManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
179 | - ->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) ); |
|
178 | + $serviceManagerStub->expects($this->once())->method('searchItems') |
|
179 | + ->will($this->onConsecutiveCalls(array($serviceItem), [])); |
|
180 | 180 | |
181 | - $serviceManagerStub->expects( $this->once() )->method( 'getProvider' ) |
|
182 | - ->will( $this->throwException( new \Aimeos\MShop\Service\Exception( 'test sorder service delivery: getProvider' ) ) ); |
|
181 | + $serviceManagerStub->expects($this->once())->method('getProvider') |
|
182 | + ->will($this->throwException(new \Aimeos\MShop\Service\Exception('test sorder service delivery: getProvider'))); |
|
183 | 183 | |
184 | - $orderManagerStub->expects( $this->never() )->method( 'searchItems' ); |
|
184 | + $orderManagerStub->expects($this->never())->method('searchItems'); |
|
185 | 185 | |
186 | 186 | |
187 | - $object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard( $context, $aimeos ); |
|
187 | + $object = new \Aimeos\Controller\Jobs\Order\Service\Delivery\Standard($context, $aimeos); |
|
188 | 188 | $object->run(); |
189 | 189 | } |
190 | 190 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $context = \TestHelperJobs::getContext(); |
21 | 21 | $aimeos = \TestHelperJobs::getAimeos(); |
22 | 22 | |
23 | - $this->object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard( $context, $aimeos ); |
|
23 | + $this->object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | |
33 | 33 | public function testGetName() |
34 | 34 | { |
35 | - $this->assertEquals( 'Batch update of payment/delivery status', $this->object->getName() ); |
|
35 | + $this->assertEquals('Batch update of payment/delivery status', $this->object->getName()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testGetDescription() |
40 | 40 | { |
41 | 41 | $text = 'Executes payment or delivery service providers that uses batch updates'; |
42 | - $this->assertEquals( $text, $this->object->getDescription() ); |
|
42 | + $this->assertEquals($text, $this->object->getDescription()); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
@@ -50,34 +50,34 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | $name = 'ControllerJobsServiceAsyncProcessDefaultRun'; |
53 | - $context->getConfig()->set( 'mshop/service/manager/name', $name ); |
|
53 | + $context->getConfig()->set('mshop/service/manager/name', $name); |
|
54 | 54 | |
55 | 55 | |
56 | - $serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' ) |
|
57 | - ->setMethods( array( 'getProvider', 'searchItems' ) ) |
|
58 | - ->setConstructorArgs( array( $context ) ) |
|
56 | + $serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard') |
|
57 | + ->setMethods(array('getProvider', 'searchItems')) |
|
58 | + ->setConstructorArgs(array($context)) |
|
59 | 59 | ->getMock(); |
60 | 60 | |
61 | - \Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub ); |
|
61 | + \Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub); |
|
62 | 62 | |
63 | 63 | |
64 | 64 | $serviceItem = $serviceManagerStub->createItem(); |
65 | 65 | |
66 | - $serviceProviderStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard' ) |
|
67 | - ->setConstructorArgs( array( $context, $serviceItem ) ) |
|
66 | + $serviceProviderStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Provider\\Delivery\\Standard') |
|
67 | + ->setConstructorArgs(array($context, $serviceItem)) |
|
68 | 68 | ->getMock(); |
69 | 69 | |
70 | 70 | |
71 | - $serviceManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
72 | - ->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) ); |
|
71 | + $serviceManagerStub->expects($this->once())->method('searchItems') |
|
72 | + ->will($this->onConsecutiveCalls(array($serviceItem), [])); |
|
73 | 73 | |
74 | - $serviceManagerStub->expects( $this->once() )->method( 'getProvider' ) |
|
75 | - ->will( $this->returnValue( $serviceProviderStub ) ); |
|
74 | + $serviceManagerStub->expects($this->once())->method('getProvider') |
|
75 | + ->will($this->returnValue($serviceProviderStub)); |
|
76 | 76 | |
77 | - $serviceProviderStub->expects( $this->once() )->method( 'updateAsync' ); |
|
77 | + $serviceProviderStub->expects($this->once())->method('updateAsync'); |
|
78 | 78 | |
79 | 79 | |
80 | - $object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard( $context, $aimeos ); |
|
80 | + $object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos); |
|
81 | 81 | $object->run(); |
82 | 82 | } |
83 | 83 | |
@@ -89,27 +89,27 @@ discard block |
||
89 | 89 | |
90 | 90 | |
91 | 91 | $name = 'ControllerJobsServiceAsyncProcessDefaultRun'; |
92 | - $context->getConfig()->set( 'mshop/service/manager/name', $name ); |
|
92 | + $context->getConfig()->set('mshop/service/manager/name', $name); |
|
93 | 93 | |
94 | 94 | |
95 | - $serviceManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Service\\Manager\\Standard' ) |
|
96 | - ->setMethods( array( 'getProvider', 'searchItems' ) ) |
|
97 | - ->setConstructorArgs( array( $context ) ) |
|
95 | + $serviceManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Service\\Manager\\Standard') |
|
96 | + ->setMethods(array('getProvider', 'searchItems')) |
|
97 | + ->setConstructorArgs(array($context)) |
|
98 | 98 | ->getMock(); |
99 | 99 | |
100 | - \Aimeos\MShop\Service\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub ); |
|
100 | + \Aimeos\MShop\Service\Manager\Factory::injectManager('\\Aimeos\\MShop\\Service\\Manager\\' . $name, $serviceManagerStub); |
|
101 | 101 | |
102 | 102 | |
103 | 103 | $serviceItem = $serviceManagerStub->createItem(); |
104 | 104 | |
105 | - $serviceManagerStub->expects( $this->once() )->method( 'searchItems' ) |
|
106 | - ->will( $this->onConsecutiveCalls( array( $serviceItem ), [] ) ); |
|
105 | + $serviceManagerStub->expects($this->once())->method('searchItems') |
|
106 | + ->will($this->onConsecutiveCalls(array($serviceItem), [])); |
|
107 | 107 | |
108 | - $serviceManagerStub->expects( $this->once() )->method( 'getProvider' ) |
|
109 | - ->will( $this->throwException( new \Aimeos\MShop\Service\Exception() ) ); |
|
108 | + $serviceManagerStub->expects($this->once())->method('getProvider') |
|
109 | + ->will($this->throwException(new \Aimeos\MShop\Service\Exception())); |
|
110 | 110 | |
111 | 111 | |
112 | - $object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard( $context, $aimeos ); |
|
112 | + $object = new \Aimeos\Controller\Jobs\Order\Service\Async\Standard($context, $aimeos); |
|
113 | 113 | $object->run(); |
114 | 114 | } |
115 | 115 | } |
@@ -18,18 +18,18 @@ discard block |
||
18 | 18 | |
19 | 19 | protected function setUp() |
20 | 20 | { |
21 | - \Aimeos\MShop\Factory::setCache( true ); |
|
21 | + \Aimeos\MShop\Factory::setCache(true); |
|
22 | 22 | |
23 | 23 | $this->context = \TestHelperJobs::getContext(); |
24 | 24 | $this->aimeos = \TestHelperJobs::getAimeos(); |
25 | 25 | |
26 | - $this->object = new \Aimeos\Controller\Jobs\Catalog\Export\Sitemap\Standard( $this->context, $this->aimeos ); |
|
26 | + $this->object = new \Aimeos\Controller\Jobs\Catalog\Export\Sitemap\Standard($this->context, $this->aimeos); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | 30 | protected function tearDown() |
31 | 31 | { |
32 | - \Aimeos\MShop\Factory::setCache( false ); |
|
32 | + \Aimeos\MShop\Factory::setCache(false); |
|
33 | 33 | \Aimeos\MShop\Factory::clear(); |
34 | 34 | |
35 | 35 | $this->object = null; |
@@ -38,40 +38,40 @@ discard block |
||
38 | 38 | |
39 | 39 | public function testGetName() |
40 | 40 | { |
41 | - $this->assertEquals( 'Catalog site map', $this->object->getName() ); |
|
41 | + $this->assertEquals('Catalog site map', $this->object->getName()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testGetDescription() |
46 | 46 | { |
47 | 47 | $text = 'Creates a catalog site map for search engines'; |
48 | - $this->assertEquals( $text, $this->object->getDescription() ); |
|
48 | + $this->assertEquals($text, $this->object->getDescription()); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testRun() |
53 | 53 | { |
54 | - $this->context->getConfig()->set( 'controller/jobs/catalog/export/sitemap/max-items', 5 ); |
|
54 | + $this->context->getConfig()->set('controller/jobs/catalog/export/sitemap/max-items', 5); |
|
55 | 55 | |
56 | 56 | $this->object->run(); |
57 | 57 | |
58 | 58 | $ds = DIRECTORY_SEPARATOR; |
59 | - $this->assertFileExists( 'tmp' . $ds . 'aimeos-catalog-sitemap-1.xml.gz' ); |
|
60 | - $this->assertFileExists( 'tmp' . $ds . 'aimeos-catalog-sitemap-2.xml.gz' ); |
|
61 | - $this->assertFileExists( 'tmp' . $ds . 'aimeos-catalog-sitemap-index.xml.gz' ); |
|
59 | + $this->assertFileExists('tmp' . $ds . 'aimeos-catalog-sitemap-1.xml.gz'); |
|
60 | + $this->assertFileExists('tmp' . $ds . 'aimeos-catalog-sitemap-2.xml.gz'); |
|
61 | + $this->assertFileExists('tmp' . $ds . 'aimeos-catalog-sitemap-index.xml.gz'); |
|
62 | 62 | |
63 | - $file1 = gzread( gzopen( 'tmp' . $ds . 'aimeos-catalog-sitemap-1.xml.gz', 'rb' ), 0x1000 ); |
|
64 | - $file2 = gzread( gzopen( 'tmp' . $ds . 'aimeos-catalog-sitemap-2.xml.gz', 'rb' ), 0x1000 ); |
|
65 | - $index = gzread( gzopen( 'tmp' . $ds . 'aimeos-catalog-sitemap-index.xml.gz', 'rb' ), 0x1000 ); |
|
63 | + $file1 = gzread(gzopen('tmp' . $ds . 'aimeos-catalog-sitemap-1.xml.gz', 'rb'), 0x1000); |
|
64 | + $file2 = gzread(gzopen('tmp' . $ds . 'aimeos-catalog-sitemap-2.xml.gz', 'rb'), 0x1000); |
|
65 | + $index = gzread(gzopen('tmp' . $ds . 'aimeos-catalog-sitemap-index.xml.gz', 'rb'), 0x1000); |
|
66 | 66 | |
67 | - unlink( 'tmp' . $ds . 'aimeos-catalog-sitemap-1.xml.gz' ); |
|
68 | - unlink( 'tmp' . $ds . 'aimeos-catalog-sitemap-2.xml.gz' ); |
|
69 | - unlink( 'tmp' . $ds . 'aimeos-catalog-sitemap-index.xml.gz' ); |
|
67 | + unlink('tmp' . $ds . 'aimeos-catalog-sitemap-1.xml.gz'); |
|
68 | + unlink('tmp' . $ds . 'aimeos-catalog-sitemap-2.xml.gz'); |
|
69 | + unlink('tmp' . $ds . 'aimeos-catalog-sitemap-index.xml.gz'); |
|
70 | 70 | |
71 | - $this->assertContains( 'Kaffee', $file2 ); |
|
72 | - $this->assertContains( 'Tee', $file2 ); |
|
71 | + $this->assertContains('Kaffee', $file2); |
|
72 | + $this->assertContains('Tee', $file2); |
|
73 | 73 | |
74 | - $this->assertContains( 'aimeos-catalog-sitemap-1.xml.gz', $index ); |
|
75 | - $this->assertContains( 'aimeos-catalog-sitemap-2.xml.gz', $index ); |
|
74 | + $this->assertContains('aimeos-catalog-sitemap-1.xml.gz', $index); |
|
75 | + $this->assertContains('aimeos-catalog-sitemap-2.xml.gz', $index); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | \ No newline at end of file |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | $context = \TestHelperJobs::getContext(); |
17 | 17 | $aimeos = \TestHelperJobs::getAimeos(); |
18 | 18 | |
19 | - $obj = \Aimeos\Controller\Jobs\Catalog\Export\Sitemap\Factory::createController( $context, $aimeos ); |
|
20 | - $this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
19 | + $obj = \Aimeos\Controller\Jobs\Catalog\Export\Sitemap\Factory::createController($context, $aimeos); |
|
20 | + $this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | $context = \TestHelperJobs::getContext(); |
27 | 27 | $aimeos = \TestHelperJobs::getAimeos(); |
28 | 28 | |
29 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
30 | - \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos, 'Wrong$$$Name' ); |
|
29 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
30 | + \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos, 'Wrong$$$Name'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | $context = \TestHelperJobs::getContext(); |
37 | 37 | $aimeos = \TestHelperJobs::getAimeos(); |
38 | 38 | |
39 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
40 | - \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos, 'WrongClass' ); |
|
39 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
40 | + \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos, 'WrongClass'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $context = \TestHelperJobs::getContext(); |
47 | 47 | $aimeos = \TestHelperJobs::getAimeos(); |
48 | 48 | |
49 | - $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
50 | - \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController( $context, $aimeos, 'Factory' ); |
|
49 | + $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
50 | + \Aimeos\Controller\Jobs\Product\Export\Sitemap\Factory::createController($context, $aimeos, 'Factory'); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | \ No newline at end of file |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | 'jobs' => array( |
5 | 5 | 'product' => array( |
6 | 6 | 'export' => array( |
7 | - 'location' => dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'tmp', |
|
7 | + 'location' => dirname(__DIR__) . DIRECTORY_SEPARATOR . 'tmp', |
|
8 | 8 | 'max-items' => 15, |
9 | 9 | 'max-query' => 5, |
10 | 10 | 'sitemap' => array( |
11 | - 'location' => dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'tmp', |
|
11 | + 'location' => dirname(__DIR__) . DIRECTORY_SEPARATOR . 'tmp', |
|
12 | 12 | 'max-items' => 15, |
13 | 13 | 'max-query' => 5, |
14 | 14 | ), |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | 'catalog' => array( |
18 | 18 | 'export' => array( |
19 | 19 | 'sitemap' => array( |
20 | - 'location' => dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'tmp', |
|
20 | + 'location' => dirname(__DIR__) . DIRECTORY_SEPARATOR . 'tmp', |
|
21 | 21 | 'max-items' => 10, |
22 | 22 | 'max-query' => 3, |
23 | 23 | ), |