File tree Expand file tree Collapse file tree 3 files changed +1
-42
lines changed Expand file tree Collapse file tree 3 files changed +1
-42
lines changed Original file line number Diff line number Diff line change 6
6
"prefer-stable" : true ,
7
7
"require" : {
8
8
"ext-pdo" : " *" ,
9
- "wtf/core" : " ^1" ,
9
+ "wtf/core" : " ^1.1.6 " ,
10
10
"catfan/medoo" : " @stable" ,
11
11
"robmorgan/phinx" : " @stable" ,
12
12
"respect/validation" : " ^1"
Original file line number Diff line number Diff line change @@ -61,30 +61,6 @@ public function getScheme(): array
61
61
return $ this ->scheme ;
62
62
}
63
63
64
- /**
65
- * Return all entity data as array.
66
- *
67
- * @return array
68
- */
69
- public function getData (): array
70
- {
71
- return $ this ->data ;
72
- }
73
-
74
- /**
75
- * Set all data to entity.
76
- *
77
- * @param array $data
78
- *
79
- * @return Entity
80
- */
81
- public function setData (array $ data )
82
- {
83
- $ this ->data = \array_merge ($ this ->data , $ data );
84
-
85
- return $ this ;
86
- }
87
-
88
64
/**
89
65
* Save entity data in db.
90
66
*
Original file line number Diff line number Diff line change @@ -23,23 +23,6 @@ protected function setUp(): void
23
23
$ this ->container ->medoo ->pdo ->exec ($ query );
24
24
}
25
25
26
- public function testGetSet (): void
27
- {
28
- //getData (from scratch)
29
- $ entity = $ this ->container ['entity ' ]('dummy_entity ' );
30
- $ this ->assertEquals ([], $ entity ->getData ());
31
- //setData (from scratch)
32
- $ entity ->setData (['one ' => true , 'two ' => true ]);
33
- $ this ->assertTrue ($ entity ->getOne ());
34
- $ this ->assertTrue ($ entity ->getTwo ());
35
- //setData (mege)
36
- $ entity ->setData (['one ' => false ]);
37
- $ this ->assertFalse ($ entity ->getOne ());
38
- $ this ->assertTrue ($ entity ->getTwo ());
39
- //getData (with data)
40
- $ this ->assertEquals (['one ' => false , 'two ' => true ], $ entity ->getData ());
41
- }
42
-
43
26
public function testSave (): void
44
27
{
45
28
$ data = [
'email ' =>
'[email protected] ' ,
'name ' =>
'Test user ' ,
'notexisting ' =>
'field ' ];
You can’t perform that action at this time.
0 commit comments