@@ -515,18 +515,21 @@ public function testUnsetAndSet(): void
515515 $ this ->assertFalse (isset ($ user ->note1 ));
516516 $ this ->assertNull ($ user ['note1 ' ]);
517517 $ this ->assertFalse ($ user ->originalIsEquivalent ('note1 ' ));
518+ $ this ->assertTrue ($ user ->isDirty ());
518519 $ this ->assertSame (['$unset ' => ['note1 ' => true ]], $ user ->getDirty ());
519520
520521 // Reset the previous value
521522 $ user ->note1 = 'ABC ' ;
522523 $ this ->assertTrue ($ user ->originalIsEquivalent ('note1 ' ));
524+ $ this ->assertFalse ($ user ->isDirty ());
523525 $ this ->assertSame ([], $ user ->getDirty ());
524526
525527 // Change the value
526528 $ user ->note1 = 'GHI ' ;
527529 $ this ->assertTrue (isset ($ user ->note1 ));
528530 $ this ->assertSame ('GHI ' , $ user ['note1 ' ]);
529531 $ this ->assertFalse ($ user ->originalIsEquivalent ('note1 ' ));
532+ $ this ->assertTrue ($ user ->isDirty ());
530533 $ this ->assertSame (['note1 ' => 'GHI ' ], $ user ->getDirty ());
531534
532535 // Fetch to be sure the changes are not persisted yet
@@ -542,6 +545,7 @@ public function testUnsetAndSet(): void
542545 $ this ->assertTrue (isset ($ user ->note1 ));
543546 $ this ->assertSame ('GHI ' , $ user ->note1 );
544547 $ this ->assertTrue ($ user ->originalIsEquivalent ('note1 ' ));
548+ $ this ->assertFalse ($ user ->isDirty ());
545549 }
546550
547551 public function testDates (): void
0 commit comments