@@ -778,27 +778,27 @@ public function testGetDirtyValuesOnNewRecord(): void
778
778
779
779
$ customer = new Customer ();
780
780
781
- $ this ->assertSame ([], $ customer ->dirtyValues ());
781
+ $ this ->assertSame ([], $ customer ->newValues ());
782
782
783
783
$ customer ->set ('name ' , 'Adam ' );
784
784
$ customer->
set (
'email ' ,
'[email protected] ' );
785
785
$ customer ->set ('address ' , null );
786
786
787
787
$ this ->assertEquals (
788
788
[
'name ' =>
'Adam ' ,
'email ' =>
'[email protected] ' ,
'address ' =>
null ],
789
- $ customer ->dirtyValues ()
789
+ $ customer ->newValues ()
790
790
);
791
791
$ this ->assertEquals (
792
792
[
'email ' =>
'[email protected] ' ,
'address ' =>
null ],
793
- $ customer ->dirtyValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
793
+ $ customer ->newValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
794
794
);
795
795
796
796
$ this ->assertTrue ($ customer ->save ());
797
- $ this ->assertSame ([], $ customer ->dirtyValues ());
797
+ $ this ->assertSame ([], $ customer ->newValues ());
798
798
799
799
$ customer ->set ('address ' , '' );
800
800
801
- $ this ->assertSame (['address ' => '' ], $ customer ->dirtyValues ());
801
+ $ this ->assertSame (['address ' => '' ], $ customer ->newValues ());
802
802
}
803
803
804
804
public function testGetDirtyValuesAfterFind (): void
@@ -808,19 +808,19 @@ public function testGetDirtyValuesAfterFind(): void
808
808
$ customerQuery = new ActiveQuery (Customer::class);
809
809
$ customer = $ customerQuery ->findOne (1 );
810
810
811
- $ this ->assertSame ([], $ customer ->dirtyValues ());
811
+ $ this ->assertSame ([], $ customer ->newValues ());
812
812
813
813
$ customer ->set ('name ' , 'Adam ' );
814
814
$ customer->
set (
'email ' ,
'[email protected] ' );
815
815
$ customer ->set ('address ' , null );
816
816
817
817
$ this ->assertEquals (
818
818
[
'name ' =>
'Adam ' ,
'email ' =>
'[email protected] ' ,
'address ' =>
null ],
819
- $ customer ->dirtyValues (),
819
+ $ customer ->newValues (),
820
820
);
821
821
$ this ->assertEquals (
822
822
[
'email ' =>
'[email protected] ' ,
'address ' =>
null ],
823
- $ customer ->dirtyValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
823
+ $ customer ->newValues (['id ' , 'email ' , 'address ' , 'status ' , 'unknown ' ]),
824
824
);
825
825
}
826
826
@@ -832,12 +832,12 @@ public function testGetDirtyValuesWithProperties(): void
832
832
$ this ->assertSame ([
833
833
'name ' => null ,
834
834
'address ' => null ,
835
- ], $ customer ->dirtyValues ());
835
+ ], $ customer ->newValues ());
836
836
837
837
$ customerQuery = new ActiveQuery (CustomerWithProperties::class);
838
838
$ customer = $ customerQuery ->findOne (1 );
839
839
840
- $ this ->assertSame ([], $ customer ->dirtyValues ());
840
+ $ this ->assertSame ([], $ customer ->newValues ());
841
841
842
842
$ customer->
setEmail (
'[email protected] ' );
843
843
$ customer ->setName ('Adam ' );
@@ -846,11 +846,11 @@ public function testGetDirtyValuesWithProperties(): void
846
846
847
847
$ this ->assertEquals (
848
848
[
'email ' =>
'[email protected] ' ,
'name ' =>
'Adam ' ,
'address ' =>
null ,
'status ' =>
null ],
849
- $ customer ->dirtyValues (),
849
+ $ customer ->newValues (),
850
850
);
851
851
$ this ->assertEquals (
852
852
[
'email ' =>
'[email protected] ' ,
'address ' =>
null ],
853
- $ customer ->dirtyValues (['id ' , 'email ' , 'address ' , 'unknown ' ]),
853
+ $ customer ->newValues (['id ' , 'email ' , 'address ' , 'unknown ' ]),
854
854
);
855
855
}
856
856
0 commit comments