|
@@ -7,26 +7,35 @@
|
7
|
7
|
* Time: 5:21 PM
|
8
|
8
|
*/
|
9
|
9
|
|
10
|
|
-class FakeModel
|
|
10
|
+class Tests
|
11
|
11
|
{
|
|
12
|
+ private $value = null;
|
|
13
|
+ public function __construct($value = null)
|
|
14
|
+ {
|
|
15
|
+ $this->value = $value;
|
|
16
|
+ }
|
|
17
|
+
|
12
|
18
|
public static function where($col, $operator, $value)
|
13
|
19
|
{
|
14
|
|
- return new FakeModel();
|
|
20
|
+ return new Tests($value);
|
15
|
21
|
}
|
16
|
22
|
|
17
|
23
|
public function first()
|
18
|
24
|
{
|
19
|
|
- return new FakeModel();
|
|
25
|
+ if ($this->value != 42) {
|
|
26
|
+ return null;
|
|
27
|
+ }
|
|
28
|
+ return new Tests($this->value);
|
20
|
29
|
}
|
21
|
30
|
public function toDbo()
|
22
|
31
|
{
|
23
|
|
- return new FakeModel();
|
|
32
|
+ return new Tests($this->value);
|
24
|
33
|
}
|
25
|
34
|
}
|
26
|
35
|
|
27
|
|
-class TestDataAccess extends \Luticate\Utils\LuDataAccess {
|
|
36
|
+class TestsDataAccess extends \Luticate\Utils\LuDataAccess {
|
28
|
37
|
protected static function getModel()
|
29
|
38
|
{
|
30
|
|
- return new FakeModel();
|
|
39
|
+ return new Tests();
|
31
|
40
|
}
|
32
|
41
|
}
|