Failed Conditions
Push — modify-scrutinizeryml ( 361e25...08b4c1 )
by Kentaro
63:54 queued 57:30
created

ProductListPage   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A 表示件数設定() 0 5 1
A 表示順設定() 0 5 1
A 一覧件数取得() 0 5 1
1
<?php
2
/*
3
 * This file is part of EC-CUBE
4
 *
5
 * Copyright(c) 2000-2017 LOCKON CO.,LTD. All Rights Reserved.
6
 *
7
 * http://www.lockon.co.jp/
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
 */
23
24
namespace Page\Front;
25
26
27
class ProductListPage extends AbstractFrontPage
28
{
29
    public function __construct(\AcceptanceTester $I)
30
    {
31
        parent::__construct($I);
32
    }
33
34
    public function 表示件数設定($num)
35
    {
36
        $this->tester->selectOption(['css' => "select[name = 'disp_number']"], "${num}件");
37
        return $this;
38
    }
39
40
    public function 表示順設定($sort)
41
    {
42
        $this->tester->selectOption(['css' => "select[name = 'orderby']"], $sort);
43
        return $this;
44
    }
45
46
    public function 一覧件数取得()
47
    {
48
        $products = $this->tester->grabMultiple(['xpath' => "//*[@class='ec-shelfGrid__item']/a/p[1]"]);
49
        return count($products);
50
    }
51
}