File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1121,21 +1121,19 @@ public function testAsArrayRestoringCastStatus(): void
11211121
11221122 // Disabled casting properties, but we will allow casting in the method.
11231123 $ entity ->cast (false );
1124- $ beforeCast = $ this -> getPrivateProperty ( $ entity , ' _cast ' );
1124+ $ beforeCast = $ entity -> cast ( );
11251125 $ result = $ entity ->toArray (true , true );
1126- $ afterCast = $ this ->getPrivateProperty ($ entity , '_cast ' );
11271126
11281127 $ this ->assertSame (2026 , $ result ['first ' ]);
1129- $ this ->assertSame ($ beforeCast , $ afterCast );
1128+ $ this ->assertSame ($ beforeCast , $ entity -> cast () );
11301129
11311130 // Enabled casting properties, but we will disallow casting in the method.
11321131 $ entity ->cast (true );
1133- $ beforeCast = $ this -> getPrivateProperty ( $ entity , ' _cast ' );
1132+ $ beforeCast = $ entity -> cast ( );
11341133 $ result = $ entity ->toArray (true , false );
1135- $ afterCast = $ this ->getPrivateProperty ($ entity , '_cast ' );
11361134
11371135 $ this ->assertSame ('2026 Year ' , $ result ['first ' ]);
1138- $ this ->assertSame ($ beforeCast , $ afterCast );
1136+ $ this ->assertSame ($ beforeCast , $ entity -> cast () );
11391137 }
11401138
11411139 public function testDataMappingIssetSwapped (): void
You can’t perform that action at this time.
0 commit comments