Browse Source

typo

develop
Robin Thoni 8 years ago
parent
commit
1e46b2538d

src/Utils/Dbo/LuDateDateTime.php → src/Utils/Dbo/LuDateTimeDbo.php View File

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

+ 3
- 3
src/Utils/Dbo/LuDateTimeDboArray.php View File

42
         $dbo = new self();
42
         $dbo = new self();
43
         $array = [];
43
         $array = [];
44
         foreach ($json as $data) {
44
         foreach ($json as $data) {
45
-            $array[] = LuDateDateTime::jsonDeserialize($data)->getDateTime();
45
+            $array[] = LuDateTimeDbo::jsonDeserialize($data)->getDateTime();
46
         }
46
         }
47
         $dbo->setArray($array);
47
         $dbo->setArray($array);
48
         return $dbo;
48
         return $dbo;
51
     public static function generateSample()
51
     public static function generateSample()
52
     {
52
     {
53
         return [
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 View File

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

Loading…
Cancel
Save