1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Test\FlexiPeeHP; |
4
|
|
|
|
5
|
|
|
use FlexiPeeHP\FlexiBeeRW; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Generated by PHPUnit_SkeletonGenerator on 2016-05-04 at 10:08:36. |
9
|
|
|
*/ |
10
|
|
|
class FlexiBeeRWTest extends FlexiBeeROTest |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* Poznámka vkládaná do záznamů vytvářených během testů |
14
|
|
|
* @var strig |
15
|
|
|
*/ |
16
|
|
|
public $poznam = 'Generováno UnitTestem PHP Knihovny https://github.com/Spoje-NET/FlexiPeeHP'; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @var FlexiBeeRO |
20
|
|
|
*/ |
21
|
|
|
protected $object; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Sets up the fixture, for example, opens a network connection. |
25
|
|
|
* This method is called before a test is executed. |
26
|
|
|
* @covers FlexiPeeHP\FlexiBeeRW::__construct |
27
|
|
|
*/ |
28
|
|
|
protected function setUp() |
29
|
|
|
{ |
30
|
|
|
$this->object = new FlexiBeeRW(); |
|
|
|
|
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Tears down the fixture, for example, closes a network connection. |
35
|
|
|
* This method is called after a test is executed. |
36
|
|
|
*/ |
37
|
|
|
protected function tearDown() |
38
|
|
|
{ |
39
|
|
|
|
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @covers FlexiPeeHP\FlexiBeeRW::getLastInsertedId |
44
|
|
|
* @depends testInsertToFlexiBee |
45
|
|
|
*/ |
46
|
|
|
public function testGetLastInsertedId() |
47
|
|
|
{ |
48
|
|
|
$this->assertNotEmpty($this->object->getLastInsertedId()); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @covers FlexiPeeHP\FlexiBeeRW::insertToFlexiBee |
53
|
|
|
*/ |
54
|
|
|
public function testInsertToFlexiBee() |
55
|
|
|
{ |
56
|
|
|
// Remove the following lines when you implement this test. |
57
|
|
|
$this->markTestIncomplete( |
58
|
|
|
'This test has not been implemented yet.' |
59
|
|
|
); |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @covers FlexiPeeHP\FlexiBeeRWRW::deleteFromFlexiBee |
64
|
|
|
*/ |
65
|
|
|
public function testDeleteFromFlexiBee() |
66
|
|
|
{ |
67
|
|
|
// Remove the following lines when you implement this test. |
68
|
|
|
$this->markTestIncomplete( |
69
|
|
|
'This test has not been implemented yet.' |
70
|
|
|
); |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @covers FlexiPeeHP\FlexiBeeRWRW::timestampToFlexiDate |
75
|
|
|
*/ |
76
|
|
|
public function testTimestampToFlexiDate() |
77
|
|
|
{ |
78
|
|
|
$this->assertNull($this->object->timestampToFlexiDate()); |
79
|
|
|
$this->assertEquals('2016-09-16', |
80
|
|
|
$this->object->timestampToFlexiDate('1474040506')); |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @covers FlexiPeeHP\FlexiBeeRWRW::timestampToFlexiDateTime |
85
|
|
|
*/ |
86
|
|
|
public function testTimestampToFlexiDateTime() |
87
|
|
|
{ |
88
|
|
|
$this->assertNull($this->object->timestampToFlexiDateTime()); |
89
|
|
|
$this->assertEquals('2016-09-16UTC15:41:46', |
90
|
|
|
$this->object->timestampToFlexiDateTime('1474040506')); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
} |
94
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..