瀏覽代碼

typo

develop
Robin Thoni 8 年之前
父節點
當前提交
1e46b2538d
共有 3 個檔案被更改,包括 8 行新增8 行删除
  1. 1
    1
      src/Utils/Dbo/LuDateTimeDbo.php
  2. 3
    3
      src/Utils/Dbo/LuDateTimeDboArray.php
  3. 4
    4
      tests/LuDateTimeDboTest.php

src/Utils/Dbo/LuDateDateTime.php → src/Utils/Dbo/LuDateTimeDbo.php 查看文件

@@ -11,7 +11,7 @@ namespace Luticate\Utils\Dbo;
11 11
 use Carbon\Carbon;
12 12
 use Luticate\Utils\Business\LuStringUtils;
13 13
 
14
-class LuDateDateTime extends LuDbo
14
+class LuDateTimeDbo extends LuDbo
15 15
 {
16 16
     /**
17 17
      * @var $_value Carbon

+ 3
- 3
src/Utils/Dbo/LuDateTimeDboArray.php 查看文件

@@ -42,7 +42,7 @@ class LuDateTimeDboArray extends LuDbo
42 42
         $dbo = new self();
43 43
         $array = [];
44 44
         foreach ($json as $data) {
45
-            $array[] = LuDateDateTime::jsonDeserialize($data)->getDateTime();
45
+            $array[] = LuDateTimeDbo::jsonDeserialize($data)->getDateTime();
46 46
         }
47 47
         $dbo->setArray($array);
48 48
         return $dbo;
@@ -51,8 +51,8 @@ class LuDateTimeDboArray extends LuDbo
51 51
     public static function generateSample()
52 52
     {
53 53
         return [
54
-            LuDateDateTime::generateSample(),
55
-            LuDateDateTime::generateSample()
54
+            LuDateTimeDbo::generateSample(),
55
+            LuDateTimeDbo::generateSample()
56 56
         ];
57 57
     }
58 58
 

+ 4
- 4
tests/LuDateTimeDboTest.php 查看文件

@@ -1,5 +1,5 @@
1 1
 <?php
2
-use Luticate\Utils\Dbo\LuDateDateTime;
2
+use Luticate\Utils\Dbo\LuDateTimeDbo;
3 3
 use Luticate\Utils\Dbo\LuDboDeserializeException;
4 4
 
5 5
 /**
@@ -12,19 +12,19 @@ class LuDateTimeDboTest extends \PHPUnit_Framework_TestCase
12 12
 {
13 13
     public function testDateTime()
14 14
     {
15
-        $dbo = LuDateDateTime::jsonDeserialize('2016-12-24 14:42:24');
15
+        $dbo = LuDateTimeDbo::jsonDeserialize('2016-12-24 14:42:24');
16 16
         $this->assertSame('2016-12-24 14:42:24', $dbo->getDateTime()->__toString());
17 17
     }
18 18
 
19 19
     public function testNull()
20 20
     {
21
-        $dbo = LuDateDateTime::jsonDeserialize(null);
21
+        $dbo = LuDateTimeDbo::jsonDeserialize(null);
22 22
         $this->assertSame(null, $dbo->getDateTime());
23 23
     }
24 24
 
25 25
     public function testInvalid()
26 26
     {
27 27
         $this->expectException(LuDboDeserializeException::class);
28
-        LuDateDateTime::jsonDeserialize('my date');
28
+        LuDateTimeDbo::jsonDeserialize('my date');
29 29
     }
30 30
 }

Loading…
取消
儲存