Completed
Push — support-coverage ( b5dae6...9a8e61 )
by Kentaro
55:48
created
codeception/acceptance/EA04OrderCest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
         // 削除
163 163
         $OrderNumForDel = $OrderListPage->一覧_注文番号(1);
164 164
         $OrderListPage
165
-          ->一覧_選択(1)
166
-          ->一覧_削除()
167
-          ->Accept_削除();
165
+            ->一覧_選択(1)
166
+            ->一覧_削除()
167
+            ->Accept_削除();
168 168
 
169 169
         $I->see('受注情報を削除しました', ['css' => '#page_admin_order > div > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3 > span']);
170 170
         $I->assertNotEquals($OrderNumForDel, $OrderListPage->一覧_注文番号(1));
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
         // 削除キャンセル
173 173
         $OrderNumForDontDel = $OrderListPage->一覧_注文番号(1);
174 174
         $OrderListPage
175
-          ->一覧_選択(1)
176
-          ->一覧_削除()
177
-          ->Cancel_削除();
175
+            ->一覧_選択(1)
176
+            ->一覧_削除()
177
+            ->Cancel_削除();
178 178
 
179 179
         $I->assertEquals($OrderNumForDontDel, $OrderListPage->一覧_注文番号(1));
180 180
     }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $I->wantTo('EA0401-UC01-T01(& UC01-T02, UC01-T03) 受注検索');
31 31
 
32 32
         $findOrders = Fixtures::get('findOrders'); // Closure
33
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
33
+        $TargetOrders = array_filter($findOrders(), function($Order) {
34 34
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
35 35
         });
36 36
         OrderManagePage::go($I)->検索();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $I->wantTo('EA0401-UC02-T01 受注CSVダウンロード');
53 53
 
54 54
         $findOrders = Fixtures::get('findOrders'); // Closure
55
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
55
+        $TargetOrders = array_filter($findOrders(), function($Order) {
56 56
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
57 57
         });
58 58
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $I->wantTo('EA0401-UC02-T02 受注情報のCSV出力項目変更設定');
71 71
 
72 72
         $findOrders = Fixtures::get('findOrders'); // Closure
73
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
73
+        $TargetOrders = array_filter($findOrders(), function($Order) {
74 74
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
75 75
         });
76 76
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $I->wantTo('EA0401-UC05-T01(& UC05-T02/UC05-T03/UC06-T01) 受注編集');
90 90
 
91 91
         $findOrders = Fixtures::get('findOrders'); // Closure
92
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
92
+        $TargetOrders = array_filter($findOrders(), function($Order) {
93 93
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
94 94
         });
95 95
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $I->wantTo('EA0401-UC08-T01(& UC08-T02) 受注削除');
153 153
 
154 154
         $findOrders = Fixtures::get('findOrders'); // Closure
155
-        $TargetOrders = array_filter($findOrders(), function ($Order) {
155
+        $TargetOrders = array_filter($findOrders(), function($Order) {
156 156
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
157 157
         });
158 158
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         $I->resetEmails();
187 187
         $findOrders = Fixtures::get('findOrders');
188
-        $NewOrders = array_filter($findOrders(), function ($Order) {
188
+        $NewOrders = array_filter($findOrders(), function($Order) {
189 189
             return $Order->getOrderStatus()->getId() == OrderStatus::NEW;
190 190
         });
191 191
         $Order = array_pop($NewOrders);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         $config = Fixtures::get('config');
216 216
         $findOrders = Fixtures::get('findOrders'); // Closure
217
-        $TargetOrders = array_filter($findOrders(), function ($Order) use ($config) {
217
+        $TargetOrders = array_filter($findOrders(), function($Order) use ($config) {
218 218
             return $Order->getOrderStatus()->getId() != OrderStatus::PROCESSING;
219 219
         });
220 220
         $OrderListPage = OrderManagePage::go($I)->検索();
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         // 新規受付ステータスをキャンセルに変更する
275 275
         $entityManager = Fixtures::get('entityManager');
276 276
         $findOrders = Fixtures::get('findOrders');
277
-        $NewOrders = array_filter($findOrders(), function ($Order) {
277
+        $NewOrders = array_filter($findOrders(), function($Order) {
278 278
             return $Order->getOrderStatus()->getId() == OrderStatus::NEW;
279 279
         });
280 280
         $CancelStatus = $entityManager->getRepository('Eccube\Entity\Master\OrderStatus')->find(OrderStatus::CANCEL);
@@ -293,13 +293,13 @@  discard block
 block discarded – undo
293 293
         }
294 294
         $entityManager->flush();
295 295
 
296
-        $NewOrders = array_filter($findOrders(), function ($Order) {
296
+        $NewOrders = array_filter($findOrders(), function($Order) {
297 297
             return $Order->getOrderStatus()->getId() == OrderStatus::NEW;
298 298
         });
299 299
         OrderManagePage::go($I)->受注ステータス検索(OrderStatus::NEW);
300 300
         $I->see('検索結果:'.count($NewOrders).'件が該当しました', OrderManagePage::$検索結果_メッセージ);
301 301
 
302
-        $DeliveredOrders = array_filter($findOrders(), function ($Order) {
302
+        $DeliveredOrders = array_filter($findOrders(), function($Order) {
303 303
             return $Order->getOrderStatus()->getId() == OrderStatus::DELIVERED;
304 304
         });
305 305
         OrderManagePage::go($I)->受注ステータス検索(OrderStatus::DELIVERED);
Please login to merge, or discard this patch.
codeception/acceptance/EA05CustomerCest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         $CustomerRegisterPage->登録();
94 94
         /* ブラウザによるhtml5のエラーなのでハンドリング不可 */
95
-        $I->see('会員情報を保存しました。', CustomerEditPage::$登録完了メッセージ);    }
95
+        $I->see('会員情報を保存しました。', CustomerEditPage::$登録完了メッセージ); }
96 96
 
97 97
     public function customer_会員登録_必須項目未入力(\AcceptanceTester $I)
98 98
     {
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $CustomerListPage = CustomerManagePage::go($I)
147 147
             ->検索($customer->getEmail());
148 148
 
149
-        $I->see('検索結果:1件が該当しました' ,CustomerManagePage::$検索結果メッセージ);
149
+        $I->see('検索結果:1件が該当しました', CustomerManagePage::$検索結果メッセージ);
150 150
 
151 151
         $CustomerListPage->一覧_編集(1);
152 152
 
Please login to merge, or discard this patch.
codeception/acceptance/EA03ProductCest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         $I->wantTo('EA0310-UC02-T02 一覧からの規格編集 規格あり2');
196 196
 
197 197
         $findProducts = Fixtures::get('findProducts');
198
-        $Products = array_filter($findProducts(), function ($Product) {
198
+        $Products = array_filter($findProducts(), function($Product) {
199 199
             return $Product->hasProductClass();
200 200
         });
201 201
         $Product = array_pop($Products);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $I->wantTo('EA0310-UC05-T02 一覧からの商品複製');
218 218
 
219 219
         $findProducts = Fixtures::get('findProducts');
220
-        $Products = array_filter($findProducts(), function ($Product) {
220
+        $Products = array_filter($findProducts(), function($Product) {
221 221
             return $Product->hasProductClass();
222 222
         });
223 223
         $Product = array_pop($Products);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $I->wantTo('EA0310-UC02-T01 一覧からの規格編集 規格あり1');
237 237
 
238 238
         $findProducts = Fixtures::get('findProducts');
239
-        $Products = array_filter($findProducts(), function ($Product) {
239
+        $Products = array_filter($findProducts(), function($Product) {
240 240
             return $Product->hasProductClass();
241 241
         });
242 242
         $Product = array_pop($Products);
Please login to merge, or discard this patch.
codeception/acceptance/_bootstrap.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use Faker\Factory as Faker;
10 10
 
11 11
 
12
-$config = parse_ini_file(__DIR__.'/config.ini',true);
12
+$config = parse_ini_file(__DIR__.'/config.ini', true);
13 13
 
14 14
 /**
15 15
  * create fixture
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 $progress = (function()
40 40
 {
41 41
     $current = '';
42
-    return function ($key) use (&$current) {
42
+    return function($key) use (&$current) {
43 43
         if ($current !== $key) {
44 44
             if ($current !== '') {
45 45
                 echo PHP_EOL;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     ->getQuery()
74 74
     ->getSingleScalarResult();
75 75
 // 受注生成件数 + 初期データの商品が生成されているはず
76
-if ($num < ($config['fixture_product_num']+2)) {
76
+if ($num < ($config['fixture_product_num'] + 2)) {
77 77
     // 規格なしも含め $config['fixture_product_num'] の分だけ生成する
78 78
     for ($i = 0; $i < $config['fixture_product_num'] - 1; $i++) {
79 79
         $progress('Generating Products');
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
  */
161 161
 
162 162
 /** 管理画面アカウント情報. */
163
-Fixtures::add('admin_account',array(
163
+Fixtures::add('admin_account', array(
164 164
     'member' => $config['admin_user'],
165 165
     'password' => $config['admin_password'],
166 166
 ));
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 /** カテゴリ一覧の配列. */
182 182
 Fixtures::add('categories', $categories);
183 183
 
184
-$findOrders = function () use ($entityManager) {
184
+$findOrders = function() use ($entityManager) {
185 185
     return $entityManager->getRepository('Eccube\Entity\Order')
186 186
     ->createQueryBuilder('o')
187 187
     ->getQuery()
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 /** 受注を検索するクロージャ. */
191 191
 Fixtures::add('findOrders', $findOrders);
192 192
 
193
-$findShippings = function () use ($entityManager) {
193
+$findShippings = function() use ($entityManager) {
194 194
     return $entityManager->getRepository('Eccube\Entity\Shipping')
195 195
     ->createQueryBuilder('o')
196 196
     ->getQuery()
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 /** 出荷を検索するクロージャ. */
200 200
 Fixtures::add('findShippings', $findShippings);
201 201
 
202
-$resetShippingStatusPrepared = function () use ($entityManager) {
202
+$resetShippingStatusPrepared = function() use ($entityManager) {
203 203
     $StatusPrepared = $entityManager->find(ShippingStatus::class, ShippingStatus::PREPARED);
204 204
     $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')
205 205
         ->findAll();
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 /** 出荷準備中に更新するクロージャ. */
213 213
 Fixtures::add('resetShippingStatusPrepared', $resetShippingStatusPrepared);
214 214
 
215
-$resetShippingStatusShipped = function () use ($entityManager) {
215
+$resetShippingStatusShipped = function() use ($entityManager) {
216 216
     $StatusShipped = $entityManager->find(ShippingStatus::class, ShippingStatus::SHIPPED);
217 217
     $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')
218 218
         ->findAll();
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
 /** 出荷済みに更新するクロージャ. */
226 226
 Fixtures::add('resetShippingStatusShipped', $resetShippingStatusShipped);
227 227
 
228
-$deleteShippingNotExistsOfItem = function () use ($entityManager) {
228
+$deleteShippingNotExistsOfItem = function() use ($entityManager) {
229 229
 
230
-    $Shippings= $entityManager->getRepository('Eccube\Entity\Shipping')->findAll();
230
+    $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')->findAll();
231 231
 
232 232
     if ($Shippings) {
233 233
         foreach ($Shippings as $Shipping) {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 /** OrderItemの存在しない出荷を削除するクロージャ. */
244 244
 Fixtures::add('deleteShippingNotExistsOfItem', $deleteShippingNotExistsOfItem);
245 245
 
246
-$findProducts = function () use ($entityManager) {
246
+$findProducts = function() use ($entityManager) {
247 247
     return $entityManager->getRepository('Eccube\Entity\Product')
248 248
         ->createQueryBuilder('p')
249 249
         ->getQuery()
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 };
258 258
 Fixtures::add('createProduct', $createProduct);
259 259
 
260
-$createCustomer = function ($email = null, $active = true) use ($container, $faker) {
260
+$createCustomer = function($email = null, $active = true) use ($container, $faker) {
261 261
     if (is_null($email)) {
262 262
         $email = microtime(true).'.'.$faker->safeEmail;
263 263
     }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 /** 会員を生成するクロージャ. */
267 267
 Fixtures::add('createCustomer', $createCustomer);
268 268
 
269
-$createOrders = function ($Customer, $numberOfOrders = 5, $ProductClasses = array()) use ($container, $entityManager, $faker) {
269
+$createOrders = function($Customer, $numberOfOrders = 5, $ProductClasses = array()) use ($container, $entityManager, $faker) {
270 270
     $generator = $container->get('Eccube\Tests\Fixture\Generator');
271 271
     $Orders = array();
272 272
     for ($i = 0; $i < $numberOfOrders; $i++) {
@@ -283,19 +283,19 @@  discard block
 block discarded – undo
283 283
 /** 受注を生成するクロージャ. */
284 284
 Fixtures::add('createOrders', $createOrders);
285 285
 
286
-$findPlugins = function () use ($entityManager) {
286
+$findPlugins = function() use ($entityManager) {
287 287
     return $entityManager->getRepository('Eccube\Entity\Plugin')->findAll();
288 288
 };
289 289
 /** プラグインを検索するクロージャ */
290 290
 Fixtures::add('findPlugins', $findPlugins);
291 291
 
292
-$findPluginByCode = function ($code = null) use ($entityManager) {
292
+$findPluginByCode = function($code = null) use ($entityManager) {
293 293
     return $entityManager->getRepository('Eccube\Entity\Plugin')->findOneBy(['code' => $code]);
294 294
 };
295 295
 /** プラグインを検索するクロージャ */
296 296
 Fixtures::add('findPluginByCode', $findPluginByCode);
297 297
 
298
-$findCustomers = function () use ($entityManager) {
298
+$findCustomers = function() use ($entityManager) {
299 299
     return $entityManager->getRepository('Eccube\Entity\Customer')
300 300
         ->createQueryBuilder('c')
301 301
         ->getQuery()
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
 Fixtures::add('findCustomers', $findCustomers);
306 306
 
307 307
 /** 新着情報を検索するクロージャ */
308
-Fixtures::add('findNews', function () use ($entityManager) {
308
+Fixtures::add('findNews', function() use ($entityManager) {
309 309
     return $entityManager->getRepository(\Eccube\Entity\News::class)
310 310
         ->findBy([], ['sort_no' => 'DESC']);
311 311
 });
312 312
 
313 313
 /** 新着情報を登録するクロージャ */
314
-Fixtures::add('createNews', function ($publishDate, $title, $description, $url = null) use ($entityManager) {
314
+Fixtures::add('createNews', function($publishDate, $title, $description, $url = null) use ($entityManager) {
315 315
     $TopNews = $entityManager->getRepository(\Eccube\Entity\News::class)
316 316
         ->findOneBy([], ['sort_no' => 'DESC']);
317 317
     $sortNo = $TopNews ? $TopNews->getSortNo() + 1 : 1;
Please login to merge, or discard this patch.
codeception/acceptance/EF02ProductCest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
         ProductDetailPage::go($I, 2);
141 141
 
142 142
         // 「カートに入れる」ボタンが、非活性となり「ただいま品切れ中です」と表示される。
143
-        $I->see('ただいま品切れ中です','#form1 button');
143
+        $I->see('ただいま品切れ中です', '#form1 button');
144 144
     }
145 145
 
146 146
     public function product_商品詳細カテゴリリンク(\AcceptanceTester $I)
Please login to merge, or discard this patch.
codeception/PageAccessCest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
     {
18 18
         $I->wantTo('perform actions and see result');
19 19
         $I->amOnPage('/');
20
-        $I->see('くらしを楽しむライフスタイルグッズ','.copy');
20
+        $I->see('くらしを楽しむライフスタイルグッズ', '.copy');
21 21
         
22
-        $shopName = $I->grabFromDatabase('dtb_base_info','shop_name');
23
-        $I->assertEquals('EC-CUBE3 SHOP',$shopName);
22
+        $shopName = $I->grabFromDatabase('dtb_base_info', 'shop_name');
23
+        $I->assertEquals('EC-CUBE3 SHOP', $shopName);
24 24
 
25
-        $products = $I->grabFromDatabase('dtb_product','status',array('product_id'=>1));
25
+        $products = $I->grabFromDatabase('dtb_product', 'status', array('product_id'=>1));
26 26
         codecept_debug($products);
27 27
 
28 28
         $bi = Fixtures::get('baseinfo');
Please login to merge, or discard this patch.
codeception/_support/AcceptanceTester.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function loginAsAdmin($user = '', $password = '', $dir = '')
32 32
     {
33
-        if(!$user || !$password) {
33
+        if (!$user || !$password) {
34 34
             $account = Fixtures::get('admin_account');
35 35
             $user = $account['member'];
36 36
             $password = $account['password'];
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function setStock($pid, $stock = 0)
99 99
     {
100
-        if(!$pid) {
100
+        if (!$pid) {
101 101
             return;
102 102
         }
103 103
         $entityManager = Fixtures::get('entityManager');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getLastDownloadFile($fileNameRegex, $retryCount = 3)
154 154
     {
155
-        $downloadDir = __DIR__ . '/_downloads/';
155
+        $downloadDir = __DIR__.'/_downloads/';
156 156
         $files = scandir($downloadDir);
157 157
         $files = array_map(function($fileName) use ($downloadDir) {
158 158
             return $downloadDir.$fileName;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         $this->wait(1);
183 183
         $this->executeInSelenium(function($webdriver) {
184
-            $handles=$webdriver->getWindowHandles();
184
+            $handles = $webdriver->getWindowHandles();
185 185
             $last_window = end($handles);
186 186
             $webdriver->switchTo()->window($last_window);
187 187
         });
Please login to merge, or discard this patch.
codeception/_support/Page/Front/ProductDetailPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     public function 規格選択($array)
64 64
     {
65 65
         foreach ($array as $index=>$option) {
66
-            $this->tester->selectOption(['id' => 'classcategory_id'.($index+1)], $option);
66
+            $this->tester->selectOption(['id' => 'classcategory_id'.($index + 1)], $option);
67 67
         }
68 68
         return $this;
69 69
     }
Please login to merge, or discard this patch.
codeception/_support/Page/Admin/OrderManagePage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 
115 115
     public function 受注ステータス検索($value = '')
116 116
     {
117
-        $this->tester->checkOption(['id' => 'admin_search_order_status_' . $value]);
117
+        $this->tester->checkOption(['id' => 'admin_search_order_status_'.$value]);
118 118
         $this->tester->click('#search_form #search_submit');
119 119
         return $this;
120 120
     }
Please login to merge, or discard this patch.