Skip to content

Commit ecee065

Browse files
committed
update test
1 parent b150d17 commit ecee065

File tree

3 files changed

+12
-132
lines changed

3 files changed

+12
-132
lines changed

tests/system/Models/UpdateModelTest.php

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -270,59 +270,19 @@ public function testUpdateBatchWithEntity(): void
270270
*/
271271
public function testUpdateBatchWithEntityAndUpdateOnlyChanged(): void
272272
{
273-
$entity1 = new class () extends Entity {
274-
protected $id;
275-
protected $name;
276-
protected $email;
277-
protected $country;
278-
protected $deleted;
279-
protected $created_at;
280-
protected $updated_at;
281-
protected $_options = [
282-
'datamap' => [],
283-
'dates' => [
284-
'created_at',
285-
'updated_at',
286-
'deleted_at',
287-
],
288-
'casts' => [],
289-
];
290-
};
291-
292-
$entity2 = new class () extends Entity {
293-
protected $id;
294-
protected $name;
295-
protected $email;
296-
protected $country;
297-
protected $deleted;
298-
protected $created_at;
299-
protected $updated_at;
300-
protected $_options = [
301-
'datamap' => [],
302-
'dates' => [
303-
'created_at',
304-
'updated_at',
305-
'deleted_at',
306-
],
307-
'casts' => [],
308-
];
309-
};
310-
311-
// Set up entity1 and mark as synced, then change only country.
273+
$entity1 = new User();
312274
$entity1->id = 1;
313275
$entity1->name = 'Derek Jones';
314276
$entity1->email = 'derek@world.com';
315277
$entity1->country = 'US';
316-
$entity1->deleted = 0;
317278
$entity1->syncOriginal();
318279
$entity1->country = 'Greece';
319280

320-
// Set up entity2 and mark as synced, then change only country.
281+
$entity2 = new User();
321282
$entity2->id = 4;
322283
$entity2->name = 'Chris Martin';
323284
$entity2->email = 'chris@world.com';
324285
$entity2->country = 'UK';
325-
$entity2->deleted = 0;
326286
$entity2->syncOriginal();
327287
$entity2->country = 'Finland';
328288

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2138 errors
1+
# total 2122 errors
22

33
includes:
44
- argument.type.neon

utils/phpstan-baseline/missingType.property.neon

Lines changed: 9 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 118 errors
1+
# total 102 errors
22

33
parameters:
44
ignoreErrors:
@@ -468,122 +468,42 @@ parameters:
468468
path: ../../tests/system/Models/UpdateModelTest.php
469469

470470
-
471-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$_options has no type specified\.$#'
471+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$_options has no type specified\.$#'
472472
count: 1
473473
path: ../../tests/system/Models/UpdateModelTest.php
474474

475475
-
476-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$country has no type specified\.$#'
476+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$country has no type specified\.$#'
477477
count: 1
478478
path: ../../tests/system/Models/UpdateModelTest.php
479479

480480
-
481-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$created_at has no type specified\.$#'
481+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$created_at has no type specified\.$#'
482482
count: 1
483483
path: ../../tests/system/Models/UpdateModelTest.php
484484

485485
-
486-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$deleted has no type specified\.$#'
486+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$deleted has no type specified\.$#'
487487
count: 1
488488
path: ../../tests/system/Models/UpdateModelTest.php
489489

490490
-
491-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$email has no type specified\.$#'
491+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$email has no type specified\.$#'
492492
count: 1
493493
path: ../../tests/system/Models/UpdateModelTest.php
494494

495495
-
496-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$id has no type specified\.$#'
496+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$id has no type specified\.$#'
497497
count: 1
498498
path: ../../tests/system/Models/UpdateModelTest.php
499499

500500
-
501-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$name has no type specified\.$#'
501+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$name has no type specified\.$#'
502502
count: 1
503503
path: ../../tests/system/Models/UpdateModelTest.php
504504

505505
-
506-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:273\:\:\$updated_at has no type specified\.$#'
507-
count: 1
508-
path: ../../tests/system/Models/UpdateModelTest.php
509-
510-
-
511-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$_options has no type specified\.$#'
512-
count: 1
513-
path: ../../tests/system/Models/UpdateModelTest.php
514-
515-
-
516-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$country has no type specified\.$#'
517-
count: 1
518-
path: ../../tests/system/Models/UpdateModelTest.php
519-
520-
-
521-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$created_at has no type specified\.$#'
522-
count: 1
523-
path: ../../tests/system/Models/UpdateModelTest.php
524-
525-
-
526-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$deleted has no type specified\.$#'
527-
count: 1
528-
path: ../../tests/system/Models/UpdateModelTest.php
529-
530-
-
531-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$email has no type specified\.$#'
532-
count: 1
533-
path: ../../tests/system/Models/UpdateModelTest.php
534-
535-
-
536-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$id has no type specified\.$#'
537-
count: 1
538-
path: ../../tests/system/Models/UpdateModelTest.php
539-
540-
-
541-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$name has no type specified\.$#'
542-
count: 1
543-
path: ../../tests/system/Models/UpdateModelTest.php
544-
545-
-
546-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:292\:\:\$updated_at has no type specified\.$#'
547-
count: 1
548-
path: ../../tests/system/Models/UpdateModelTest.php
549-
550-
-
551-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$_options has no type specified\.$#'
552-
count: 1
553-
path: ../../tests/system/Models/UpdateModelTest.php
554-
555-
-
556-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$country has no type specified\.$#'
557-
count: 1
558-
path: ../../tests/system/Models/UpdateModelTest.php
559-
560-
-
561-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$created_at has no type specified\.$#'
562-
count: 1
563-
path: ../../tests/system/Models/UpdateModelTest.php
564-
565-
-
566-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$deleted has no type specified\.$#'
567-
count: 1
568-
path: ../../tests/system/Models/UpdateModelTest.php
569-
570-
-
571-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$email has no type specified\.$#'
572-
count: 1
573-
path: ../../tests/system/Models/UpdateModelTest.php
574-
575-
-
576-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$id has no type specified\.$#'
577-
count: 1
578-
path: ../../tests/system/Models/UpdateModelTest.php
579-
580-
-
581-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$name has no type specified\.$#'
582-
count: 1
583-
path: ../../tests/system/Models/UpdateModelTest.php
584-
585-
-
586-
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:441\:\:\$updated_at has no type specified\.$#'
506+
message: '#^Property CodeIgniter\\Entity\\Entity@anonymous/tests/system/Models/UpdateModelTest\.php\:401\:\:\$updated_at has no type specified\.$#'
587507
count: 1
588508
path: ../../tests/system/Models/UpdateModelTest.php
589509

0 commit comments

Comments
 (0)