Completed
Push — master ( a3c7a7...bd72ff )
by Carlos
02:47
created

ShelfTest::testControlTwo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4286
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * User: pjxh
6
 * Date: 15-11-1
7
 * Time: 下午5:13
8
 */
9
namespace Test\Data;
10
11
12
use Overtrue\Wechat\Shop\Data\Shelf;
13
14
class ShelfTest extends \PHPUnit_Framework_TestCase
15
{
16
    public function testControlOne()
17
    {
18
        $shelf = new Shelf();
19
        $data = $shelf->controlOne('1','id');
20
        $this->assertInstanceOf(Shelf::class,$data);
21
    }
22
23
    public function testControlTwo()
24
    {
25
        $shelf = new Shelf();
26
        $data = $shelf->controlTwo(array('商品id','商品ID'));
27
        $this->assertInstanceOf(Shelf::class,$data);
28
    }
29
30
    public function testControlThree()
31
    {
32
        $shelf = new Shelf();
33
        $data = $shelf->controlThree('商品ID','img');
34
        $this->assertInstanceOf(Shelf::class,$data);
35
    }
36
    public function testControlFour()
37
    {
38
        $shelf = new Shelf();
39
        $data = $shelf->controlFour(array(array('商品id','img'),array('商品id','img')));
40
        $this->assertInstanceOf(Shelf::class,$data);
41
    }
42
43
    public function testControlFive()
44
    {
45
        $shelf = new Shelf();
46
        $data = $shelf->controlFive(array('商品id','商品ID'),'背景图');
47
        $this->assertInstanceOf(Shelf::class,$data);
48
    }
49
50
}
51