1313use Faker \Factory ;
1414use Illuminate \Database \Eloquent \Relations \Relation ;
1515use Illuminate \Support \Arr ;
16+ use Illuminate \Support \Facades \Hash ;
1617
1718/**
1819 * @covers Backpack\CRUD\app\Library\CrudPanel\Traits\Create
@@ -132,7 +133,7 @@ public function testCreate()
132133 $ inputData = [
133134 'name ' => $ faker ->name ,
134135 'email ' => $ faker ->safeEmail ,
135- 'password ' => bcrypt ($ faker ->password ()),
136+ 'password ' => Hash:: make ($ faker ->password ()),
136137 ];
137138
138139 $ entry = $ this ->crudPanel ->create ($ inputData );
@@ -152,7 +153,7 @@ public function testCreateWithOneToOneRelationship()
152153 $ inputData = [
153154 'name ' => $ faker ->name ,
154155 'email ' => $ faker ->safeEmail ,
155- 'password ' => bcrypt ($ faker ->password ()),
156+ 'password ' => Hash:: make ($ faker ->password ()),
156157 'accountDetails ' => [
157158 'nickname ' => $ account_details_nickname ,
158159 'profile_picture ' => 'test.jpg ' ,
@@ -184,7 +185,7 @@ public function testCreateWithOneToOneRelationshipUsingRepeatableInterface()
184185 $ inputData = [
185186 'name ' => $ faker ->name ,
186187 'email ' => $ faker ->safeEmail ,
187- 'password ' => bcrypt ($ faker ->password ()),
188+ 'password ' => Hash:: make ($ faker ->password ()),
188189 'accountDetails ' => [
189190 ['nickname ' => $ account_details_nickname , 'profile_picture ' => 'test.jpg ' ],
190191 ],
@@ -251,7 +252,7 @@ public function testCreateWithManyToManyRelationship()
251252 $ inputData = [
252253 'name ' => $ faker ->name ,
253254 'email ' => $ faker ->safeEmail ,
254- 'password ' => bcrypt ($ faker ->password ()),
255+ 'password ' => Hash:: make ($ faker ->password ()),
255256 'remember_token ' => null ,
256257 'roles ' => [1 , 2 ],
257258 ];
@@ -336,7 +337,7 @@ public function testCreateHasOneRelations()
336337 $ inputData = [
337338 'name ' => $ faker ->name ,
338339 'email ' => $ faker ->safeEmail ,
339- 'password ' => bcrypt ($ faker ->password ()),
340+ 'password ' => Hash:: make ($ faker ->password ()),
340341 'remember_token ' => null ,
341342 'roles ' => [1 , 2 ],
342343 'accountDetails ' => [
@@ -398,7 +399,7 @@ public function testMorphToManySelectableRelationship()
398399 $ inputData = [
399400 'name ' => $ faker ->name ,
400401 'email ' => $ faker ->safeEmail ,
401- 'password ' => bcrypt ($ faker ->password ()),
402+ 'password ' => Hash:: make ($ faker ->password ()),
402403 'remember_token ' => null ,
403404 'bills ' => [1 ],
404405 ];
@@ -434,7 +435,7 @@ public function testMorphToManyCreatableRelationship()
434435 $ inputData = [
435436 'name ' => $ faker ->name ,
436437 'email ' => $ faker ->safeEmail ,
437- 'password ' => bcrypt ($ faker ->password ()),
438+ 'password ' => Hash:: make ($ faker ->password ()),
438439 'remember_token ' => null ,
439440 'recommends ' => [
440441 [
@@ -492,7 +493,7 @@ public function testBelongsToManyWithPivotDataRelationship()
492493 $ inputData = [
493494 'name ' => $ faker ->name ,
494495 'email ' => $ faker ->safeEmail ,
495- 'password ' => bcrypt ($ faker ->password ()),
496+ 'password ' => Hash:: make ($ faker ->password ()),
496497 'remember_token ' => null ,
497498 'superArticles ' => [
498499 [
@@ -560,7 +561,7 @@ public function testCreateHasOneWithNestedRelationsRepeatableInterface()
560561 $ inputData = [
561562 'name ' => $ faker ->name ,
562563 'email ' => $ faker ->safeEmail ,
563- 'password ' => bcrypt ($ faker ->password ()),
564+ 'password ' => Hash:: make ($ faker ->password ()),
564565 'remember_token ' => null ,
565566 'roles ' => [1 , 2 ],
566567 'accountDetails ' => [
@@ -630,7 +631,7 @@ public function testCreateBelongsToFake()
630631 $ inputData = [
631632 'name ' => $ faker ->name ,
632633 'email ' => $ faker ->safeEmail ,
633- 'password ' => bcrypt ($ faker ->password ()),
634+ 'password ' => Hash:: make ($ faker ->password ()),
634635 'remember_token ' => null ,
635636 'bang_relation_field ' => 1 ,
636637 ];
@@ -689,7 +690,7 @@ public function testCreateHasOneWithNestedRelations()
689690 $ inputData = [
690691 'name ' => $ faker ->name ,
691692 'email ' => $ faker ->safeEmail ,
692- 'password ' => bcrypt ($ faker ->password ()),
693+ 'password ' => Hash:: make ($ faker ->password ()),
693694 'remember_token ' => null ,
694695 'roles ' => [1 , 2 ],
695696 'accountDetails ' => [
@@ -734,7 +735,7 @@ public function testCreateHasOneWithNestedRelations()
734735 $ inputData = [
735736 'name ' => $ faker ->name ,
736737 'email ' => $ faker ->safeEmail ,
737- 'password ' => bcrypt ($ faker ->password ()),
738+ 'password ' => Hash:: make ($ faker ->password ()),
738739 'remember_token ' => null ,
739740 'roles ' => [1 , 2 ],
740741 'accountDetails ' => [
@@ -778,7 +779,7 @@ public function testMorphOneRelationship()
778779 $ inputData = [
779780 'name ' => $ faker ->name ,
780781 'email ' => $ faker ->safeEmail ,
781- 'password ' => bcrypt ($ faker ->password ()),
782+ 'password ' => Hash:: make ($ faker ->password ()),
782783 'remember_token ' => null ,
783784 'comment ' => [
784785 'text ' => 'some test comment text ' ,
@@ -814,7 +815,7 @@ public function testMorphManyCreatableRelationship()
814815 $ inputData = [
815816 'name ' => $ faker ->name ,
816817 'email ' => $ faker ->safeEmail ,
817- 'password ' => bcrypt ($ faker ->password ()),
818+ 'password ' => Hash:: make ($ faker ->password ()),
818819 'remember_token ' => null ,
819820 'stars ' => [
820821 [
@@ -867,7 +868,7 @@ public function testHasManyCreatableRelationship()
867868 $ inputData = [
868869 'name ' => $ faker ->name ,
869870 'email ' => $ faker ->safeEmail ,
870- 'password ' => bcrypt ($ faker ->password ()),
871+ 'password ' => Hash:: make ($ faker ->password ()),
871872 'remember_token ' => null ,
872873 'universes ' => [
873874 [
@@ -952,7 +953,7 @@ public function testHasManySelectableRelationshipWithoutForceDelete()
952953 $ inputData = [
953954 'name ' => $ faker ->name ,
954955 'email ' => $ faker ->safeEmail ,
955- 'password ' => bcrypt ($ faker ->password ()),
956+ 'password ' => Hash:: make ($ faker ->password ()),
956957 'remember_token ' => null ,
957958 'planets ' => [1 , 2 ],
958959 ];
@@ -987,7 +988,7 @@ public function testHasManySelectableRelationshipRemoveAllRelations()
987988 $ inputData = [
988989 'name ' => $ faker ->name ,
989990 'email ' => $ faker ->safeEmail ,
990- 'password ' => bcrypt ($ faker ->password ()),
991+ 'password ' => Hash:: make ($ faker ->password ()),
991992 'remember_token ' => null ,
992993 'planets ' => [1 , 2 ],
993994 ];
@@ -1052,7 +1053,7 @@ public function testHasManyWithRelationScoped()
10521053 $ inputData = [
10531054 'name ' => $ faker ->name ,
10541055 'email ' => $ faker ->safeEmail ,
1055- 'password ' => bcrypt ($ faker ->password ()),
1056+ 'password ' => Hash:: make ($ faker ->password ()),
10561057 'remember_token ' => null ,
10571058 'incomes ' => [
10581059 [
@@ -1141,7 +1142,7 @@ public function testHasManySelectableRelationshipWithFallbackId()
11411142 $ inputData = [
11421143 'name ' => $ faker ->name ,
11431144 'email ' => $ faker ->safeEmail ,
1144- 'password ' => bcrypt ($ faker ->password ()),
1145+ 'password ' => Hash:: make ($ faker ->password ()),
11451146 'remember_token ' => null ,
11461147 'planets ' => [1 , 2 ],
11471148 ];
@@ -1175,7 +1176,7 @@ public function testHasManySelectableRelationshipWithForceDelete()
11751176 $ inputData = [
11761177 'name ' => $ faker ->name ,
11771178 'email ' => $ faker ->safeEmail ,
1178- 'password ' => bcrypt ($ faker ->password ()),
1179+ 'password ' => Hash:: make ($ faker ->password ()),
11791180 'remember_token ' => null ,
11801181 'planets ' => [1 , 2 ],
11811182 ];
@@ -1208,7 +1209,7 @@ public function testHasManySelectableRelationshipNonNullableForeignKeyAndDefault
12081209 $ inputData = [
12091210 'name ' => $ faker ->name ,
12101211 'email ' => $ faker ->safeEmail ,
1211- 'password ' => bcrypt ($ faker ->password ()),
1212+ 'password ' => Hash:: make ($ faker ->password ()),
12121213 'remember_token ' => null ,
12131214 'comets ' => [1 , 2 ],
12141215 ];
@@ -1242,7 +1243,7 @@ public function testHasManySelectableRelationshipNonNullable()
12421243 $ inputData = [
12431244 'name ' => $ faker ->name ,
12441245 'email ' => $ faker ->safeEmail ,
1245- 'password ' => bcrypt ($ faker ->password ()),
1246+ 'password ' => Hash:: make ($ faker ->password ()),
12461247 'remember_token ' => null ,
12471248 'planetsNonNullable ' => [1 , 2 ],
12481249 ];
@@ -1282,7 +1283,7 @@ public function testCreateHasManyRelationWithDelimitedNameSubfields()
12821283 $ inputData = [
12831284 'name ' => $ faker ->name ,
12841285 'email ' => $ faker ->safeEmail ,
1285- 'password ' => bcrypt ($ faker ->password ()),
1286+ 'password ' => Hash:: make ($ faker ->password ()),
12861287 'remember_token ' => null ,
12871288 'universes ' => [
12881289 [
@@ -1335,7 +1336,7 @@ public function testCreateHasOneRelationWithDelimitedNameSubfields()
13351336 $ inputData = [
13361337 'name ' => $ faker ->name ,
13371338 'email ' => $ faker ->safeEmail ,
1338- 'password ' => bcrypt ($ faker ->password ()),
1339+ 'password ' => Hash:: make ($ faker ->password ()),
13391340 'remember_token ' => null ,
13401341 'roles ' => [1 , 2 ],
13411342 'accountDetails ' => [
@@ -1383,7 +1384,7 @@ public function testBelongsToManyWithDelimitedNameSubfields()
13831384 $ inputData = [
13841385 'name ' => $ faker ->name ,
13851386 'email ' => $ faker ->safeEmail ,
1386- 'password ' => bcrypt ($ faker ->password ()),
1387+ 'password ' => Hash:: make ($ faker ->password ()),
13871388 'remember_token ' => null ,
13881389 'superArticles ' => [
13891390 [
0 commit comments