|
@@ -1,4 +1,5 @@
|
1
|
1
|
<?php
|
|
2
|
+use Carbon\Carbon;
|
2
|
3
|
use Illuminate\Database\Query\Builder;
|
3
|
4
|
use Luticate\Utils\Controller\LuticateApplication;
|
4
|
5
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
|
@@ -31,6 +32,11 @@ class TestTableDbo extends LuDbo
|
31
|
32
|
*/
|
32
|
33
|
private $_someIntegerArray;
|
33
|
34
|
|
|
35
|
+ /**
|
|
36
|
+ * @var $_createdAt Carbon
|
|
37
|
+ */
|
|
38
|
+ private $_createdAt;
|
|
39
|
+
|
34
|
40
|
/**
|
35
|
41
|
* @return int
|
36
|
42
|
*/
|
|
@@ -78,6 +84,23 @@ class TestTableDbo extends LuDbo
|
78
|
84
|
{
|
79
|
85
|
$this->_someIntegerArray = $someIntegerArray;
|
80
|
86
|
}
|
|
87
|
+
|
|
88
|
+ /**
|
|
89
|
+ * @return Carbon
|
|
90
|
+ */
|
|
91
|
+ public function getCreatedAt()
|
|
92
|
+ {
|
|
93
|
+ return $this->_createdAt;
|
|
94
|
+ }
|
|
95
|
+
|
|
96
|
+ /**
|
|
97
|
+ * @param Carbon $createdAt
|
|
98
|
+ */
|
|
99
|
+ public function setCreatedAt($createdAt)
|
|
100
|
+ {
|
|
101
|
+ $this->_createdAt = $createdAt;
|
|
102
|
+ }
|
|
103
|
+
|
81
|
104
|
}
|
82
|
105
|
|
83
|
106
|
class TestTableDboArray extends LuDbo
|
|
@@ -148,7 +171,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
|
148
|
171
|
// ]];
|
149
|
172
|
// $app = new LuticateApplication($config);
|
150
|
173
|
// $app->setupDatabases();
|
151
|
|
-//
|
|
174
|
+//
|
152
|
175
|
// $dbo = new TestTableDbo();
|
153
|
176
|
// $dbo->setId(11);
|
154
|
177
|
// $dbo->setSomeIntegerArray('{}');
|
|
@@ -157,7 +180,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
|
157
|
180
|
// var_dump(TestTableDataAccess::getMultiple(function(Builder $q)
|
158
|
181
|
// {
|
159
|
182
|
// return $q->where("id", "=", 1);
|
160
|
|
-// }));
|
|
183
|
+// })[0]->jsonSerialize());
|
161
|
184
|
// var_dump(TestTableDataAccess::getSingleById(1));
|
162
|
185
|
// var_dump(TestTableDataAccess::deleteMultiple(function($q)
|
163
|
186
|
// {
|