@@ -515,18 +515,21 @@ public function testUnsetAndSet(): void
515
515
$ this ->assertFalse (isset ($ user ->note1 ));
516
516
$ this ->assertNull ($ user ['note1 ' ]);
517
517
$ this ->assertFalse ($ user ->originalIsEquivalent ('note1 ' ));
518
+ $ this ->assertTrue ($ user ->isDirty ());
518
519
$ this ->assertSame (['$unset ' => ['note1 ' => true ]], $ user ->getDirty ());
519
520
520
521
// Reset the previous value
521
522
$ user ->note1 = 'ABC ' ;
522
523
$ this ->assertTrue ($ user ->originalIsEquivalent ('note1 ' ));
524
+ $ this ->assertFalse ($ user ->isDirty ());
523
525
$ this ->assertSame ([], $ user ->getDirty ());
524
526
525
527
// Change the value
526
528
$ user ->note1 = 'GHI ' ;
527
529
$ this ->assertTrue (isset ($ user ->note1 ));
528
530
$ this ->assertSame ('GHI ' , $ user ['note1 ' ]);
529
531
$ this ->assertFalse ($ user ->originalIsEquivalent ('note1 ' ));
532
+ $ this ->assertTrue ($ user ->isDirty ());
530
533
$ this ->assertSame (['note1 ' => 'GHI ' ], $ user ->getDirty ());
531
534
532
535
// Fetch to be sure the changes are not persisted yet
@@ -542,6 +545,7 @@ public function testUnsetAndSet(): void
542
545
$ this ->assertTrue (isset ($ user ->note1 ));
543
546
$ this ->assertSame ('GHI ' , $ user ->note1 );
544
547
$ this ->assertTrue ($ user ->originalIsEquivalent ('note1 ' ));
548
+ $ this ->assertFalse ($ user ->isDirty ());
545
549
}
546
550
547
551
public function testDates (): void
0 commit comments