@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | * @param string $type Arbitrary order type (max. eight chars) |
30 | 30 | * @return \Aimeos\MShop\Order\Item\Iface Created order object |
31 | 31 | */ |
32 | - public function addItem( $baseId, $type ) |
|
32 | + public function addItem($baseId, $type) |
|
33 | 33 | { |
34 | 34 | $total = 0; |
35 | 35 | $context = $this->getContext(); |
36 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
36 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
37 | 37 | |
38 | 38 | /** controller/frontend/order/limit-seconds |
39 | 39 | * Order limitation time frame in seconds |
@@ -51,24 +51,24 @@ discard block |
||
51 | 51 | * @see controller/frontend/basket/limit-count |
52 | 52 | * @see controller/frontend/basket/limit-seconds |
53 | 53 | */ |
54 | - $seconds = $context->getConfig()->get( 'controller/frontend/order/limit-seconds', 300 ); |
|
54 | + $seconds = $context->getConfig()->get('controller/frontend/order/limit-seconds', 300); |
|
55 | 55 | |
56 | 56 | $search = $manager->createSearch(); |
57 | 57 | $expr = [ |
58 | - $search->compare( '==', 'order.baseid', $baseId ), |
|
59 | - $search->compare( '>=', 'order.ctime', date( 'Y-m-d H:i:s', time() - $seconds ) ), |
|
58 | + $search->compare('==', 'order.baseid', $baseId), |
|
59 | + $search->compare('>=', 'order.ctime', date('Y-m-d H:i:s', time() - $seconds)), |
|
60 | 60 | ]; |
61 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
62 | - $search->setSlice( 0, 0 ); |
|
61 | + $search->setConditions($search->combine('&&', $expr)); |
|
62 | + $search->setSlice(0, 0); |
|
63 | 63 | |
64 | - $manager->searchItems( $search, [], $total ); |
|
64 | + $manager->searchItems($search, [], $total); |
|
65 | 65 | |
66 | - if( $total > 0 ) { |
|
67 | - throw new \Aimeos\Controller\Frontend\Order\Exception( sprintf( 'The order has already been created' ) ); |
|
66 | + if ($total > 0) { |
|
67 | + throw new \Aimeos\Controller\Frontend\Order\Exception(sprintf('The order has already been created')); |
|
68 | 68 | } |
69 | 69 | |
70 | - $item = $manager->createItem()->setBaseId( $baseId )->setType( $type ); |
|
71 | - $manager->saveItem( $item ); |
|
70 | + $item = $manager->createItem()->setBaseId($baseId)->setType($type); |
|
71 | + $manager->saveItem($item); |
|
72 | 72 | |
73 | 73 | return $item; |
74 | 74 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function createFilter() |
83 | 83 | { |
84 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order' )->createSearch( true ); |
|
84 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'order')->createSearch(true); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | |
@@ -91,26 +91,26 @@ discard block |
||
91 | 91 | * @param string $id Unique order ID |
92 | 92 | * @return \Aimeos\MShop\Order\Item\Iface Order object |
93 | 93 | */ |
94 | - public function getItem( $id ) |
|
94 | + public function getItem($id) |
|
95 | 95 | { |
96 | 96 | $context = $this->getContext(); |
97 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
97 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
98 | 98 | |
99 | - $search = $manager->createSearch( true ); |
|
99 | + $search = $manager->createSearch(true); |
|
100 | 100 | $expr = [ |
101 | - $search->compare( '==', 'order.id', $id ), |
|
102 | - $search->compare( '==', 'order.editor', $context->getEditor() ), |
|
101 | + $search->compare('==', 'order.id', $id), |
|
102 | + $search->compare('==', 'order.editor', $context->getEditor()), |
|
103 | 103 | $search->getConditions(), |
104 | 104 | ]; |
105 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
105 | + $search->setConditions($search->combine('&&', $expr)); |
|
106 | 106 | |
107 | - $items = $manager->searchItems( $search ); |
|
107 | + $items = $manager->searchItems($search); |
|
108 | 108 | |
109 | - if( ( $item = reset( $items ) ) !== false ) { |
|
109 | + if (($item = reset($items)) !== false) { |
|
110 | 110 | return $item; |
111 | 111 | } |
112 | 112 | |
113 | - throw new \Aimeos\Controller\Frontend\Order\Exception( sprintf( 'No order item for ID "%1$s" found', $id ) ); |
|
113 | + throw new \Aimeos\Controller\Frontend\Order\Exception(sprintf('No order item for ID "%1$s" found', $id)); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | |
@@ -121,18 +121,18 @@ discard block |
||
121 | 121 | * @param integer|null &$total Variable that will contain the total number of available items |
122 | 122 | * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values |
123 | 123 | */ |
124 | - public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null ) |
|
124 | + public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null) |
|
125 | 125 | { |
126 | 126 | $context = $this->getContext(); |
127 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
127 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
128 | 128 | |
129 | 129 | $expr = [ |
130 | 130 | $filter->getConditions(), |
131 | - $filter->compare( '==', 'order.base.customerid', $context->getUserId() ), |
|
131 | + $filter->compare('==', 'order.base.customerid', $context->getUserId()), |
|
132 | 132 | ]; |
133 | - $filter->setConditions( $filter->combine( '&&', $expr ) ); |
|
133 | + $filter->setConditions($filter->combine('&&', $expr)); |
|
134 | 134 | |
135 | - return $manager->searchItems( $filter, [], $total ); |
|
135 | + return $manager->searchItems($filter, [], $total); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | * |
155 | 155 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
156 | 156 | */ |
157 | - public function block( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
157 | + public function block(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
158 | 158 | { |
159 | - \Aimeos\Controller\Common\Order\Factory::createController( $this->getContext() )->block( $orderItem ); |
|
159 | + \Aimeos\Controller\Common\Order\Factory::createController($this->getContext())->block($orderItem); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | * |
179 | 179 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
180 | 180 | */ |
181 | - public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
181 | + public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
182 | 182 | { |
183 | - \Aimeos\Controller\Common\Order\Factory::createController( $this->getContext() )->unblock( $orderItem ); |
|
183 | + \Aimeos\Controller\Common\Order\Factory::createController($this->getContext())->unblock($orderItem); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | |
@@ -198,9 +198,9 @@ discard block |
||
198 | 198 | * |
199 | 199 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
200 | 200 | */ |
201 | - public function update( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
201 | + public function update(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
202 | 202 | { |
203 | - \Aimeos\Controller\Common\Order\Factory::createController( $this->getContext() )->update( $orderItem ); |
|
203 | + \Aimeos\Controller\Common\Order\Factory::createController($this->getContext())->update($orderItem); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | |
@@ -215,22 +215,22 @@ discard block |
||
215 | 215 | * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket |
216 | 216 | * @deprecated 2017.04 Use store() from basket controller instead |
217 | 217 | */ |
218 | - public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket ) |
|
218 | + public function store(\Aimeos\MShop\Order\Item\Base\Iface $basket) |
|
219 | 219 | { |
220 | 220 | $context = $this->getContext(); |
221 | 221 | |
222 | - $orderManager = \Aimeos\MShop\Factory::createManager( $context, 'order' ); |
|
223 | - $orderBaseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' ); |
|
222 | + $orderManager = \Aimeos\MShop\Factory::createManager($context, 'order'); |
|
223 | + $orderBaseManager = \Aimeos\MShop\Factory::createManager($context, 'order/base'); |
|
224 | 224 | |
225 | 225 | |
226 | 226 | $orderBaseManager->begin(); |
227 | - $orderBaseManager->store( $basket ); |
|
227 | + $orderBaseManager->store($basket); |
|
228 | 228 | $orderBaseManager->commit(); |
229 | 229 | |
230 | 230 | $orderItem = $orderManager->createItem(); |
231 | - $orderItem->setBaseId( $basket->getId() ); |
|
232 | - $orderItem->setType( \Aimeos\MShop\Order\Item\Base::TYPE_WEB ); |
|
233 | - $orderManager->saveItem( $orderItem ); |
|
231 | + $orderItem->setBaseId($basket->getId()); |
|
232 | + $orderItem->setType(\Aimeos\MShop\Order\Item\Base::TYPE_WEB); |
|
233 | + $orderManager->saveItem($orderItem); |
|
234 | 234 | |
235 | 235 | |
236 | 236 | return $orderItem; |
@@ -18,183 +18,183 @@ |
||
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 = \TestHelperFrontend::getContext(); |
24 | - $this->object = new \Aimeos\Controller\Frontend\Order\Standard( $this->context ); |
|
24 | + $this->object = new \Aimeos\Controller\Frontend\Order\Standard($this->context); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function tearDown() |
29 | 29 | { |
30 | - unset( $this->object, $this->context ); |
|
30 | + unset($this->object, $this->context); |
|
31 | 31 | |
32 | - \Aimeos\MShop\Factory::setCache( false ); |
|
32 | + \Aimeos\MShop\Factory::setCache(false); |
|
33 | 33 | \Aimeos\MShop\Factory::clear(); |
34 | 34 | } |
35 | 35 | |
36 | 36 | |
37 | 37 | public function testAddItem() |
38 | 38 | { |
39 | - $manager = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
40 | - ->setConstructorArgs( [$this->context] ) |
|
41 | - ->setMethods( ['saveItem'] ) |
|
39 | + $manager = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
40 | + ->setConstructorArgs([$this->context]) |
|
41 | + ->setMethods(['saveItem']) |
|
42 | 42 | ->getMock(); |
43 | 43 | |
44 | - \Aimeos\MShop\Factory::injectManager( $this->context, 'order', $manager ); |
|
44 | + \Aimeos\MShop\Factory::injectManager($this->context, 'order', $manager); |
|
45 | 45 | |
46 | - $manager->expects( $this->once() )->method( 'saveItem' ); |
|
46 | + $manager->expects($this->once())->method('saveItem'); |
|
47 | 47 | |
48 | - $this->assertInstanceOf( '\Aimeos\MShop\Order\Item\Iface', $this->object->addItem( -1, 'test' ) ); |
|
48 | + $this->assertInstanceOf('\Aimeos\MShop\Order\Item\Iface', $this->object->addItem( -1, 'test' )); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testAddItemLimit() |
53 | 53 | { |
54 | - $this->context->getConfig()->set( 'controller/frontend/order/limit-seconds', 86400 * 365 ); |
|
54 | + $this->context->getConfig()->set('controller/frontend/order/limit-seconds', 86400 * 365); |
|
55 | 55 | |
56 | - $manager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' ); |
|
57 | - $result = $manager->searchItems( $manager->createSearch()->setSlice( 0, 1 ) ); |
|
56 | + $manager = \Aimeos\MShop\Factory::createManager($this->context, 'order/base'); |
|
57 | + $result = $manager->searchItems($manager->createSearch()->setSlice(0, 1)); |
|
58 | 58 | |
59 | - if( ( $item = reset( $result ) ) === false ) { |
|
60 | - throw new \RuntimeException( 'No order item found' ); |
|
59 | + if (($item = reset($result)) === false) { |
|
60 | + throw new \RuntimeException('No order item found'); |
|
61 | 61 | } |
62 | 62 | |
63 | - $this->setExpectedException( '\Aimeos\Controller\Frontend\Order\Exception' ); |
|
64 | - $this->object->addItem( $item->getId(), 'test' ); |
|
63 | + $this->setExpectedException('\Aimeos\Controller\Frontend\Order\Exception'); |
|
64 | + $this->object->addItem($item->getId(), 'test'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | |
68 | 68 | public function testCreateFilter() |
69 | 69 | { |
70 | - $this->assertInstanceOf( '\Aimeos\MW\Criteria\Iface', $this->object->createFilter() ); |
|
70 | + $this->assertInstanceOf('\Aimeos\MW\Criteria\Iface', $this->object->createFilter()); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | |
74 | 74 | public function testGetItem() |
75 | 75 | { |
76 | - $manager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer' ); |
|
77 | - $customerItem = $manager->findItem( 'UTC001' ); |
|
76 | + $manager = \Aimeos\MShop\Factory::createManager($this->context, 'customer'); |
|
77 | + $customerItem = $manager->findItem('UTC001'); |
|
78 | 78 | |
79 | - $this->context->setEditor( 'core:unittest' ); |
|
79 | + $this->context->setEditor('core:unittest'); |
|
80 | 80 | |
81 | - $manager = \Aimeos\MShop\Factory::createManager( $this->context, 'order' ); |
|
82 | - $search = $manager->createSearch()->setSlice( 0, 1 ); |
|
83 | - $search->setConditions( $search->compare( '==', 'order.base.customerid', $customerItem->getId() ) ); |
|
84 | - $result = $manager->searchItems( $search ); |
|
81 | + $manager = \Aimeos\MShop\Factory::createManager($this->context, 'order'); |
|
82 | + $search = $manager->createSearch()->setSlice(0, 1); |
|
83 | + $search->setConditions($search->compare('==', 'order.base.customerid', $customerItem->getId())); |
|
84 | + $result = $manager->searchItems($search); |
|
85 | 85 | |
86 | - if( ( $item = reset( $result ) ) === false ) { |
|
87 | - throw new \RuntimeException( 'No order item found' ); |
|
86 | + if (($item = reset($result)) === false) { |
|
87 | + throw new \RuntimeException('No order item found'); |
|
88 | 88 | } |
89 | 89 | |
90 | - $this->assertInstanceOf( '\Aimeos\MShop\Order\Item\Iface', $this->object->getItem( $item->getId() ) ); |
|
90 | + $this->assertInstanceOf('\Aimeos\MShop\Order\Item\Iface', $this->object->getItem($item->getId())); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | |
94 | 94 | public function testGetItemException() |
95 | 95 | { |
96 | - $this->setExpectedException( '\Aimeos\Controller\Frontend\Order\Exception' ); |
|
96 | + $this->setExpectedException('\Aimeos\Controller\Frontend\Order\Exception'); |
|
97 | 97 | $this->object->getItem( -1 ); |
98 | 98 | } |
99 | 99 | |
100 | 100 | |
101 | 101 | public function testSearchItems() |
102 | 102 | { |
103 | - $this->assertGreaterThan( 1, $this->object->searchItems( $this->object->createFilter() ) ); |
|
103 | + $this->assertGreaterThan(1, $this->object->searchItems($this->object->createFilter())); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | |
107 | 107 | public function testStore() |
108 | 108 | { |
109 | 109 | $name = 'ControllerFrontendOrderStore'; |
110 | - $this->context->getConfig()->set( 'mshop/order/manager/name', $name ); |
|
110 | + $this->context->getConfig()->set('mshop/order/manager/name', $name); |
|
111 | 111 | |
112 | 112 | |
113 | - $orderManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Standard' ) |
|
114 | - ->setMethods( array( 'saveItem', 'getSubManager' ) ) |
|
115 | - ->setConstructorArgs( array( $this->context ) ) |
|
113 | + $orderManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Standard') |
|
114 | + ->setMethods(array('saveItem', 'getSubManager')) |
|
115 | + ->setConstructorArgs(array($this->context)) |
|
116 | 116 | ->getMock(); |
117 | 117 | |
118 | - $orderBaseManagerStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Order\\Manager\\Base\\Standard' ) |
|
119 | - ->setMethods( array( 'store' ) ) |
|
120 | - ->setConstructorArgs( array( $this->context ) ) |
|
118 | + $orderBaseManagerStub = $this->getMockBuilder('\\Aimeos\\MShop\\Order\\Manager\\Base\\Standard') |
|
119 | + ->setMethods(array('store')) |
|
120 | + ->setConstructorArgs(array($this->context)) |
|
121 | 121 | ->getMock(); |
122 | 122 | |
123 | - \Aimeos\MShop\Order\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub ); |
|
123 | + \Aimeos\MShop\Order\Manager\Factory::injectManager('\\Aimeos\\MShop\\Order\\Manager\\' . $name, $orderManagerStub); |
|
124 | 124 | |
125 | 125 | |
126 | 126 | $orderBaseItem = $orderBaseManagerStub->createItem(); |
127 | - $orderBaseItem->setId( 1 ); |
|
127 | + $orderBaseItem->setId(1); |
|
128 | 128 | |
129 | 129 | |
130 | - $orderBaseManagerStub->expects( $this->once() )->method( 'store' ); |
|
130 | + $orderBaseManagerStub->expects($this->once())->method('store'); |
|
131 | 131 | |
132 | - $orderManagerStub->expects( $this->once() )->method( 'getSubManager' ) |
|
133 | - ->will( $this->returnValue( $orderBaseManagerStub ) ); |
|
132 | + $orderManagerStub->expects($this->once())->method('getSubManager') |
|
133 | + ->will($this->returnValue($orderBaseManagerStub)); |
|
134 | 134 | |
135 | - $orderManagerStub->expects( $this->once() )->method( 'saveItem' ); |
|
135 | + $orderManagerStub->expects($this->once())->method('saveItem'); |
|
136 | 136 | |
137 | 137 | |
138 | - $this->object->store( $orderBaseItem ); |
|
138 | + $this->object->store($orderBaseItem); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | |
142 | 142 | public function testBlock() |
143 | 143 | { |
144 | 144 | $name = 'ControllerFrontendOrderBlock'; |
145 | - $this->context->getConfig()->set( 'controller/common/order/name', $name ); |
|
145 | + $this->context->getConfig()->set('controller/common/order/name', $name); |
|
146 | 146 | |
147 | 147 | |
148 | - $orderCntlStub = $this->getMockBuilder( '\\Aimeos\\Controller\\Common\\Order\\Standard' ) |
|
149 | - ->setMethods( array( 'block' ) ) |
|
150 | - ->setConstructorArgs( array( $this->context ) ) |
|
148 | + $orderCntlStub = $this->getMockBuilder('\\Aimeos\\Controller\\Common\\Order\\Standard') |
|
149 | + ->setMethods(array('block')) |
|
150 | + ->setConstructorArgs(array($this->context)) |
|
151 | 151 | ->getMock(); |
152 | 152 | |
153 | - \Aimeos\Controller\Common\Order\Factory::injectController( '\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub ); |
|
153 | + \Aimeos\Controller\Common\Order\Factory::injectController('\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub); |
|
154 | 154 | |
155 | - $orderCntlStub->expects( $this->once() )->method( 'block' ); |
|
155 | + $orderCntlStub->expects($this->once())->method('block'); |
|
156 | 156 | |
157 | 157 | |
158 | - $this->object->block( \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem() ); |
|
158 | + $this->object->block(\Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem()); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | |
162 | 162 | public function testUnblock() |
163 | 163 | { |
164 | 164 | $name = 'ControllerFrontendOrderUnblock'; |
165 | - $this->context->getConfig()->set( 'controller/common/order/name', $name ); |
|
165 | + $this->context->getConfig()->set('controller/common/order/name', $name); |
|
166 | 166 | |
167 | 167 | |
168 | - $orderCntlStub = $this->getMockBuilder( '\\Aimeos\\Controller\\Common\\Order\\Standard' ) |
|
169 | - ->setMethods( array( 'unblock' ) ) |
|
170 | - ->setConstructorArgs( array( $this->context ) ) |
|
168 | + $orderCntlStub = $this->getMockBuilder('\\Aimeos\\Controller\\Common\\Order\\Standard') |
|
169 | + ->setMethods(array('unblock')) |
|
170 | + ->setConstructorArgs(array($this->context)) |
|
171 | 171 | ->getMock(); |
172 | 172 | |
173 | - \Aimeos\Controller\Common\Order\Factory::injectController( '\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub ); |
|
173 | + \Aimeos\Controller\Common\Order\Factory::injectController('\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub); |
|
174 | 174 | |
175 | - $orderCntlStub->expects( $this->once() )->method( 'unblock' ); |
|
175 | + $orderCntlStub->expects($this->once())->method('unblock'); |
|
176 | 176 | |
177 | 177 | |
178 | - $this->object->unblock( \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem() ); |
|
178 | + $this->object->unblock(\Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem()); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | |
182 | 182 | public function testUpdate() |
183 | 183 | { |
184 | 184 | $name = 'ControllerFrontendOrderUpdate'; |
185 | - $this->context->getConfig()->set( 'controller/common/order/name', $name ); |
|
185 | + $this->context->getConfig()->set('controller/common/order/name', $name); |
|
186 | 186 | |
187 | 187 | |
188 | - $orderCntlStub = $this->getMockBuilder( '\\Aimeos\\Controller\\Common\\Order\\Standard' ) |
|
189 | - ->setMethods( array( 'update' ) ) |
|
190 | - ->setConstructorArgs( array( $this->context ) ) |
|
188 | + $orderCntlStub = $this->getMockBuilder('\\Aimeos\\Controller\\Common\\Order\\Standard') |
|
189 | + ->setMethods(array('update')) |
|
190 | + ->setConstructorArgs(array($this->context)) |
|
191 | 191 | ->getMock(); |
192 | 192 | |
193 | - \Aimeos\Controller\Common\Order\Factory::injectController( '\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub ); |
|
193 | + \Aimeos\Controller\Common\Order\Factory::injectController('\\Aimeos\\Controller\\Common\\Order\\' . $name, $orderCntlStub); |
|
194 | 194 | |
195 | - $orderCntlStub->expects( $this->once() )->method( 'update' ); |
|
195 | + $orderCntlStub->expects($this->once())->method('update'); |
|
196 | 196 | |
197 | 197 | |
198 | - $this->object->update( \Aimeos\MShop\Factory::createManager( $this->context, 'order' )->createItem() ); |
|
198 | + $this->object->update(\Aimeos\MShop\Factory::createManager($this->context, 'order')->createItem()); |
|
199 | 199 | } |
200 | 200 | } |