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() |
|
|
|
|
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')); |
|
|
|
|
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
|
|
|
|
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.