File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 43
43
"ext-readline" : " Improves CLI::input() usability" ,
44
44
"ext-redis" : " If you use Cache class RedisHandler" ,
45
45
"ext-simplexml" : " If you format XML" ,
46
+ " ext-sodium" => "If you Encryption SodiumHandler",
46
47
"ext-sqlite3" : " If you use SQLite3" ,
47
48
"ext-sqlsrv" : " If you use SQL Server" ,
48
49
"ext-xdebug" : " If you use CIUnitTestCase::assertHeaderEmitted()"
Original file line number Diff line number Diff line change 52
52
"ext-readline" : " Improves CLI::input() usability" ,
53
53
"ext-redis" : " If you use Cache class RedisHandler" ,
54
54
"ext-simplexml" : " If you format XML" ,
55
+ "ext-sodium" : " If you Encryption SodiumHandler" ,
55
56
"ext-sqlite3" : " If you use SQLite3" ,
56
57
"ext-sqlsrv" : " If you use SQL Server" ,
57
58
"ext-xdebug" : " If you use CIUnitTestCase::assertHeaderEmitted()"
Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ public static function forge($group = null)
112
112
/**
113
113
* Returns a new instance of the Database Utilities class.
114
114
*
115
- * @param array|string|null $group
115
+ * @param array|BaseConnection|non-empty-string|null $group The name of the connection group to use,
116
+ * or an array of configuration settings.
116
117
*
117
118
* @return BaseUtils
118
119
*/
Original file line number Diff line number Diff line change @@ -375,6 +375,27 @@ public function testUpdateWithEntityNoAllowedFields(): void
375
375
$ this ->model ->update ($ id , $ entity );
376
376
}
377
377
378
+ public function testUpdateWithEntity (): void
379
+ {
380
+ $ this ->createModel (UserModel::class);
381
+
382
+ $ entity = new class () extends Entity {
383
+ };
384
+ $ entity ->id = 1 ;
385
+ $ entity ->name = 'Jones Martin ' ;
386
+ $ entity->
email =
'[email protected] ' ;
387
+ $ entity ->country = 'India ' ;
388
+
389
+ $ id = $ this ->model ->insert ($ entity );
390
+
391
+ $ user = $ this ->model ->asObject (get_class ($ entity ))->find ($ id );
392
+
393
+ $ user ->country = 'id ' ;
394
+ $ result = $ this ->model ->save ($ user );
395
+
396
+ $ this ->assertTrue ($ result );
397
+ }
398
+
378
399
public function testUseAutoIncrementSetToFalseUpdate (): void
379
400
{
380
401
$ key = 'key ' ;
You can’t perform that action at this time.
0 commit comments