Test Failed
Push — master ( 99a915...bca16c )
by Vítězslav
07:03
created

EvidenceListTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Test\FlexiPeeHP;
4
5
use \FlexiPeeHP\EvidenceList;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator on 2017-09-03 at 01:01:15.
9
 */
10
class EvidenceListTest extends FlexiBeeROTest
11
{
12
    /**
13
     * @var EvidenceList
14
     */
15
    protected $object;
16
17
    /**
18
     * Sets up the fixture, for example, opens a network connection.
19
     * This method is called before a test is executed.
20
     */
21
    protected function setUp()
22
    {
23
        $this->object = new EvidenceList();
24
    }
25
26
    /**
27
     * 
28
     */
29
    public function checkLists()
30
    {
31
        $this->assertTrue(count(EvidenceList::$evidences) > 80);
32
        $this->assertTrue($this->object->setEvidence('cenik'));
33
    }
34
35
    /**
36
     * @covers FlexiPeeHP\EvidenceList::objectToID
37
     */
38 View Code Duplication
    public function testObjectToID()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
39
    {
40
        $this->object->setDataValue($this->object->myKeyColumn, 'TEST');
41
        $this->assertEquals('TEST', $this->object->objectToID($this->object));
42
43
        $this->assertEquals('TEST2', $this->object->objectToID('TEST2'));
0 ignored issues
show
Documentation introduced by
'TEST2' is of type string, but the function expects a object|array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
44
    }
45
46
    /**
47
     * @covers FlexiPeeHP\EvidenceList::__toString
48
     */
49
    public function testtoString()
50
    {
51
        $this->object->__toString();
52
    }
53
54
    /**
55
     * @covers FlexiPeeHP\EvidenceList::draw
56
     */
57
    public function testDraw($whatWant = NULL)
58
    {
59
        $this->object->draw();
60
    }
61
62
    /**
63
     * @covers FlexiPeeHP\EvidenceList::getMyKey
64
     *
65
     * @todo   Implement testGetMyKey().
66
     */
67
    public function testGetMyKey()
68
    {
69
        $this->object->getmyKey();
70
    }
71
72
    /**
73
     * Tears down the fixture, for example, closes a network connection.
74
     * This method is called after a test is executed.
75
     */
76
    protected function tearDown()
77
    {
78
79
    }
80
}
81