@@ -778,27 +778,27 @@ public function testGetDirtyValuesOnNewRecord(): void
778778
779779 $ customer = new Customer ();
780780
781- $ this ->assertSame ([], $ customer ->dirtyValues ());
781+ $ this ->assertSame ([], $ customer ->newValues ());
782782
783783 $ customer ->set ('name ' , 'Adam ' );
784784 $ customer ->set ('email ' , 'adam@example.com ' );
785785 $ customer ->set ('address ' , null );
786786
787787 $ this ->assertEquals (
788788 ['name ' => 'Adam ' , 'email ' => 'adam@example.com ' , 'address ' => null ],
789- $ customer ->dirtyValues ()
789+ $ customer ->newValues ()
790790 );
791791 $ this ->assertEquals (
792792 ['email ' => 'adam@example.com ' , 'address ' => null ],
793- $ customer ->dirtyValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
793+ $ customer ->newValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
794794 );
795795
796796 $ this ->assertTrue ($ customer ->save ());
797- $ this ->assertSame ([], $ customer ->dirtyValues ());
797+ $ this ->assertSame ([], $ customer ->newValues ());
798798
799799 $ customer ->set ('address ' , '' );
800800
801- $ this ->assertSame (['address ' => '' ], $ customer ->dirtyValues ());
801+ $ this ->assertSame (['address ' => '' ], $ customer ->newValues ());
802802 }
803803
804804 public function testGetDirtyValuesAfterFind (): void
@@ -808,19 +808,19 @@ public function testGetDirtyValuesAfterFind(): void
808808 $ customerQuery = new ActiveQuery (Customer::class);
809809 $ customer = $ customerQuery ->findOne (1 );
810810
811- $ this ->assertSame ([], $ customer ->dirtyValues ());
811+ $ this ->assertSame ([], $ customer ->newValues ());
812812
813813 $ customer ->set ('name ' , 'Adam ' );
814814 $ customer ->set ('email ' , 'adam@example.com ' );
815815 $ customer ->set ('address ' , null );
816816
817817 $ this ->assertEquals (
818818 ['name ' => 'Adam ' , 'email ' => 'adam@example.com ' , 'address ' => null ],
819- $ customer ->dirtyValues (),
819+ $ customer ->newValues (),
820820 );
821821 $ this ->assertEquals (
822822 ['email ' => 'adam@example.com ' , 'address ' => null ],
823- $ customer ->dirtyValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
823+ $ customer ->newValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
824824 );
825825 }
826826
@@ -832,12 +832,12 @@ public function testGetDirtyValuesWithProperties(): void
832832 $ this ->assertSame ([
833833 'name ' => null ,
834834 'address ' => null ,
835- ], $ customer ->dirtyValues ());
835+ ], $ customer ->newValues ());
836836
837837 $ customerQuery = new ActiveQuery (CustomerWithProperties::class);
838838 $ customer = $ customerQuery ->findOne (1 );
839839
840- $ this ->assertSame ([], $ customer ->dirtyValues ());
840+ $ this ->assertSame ([], $ customer ->newValues ());
841841
842842 $ customer ->setEmail ('adam@example.com ' );
843843 $ customer ->setName ('Adam ' );
@@ -846,11 +846,11 @@ public function testGetDirtyValuesWithProperties(): void
846846
847847 $ this ->assertEquals (
848848 ['email ' => 'adam@example.com ' , 'name ' => 'Adam ' , 'address ' => null , 'status ' => null ],
849- $ customer ->dirtyValues (),
849+ $ customer ->newValues (),
850850 );
851851 $ this ->assertEquals (
852852 ['email ' => 'adam@example.com ' , 'address ' => null ],
853- $ customer ->dirtyValues (['id ' , 'email ' , 'address ' , 'unknown ' ]),
853+ $ customer ->newValues (['id ' , 'email ' , 'address ' , 'unknown ' ]),
854854 );
855855 }
856856
0 commit comments