Completed
Push — apply-codeceptions ( 341052...a29855 )
by Kentaro
53:23 queued 21:51
created
codeception/_support/AcceptanceTester.php 1 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
 
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,15 +152,15 @@  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
-        $files = array_map(function($fileName) use ($downloadDir) {
157
+        $files = array_map(function ($fileName) use ($downloadDir) {
158 158
             return $downloadDir.$fileName;
159 159
         }, $files);
160
-        $files = array_filter($files, function($f) use ($fileNameRegex){
160
+        $files = array_filter($files, function ($f) use ($fileNameRegex){
161 161
             return is_file($f) && preg_match($fileNameRegex, basename($f));
162 162
         });
163
-        usort($files, function($l, $r) {
163
+        usort($files, function ($l, $r) {
164 164
             return filemtime($l) - filemtime($r);
165 165
         });
166 166
 
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
     public function switchToNewWindow()
181 181
     {
182 182
         $this->wait(1);
183
-        $this->executeInSelenium(function($webdriver) {
184
-            $handles=$webdriver->getWindowHandles();
183
+        $this->executeInSelenium(function ($webdriver) {
184
+            $handles = $webdriver->getWindowHandles();
185 185
             $last_window = end($handles);
186 186
             $webdriver->switchTo()->window($last_window);
187 187
         });
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     public function dontSeeElements($arrayOfSelector)
195 195
     {
196 196
         $self = $this;
197
-        $result = array_filter($arrayOfSelector, function($element) use ($self) {
197
+        $result = array_filter($arrayOfSelector, function ($element) use ($self) {
198 198
             $id = $element['id'];
199 199
             return $self->executeJS("return document.getElementById('${id}') != null;");
200 200
         });
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
     public function dragAndDropBy($selector, $x_offset, $y_offset)
205 205
     {
206
-        $this->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webDriver) use ($selector, $x_offset, $y_offset) {
206
+        $this->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webDriver) use ($selector, $x_offset, $y_offset) {
207 207
             $node = $webDriver->findElement(WebDriverBy::cssSelector($selector));
208 208
             $action = new DragAndDropBy($webDriver, $node, $x_offset, $y_offset);
209 209
             $action->perform();
Please login to merge, or discard this patch.
codeception/_support/Page/Front/MultipleShippingPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@
 block discarded – undo
52 52
 
53 53
     public function 入力_お届け先($productNo, $shippingNo, $text)
54 54
     {
55
-        $id = 'form_shipping_multiple_' . $productNo . '_shipping_' . $shippingNo . '_customer_address';
55
+        $id = 'form_shipping_multiple_'.$productNo.'_shipping_'.$shippingNo.'_customer_address';
56 56
         $this->tester->selectOption(['id' => $id], ['text' => $text]);
57 57
         return $this;
58 58
     }
59 59
 
60 60
     public function 入力_数量($productNo, $shippingNo, $value)
61 61
     {
62
-        $id = 'form_shipping_multiple_' . $productNo . '_shipping_' . $shippingNo . '_quantity';
62
+        $id = 'form_shipping_multiple_'.$productNo.'_shipping_'.$shippingNo.'_quantity';
63 63
         $this->tester->fillField(['id' => $id], $value);
64 64
         return $this;
65 65
     }
Please login to merge, or discard this patch.
codeception/_support/Page/Admin/ProductManagePage.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,8 +150,8 @@
 block discarded – undo
150 150
      */
151 151
     public function 検索結果_削除($rowNum)
152 152
     {
153
-      $this->tester->click("#page_admin_product > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(3) > a");
154
-      return $this;
153
+        $this->tester->click("#page_admin_product > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(3) > a");
154
+        return $this;
155 155
     }
156 156
 
157 157
     public function Accept_重複する($rowNum)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     {
64 64
         $this->tester->click(self::$詳細検索ボタン);
65 65
         $this->tester->wait(1);
66
-        $this->tester->checkOption(['id' => 'admin_search_product_status_' . $value]);
66
+        $this->tester->checkOption(['id' => 'admin_search_product_status_'.$value]);
67 67
         $this->tester->click(self::$検索ボタン);
68 68
         $this->tester->see('商品一覧商品管理', '.c-pageTitle');
69 69
         return $this;
Please login to merge, or discard this patch.
codeception/_support/Helper/Acceptance.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     private function clearDownloadDir()
14 14
     {
15
-        $downloadDir = dirname(__DIR__) . '/_downloads/';
15
+        $downloadDir = dirname(__DIR__).'/_downloads/';
16 16
         if (file_exists($downloadDir)) {
17 17
             $files = scandir($downloadDir);
18 18
             $files = array_filter($files, function ($fileName) use ($downloadDir) {
Please login to merge, or discard this patch.
codeception/acceptance/_bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use Faker\Factory as Faker;
9 9
 
10 10
 
11
-$config = parse_ini_file(__DIR__.'/config.ini',true);
11
+$config = parse_ini_file(__DIR__.'/config.ini', true);
12 12
 
13 13
 /**
14 14
  * create fixture
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 $faker = Faker::create('ja_JP');
36 36
 Fixtures::add('faker', $faker);
37 37
 
38
-$progress = (function()
38
+$progress = (function ()
39 39
 {
40 40
     $current = '';
41 41
     return function ($key) use (&$current) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     ->getQuery()
73 73
     ->getSingleScalarResult();
74 74
 // 受注生成件数 + 初期データの商品が生成されているはず
75
-if ($num < ($config['fixture_product_num']+2)) {
75
+if ($num < ($config['fixture_product_num'] + 2)) {
76 76
     // 規格なしも含め $config['fixture_product_num'] の分だけ生成する
77 77
     for ($i = 0; $i < $config['fixture_product_num'] - 1; $i++) {
78 78
         $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
 ));
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
 $deleteShippingNotExistsOfItem = function () use ($entityManager) {
227 227
 
228
-    $Shippings= $entityManager->getRepository('Eccube\Entity\Shipping')->findAll();
228
+    $Shippings = $entityManager->getRepository('Eccube\Entity\Shipping')->findAll();
229 229
 
230 230
     if ($Shippings) {
231 231
         foreach ($Shippings as $Shipping) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 /** 商品を検索するクロージャ. */
251 251
 Fixtures::add('findProducts', $findProducts);
252 252
 
253
-$createProduct = function($product_name = null, $product_class_num = 3) use ($container) {
253
+$createProduct = function ($product_name = null, $product_class_num = 3) use ($container) {
254 254
     return createProduct($container, $product_name, $product_class_num);
255 255
 };
256 256
 Fixtures::add('createProduct', $createProduct);
Please login to merge, or discard this patch.